From 1e3fd9fa000cbfa4c17ac2d235b6b94da1d00724 Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Mon, 8 Apr 2024 16:18:11 +0800 Subject: [PATCH] updated per code review Signed-off-by: Patrick Zheng --- cmd/notation/inspect.go | 2 +- cmd/notation/list.go | 2 +- cmd/notation/sign.go | 4 ++-- cmd/notation/verify.go | 2 +- test/e2e/suite/command/inspect.go | 4 ++-- test/e2e/suite/command/list.go | 4 ++-- test/e2e/suite/command/sign.go | 4 ++-- test/e2e/suite/command/verify.go | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cmd/notation/inspect.go b/cmd/notation/inspect.go index a5c14088..ffa104b1 100644 --- a/cmd/notation/inspect.go +++ b/cmd/notation/inspect.go @@ -103,7 +103,7 @@ Example - Inspect signatures on an OCI artifact identified by a digest and outpu return fmt.Errorf("max-signatures value %d must be a positive number", opts.maxSignatures) } if cmd.Flags().Changed("allow-referrers-api") { - fmt.Fprintln(os.Stderr, "Warning: flag '--allow-referrers-api' is deprecated and ignored.") + fmt.Fprintln(os.Stderr, "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version.") } return runInspect(cmd, opts) }, diff --git a/cmd/notation/list.go b/cmd/notation/list.go index bb061bb0..3cd6226a 100644 --- a/cmd/notation/list.go +++ b/cmd/notation/list.go @@ -82,7 +82,7 @@ Example - [Experimental] List signatures of an OCI artifact identified by a tag return fmt.Errorf("max-signatures value %d must be a positive number", opts.maxSignatures) } if cmd.Flags().Changed("allow-referrers-api") { - fmt.Fprintln(os.Stderr, "Warning: flag '--allow-referrers-api' is deprecated and ignored.") + fmt.Fprintln(os.Stderr, "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version.") } return runList(cmd.Context(), opts) }, diff --git a/cmd/notation/sign.go b/cmd/notation/sign.go index 41f81251..ac5a6897 100644 --- a/cmd/notation/sign.go +++ b/cmd/notation/sign.go @@ -104,10 +104,10 @@ Example - [Experimental] Sign an OCI artifact identified by a tag and referenced // allow-referrers-api flag is set if cmd.Flags().Changed("allow-referrers-api") { if opts.allowReferrersAPI { - fmt.Fprintln(os.Stderr, "Warning: flag '--allow-referrers-api' is deprecated, use '--force-referrers-tag=false' instead.") + fmt.Fprintln(os.Stderr, "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version, use '--force-referrers-tag=false' instead.") opts.forceReferrersTag = false } else { - fmt.Fprintln(os.Stderr, "Warning: flag '--allow-referrers-api' is deprecated, use '--force-referrers-tag' instead.") + fmt.Fprintln(os.Stderr, "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version.") } } return runSign(cmd, opts) diff --git a/cmd/notation/verify.go b/cmd/notation/verify.go index f013bdd2..ae2796f1 100644 --- a/cmd/notation/verify.go +++ b/cmd/notation/verify.go @@ -88,7 +88,7 @@ Example - [Experimental] Verify a signature on an OCI artifact identified by a t return fmt.Errorf("max-signatures value %d must be a positive number", opts.maxSignatureAttempts) } if cmd.Flags().Changed("allow-referrers-api") { - fmt.Fprintln(os.Stderr, "Warning: flag '--allow-referrers-api' is deprecated and ignored.") + fmt.Fprintln(os.Stderr, "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version.") } return runVerify(cmd, opts) }, diff --git a/test/e2e/suite/command/inspect.go b/test/e2e/suite/command/inspect.go index ff4ef7cf..64dd37d7 100644 --- a/test/e2e/suite/command/inspect.go +++ b/test/e2e/suite/command/inspect.go @@ -109,7 +109,7 @@ var _ = Describe("notation inspect", func() { notation.Exec("inspect", artifact.ReferenceWithDigest(), "--allow-referrers-api", "-v"). MatchErrKeyWords( "Warning: This feature is experimental and may not be fully tested or completed and may be deprecated.", - "Warning: flag '--allow-referrers-api' is deprecated and ignored.", + "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version.", ). MatchKeyWords(inspectSuccessfully...) }) @@ -126,7 +126,7 @@ var _ = Describe("notation inspect", func() { notation.Exec("inspect", artifact.ReferenceWithDigest(), "--allow-referrers-api", "-v"). MatchErrKeyWords( "Warning: This feature is experimental and may not be fully tested or completed and may be deprecated.", - "Warning: flag '--allow-referrers-api' is deprecated and ignored.", + "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version.", ). MatchKeyWords(inspectSuccessfully...) }) diff --git a/test/e2e/suite/command/list.go b/test/e2e/suite/command/list.go index 558eabf6..d1eb06b5 100644 --- a/test/e2e/suite/command/list.go +++ b/test/e2e/suite/command/list.go @@ -126,7 +126,7 @@ var _ = Describe("notation list", func() { notation.Exec("list", artifact.ReferenceWithDigest(), "--allow-referrers-api", "-v"). MatchErrKeyWords( "Warning: This feature is experimental and may not be fully tested or completed and may be deprecated.", - "Warning: flag '--allow-referrers-api' is deprecated and ignored.", + "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version.", ). MatchKeyWords( "└── application/vnd.cncf.notary.signature", @@ -149,7 +149,7 @@ var _ = Describe("notation list", func() { notation.Exec("list", artifact.ReferenceWithDigest(), "--allow-referrers-api", "-v"). MatchErrKeyWords( "Warning: This feature is experimental and may not be fully tested or completed and may be deprecated.", - "Warning: flag '--allow-referrers-api' is deprecated and ignored.", + "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version.", ). MatchKeyWords( "└── application/vnd.cncf.notary.signature", diff --git a/test/e2e/suite/command/sign.go b/test/e2e/suite/command/sign.go index d83d7614..0371cce6 100644 --- a/test/e2e/suite/command/sign.go +++ b/test/e2e/suite/command/sign.go @@ -108,7 +108,7 @@ var _ = Describe("notation sign", func() { Exec("sign", artifact.ReferenceWithDigest(), "--allow-referrers-api"). MatchErrKeyWords( "Warning: This feature is experimental and may not be fully tested or completed and may be deprecated.", - "Warning: flag '--allow-referrers-api' is deprecated, use '--force-referrers-tag=false' instead.", + "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version, use '--force-referrers-tag=false' instead.", ). MatchKeyWords(SignSuccessfully) @@ -124,7 +124,7 @@ var _ = Describe("notation sign", func() { Exec("sign", artifact.ReferenceWithDigest(), "--allow-referrers-api=false"). MatchErrKeyWords( "Warning: This feature is experimental and may not be fully tested or completed and may be deprecated.", - "Warning: flag '--allow-referrers-api' is deprecated, use '--force-referrers-tag' instead.", + "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version.", ). MatchKeyWords(SignSuccessfully) diff --git a/test/e2e/suite/command/verify.go b/test/e2e/suite/command/verify.go index c4095092..81d883cd 100644 --- a/test/e2e/suite/command/verify.go +++ b/test/e2e/suite/command/verify.go @@ -94,7 +94,7 @@ var _ = Describe("notation verify", func() { notation.Exec("verify", artifact.ReferenceWithDigest(), "--allow-referrers-api", "-v"). MatchErrKeyWords( "Warning: This feature is experimental and may not be fully tested or completed and may be deprecated.", - "Warning: flag '--allow-referrers-api' is deprecated and ignored.", + "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version.", ). MatchKeyWords(VerifySuccessfully) }) @@ -111,7 +111,7 @@ var _ = Describe("notation verify", func() { notation.Exec("verify", artifact.ReferenceWithDigest(), "--allow-referrers-api", "-v"). MatchErrKeyWords( "Warning: This feature is experimental and may not be fully tested or completed and may be deprecated.", - "Warning: flag '--allow-referrers-api' is deprecated and ignored.", + "Warning: flag '--allow-referrers-api' is deprecated and will be removed in a future version.", ). MatchKeyWords(VerifySuccessfully) })