From 2aad5aba34a9f22649ce1b8a2ab7017775860294 Mon Sep 17 00:00:00 2001 From: Emily Casey Date: Mon, 16 Mar 2020 17:12:42 -0400 Subject: [PATCH 1/2] error message accuracy Signed-off-by: Emily Casey --- cmd/lifecycle/analyzer.go | 3 +++ cmd/lifecycle/creator.go | 2 +- cmd/lifecycle/exporter.go | 5 ++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/lifecycle/analyzer.go b/cmd/lifecycle/analyzer.go index 6afd35148..9a469e2e8 100644 --- a/cmd/lifecycle/analyzer.go +++ b/cmd/lifecycle/analyzer.go @@ -57,6 +57,9 @@ func (a *analyzeCmd) Args(nargs int, args []string) error { if args[0] == "" { return cmd.FailErrCode(errors.New("image argument is required"), cmd.CodeInvalidArgs, "parse arguments") } + if a.cacheImageTag == "" && a.cacheDir == "" { + cmd.Logger.Warn("Not restoring cached layer metadata, no cache flag specified.") + } a.imageName = args[0] return nil } diff --git a/cmd/lifecycle/creator.go b/cmd/lifecycle/creator.go index b98dc9d56..52f6efc0f 100644 --- a/cmd/lifecycle/creator.go +++ b/cmd/lifecycle/creator.go @@ -70,7 +70,7 @@ func (c *createCmd) Args(nargs int, args []string) error { } if c.cacheImageTag == "" && c.cacheDir == "" { - cmd.Logger.Warn("Not restoring cached layer data, no cache flag specified.") + cmd.Logger.Warn("Not restoring or caching layer data, no cache flag specified.") } if c.previousImage == "" { diff --git a/cmd/lifecycle/exporter.go b/cmd/lifecycle/exporter.go index b5bfde634..a39f7d4a9 100644 --- a/cmd/lifecycle/exporter.go +++ b/cmd/lifecycle/exporter.go @@ -82,7 +82,7 @@ func (e *exportCmd) Args(nargs int, args []string) error { } if e.cacheImageTag == "" && e.cacheDir == "" { - cmd.Logger.Warn("Not restoring cached layer data, no cache flag specified.") + cmd.Logger.Warn("Will not cache data, no cache flag specified.") } if err := image.EnsureSingleRegistry(e.imageNames...); err != nil { @@ -330,9 +330,8 @@ func resolveStack(stackPath, runImageRef, registry string) (lifecycle.StackMetad } if runImageRef == "" { if stackMD.RunImage.Image == "" { - return lifecycle.StackMetadata{}, "", cmd.FailErrCode(errors.New("-image is required when there is no stack metadata available"), cmd.CodeInvalidArgs, "parse arguments") + return lifecycle.StackMetadata{}, "", cmd.FailErrCode(errors.New("-run-image is required when there is no stack metadata available"), cmd.CodeInvalidArgs, "parse arguments") } - runImageRef, err = stackMD.BestRunImageMirror(registry) if err != nil { return lifecycle.StackMetadata{}, "", err From 1a519a0068b4befb9b5f0c5675f8e111b165da69 Mon Sep 17 00:00:00 2001 From: Emily Casey Date: Mon, 16 Mar 2020 17:14:56 -0400 Subject: [PATCH 2/2] build rcs for 0.7.2 Signed-off-by: Emily Casey --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 988b53b48..11de49e84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: test-and-build: runs-on: ubuntu-latest env: - LIFECYCLE_VERSION: 0.7.1 + LIFECYCLE_VERSION: 0.7.2 steps: - uses: actions/checkout@v2 - name: Set up go