09cd4ea26c
Merge pull request #6362 from thaJeztah/cleanup_formatter
...
cli/command/formatter: ContainerContext: assorted cleanups, fixes
2025-08-25 16:22:06 +02:00
a6826de3e2
Merge pull request #6361 from thaJeztah/cli_trust_cleanups
...
cli/trust: some cleanups
2025-08-25 16:20:56 +02:00
5bcb60aaa6
Merge pull request #6356 from thaJeztah/unexport_authresolver_util
...
cli/command/image: deprecate AuthResolver and un-export
2025-08-25 16:19:45 +02:00
1beb3d4d5b
Merge pull request #6355 from thaJeztah/rm_image_pull
...
cli/command/image: remove exported RunPull, PullOptions
2025-08-25 16:00:38 +02:00
5ab12e6262
Merge pull request #6365 from thaJeztah/fix_version_annotations
...
cli/command/service: fix API annotations for generic resource flags
2025-08-25 13:33:12 +02:00
104b07647f
Merge pull request #6363 from thaJeztah/image_push_cleanups
...
cli/command/image: runPush: minor cleanups and linting issues
2025-08-25 11:47:21 +02:00
27734fdf4d
Merge pull request #6349 from thaJeztah/rm_RegistryAuthenticationPrivilegedFunc
...
cli/command: remove deprecated RegistryAuthenticationPrivilegedFunc
2025-08-25 11:00:30 +02:00
dcc3d25dc2
cli/command/service: fix API annotations for generic resource flags
...
These flags were added in 20a6ff32ee , and require
API version v1.32 or up, but they accidentally copied the flag-name from another
flag, so were not setting the annotation correctly.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-25 10:59:47 +02:00
c36e67d7b6
cli/command/image: runPush: minor cleanups and linting issues
...
- Remove redundant intermediate variables
- Explicitly use an early return on error instead of combining with
other checks.
- Fix unhandled errors and combine defers
- Remove outstanding TODO that unlikely will be addressed
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-24 19:38:24 +02:00
4f944e245b
cli/command/formatter: ContainerContext.Image: explicitly strip digest
...
The `reference.TrimNamed` function strips both digests and tags; the
formatter function only wants to remove the digest, but preserve any
tags present.
Update the implementation to only trim the reference if there's a digest
present, otherwise use it as-is.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-24 19:31:47 +02:00
7ac3e0e0bf
cli/command/formatter: ContainerContext.Image: use early returns
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-24 19:31:47 +02:00
0e7d422e5f
cli/command/formatter: TestContainerPsContext: add test-cases
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-24 19:31:46 +02:00
7cb8147e77
cli/trust: GetNotaryRepository: inline variables
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-24 16:01:08 +02:00
35a41c39a4
cli/trust: check for Digested, Tagged reference instead of Canonical
...
The [Canonical] interface defines images that are both [Named] and
[Digested], but in all places where it was used, we were only interested
whether the reference contained a digest. Similarly [NamedTagged] is
a superset of [Tagged], so checking for [Tagged] is sufficient if we're
already dealing with a [Named] reference.
This patch changes those checks to check for [Digested] and [Tagged]
references, as that's what's relevant for these checks.
[Named]: https://pkg.go.dev/github.com/distribution/reference#Named
[NamedTagged]: https://pkg.go.dev/github.com/distribution/reference#NamedTagged
[Canonical]: https://pkg.go.dev/github.com/distribution/reference#Canonical
[Digested]: https://pkg.go.dev/github.com/distribution/reference#Digested
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-24 16:00:54 +02:00
7ad113ccc2
cli/command/image: deprecate AuthResolver and un-export
...
This function was exported to share it between "trust" and "image",
but was only a shallow wrapper, so split the implementations where
used.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-23 03:46:14 +02:00
9216f04eb6
cli/command/image: remove exported RunPull, PullOptions
...
These were exported in 812f113685 , but
while the function and options are exported, the option-fields were
all un-exported, so these were not usable.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-23 03:35:51 +02:00
9fd71c8347
cli/command: rename vars for consistency and prevent shadowing
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-23 03:04:36 +02:00
03da6ad2d1
cli/command: remove deprecated RegistryAuthenticationPrivilegedFunc
...
This function was deprecated in 29263e865b
and is no longer used.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-23 00:41:07 +02:00
d317bc30be
cli/command/trust: remove deprecated NewPruneCommand
...
These were deprecated in 7032f5922e , which
is part of the v28.4 release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 12:35:36 +02:00
832a3754e5
Merge pull request #6342 from thaJeztah/deprecate_builder_NewPruneCommand
...
cli/command/builder: deprecate NewPruneCommand
2025-08-22 12:35:08 +02:00
4d4533abaa
Merge pull request #6338 from thaJeztah/cleanup_formatters
...
cli/command: inline vars and use struct literals in formatting functions
2025-08-22 12:25:14 +02:00
7032f5922e
cli/command/builder: deprecate NewPruneCommand
...
This patch deprecates exported NewPruneCommand and moves the
implementation details to an unexported function.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 12:18:27 +02:00
2966159873
Merge pull request #6339 from thaJeztah/rm_deprecated_formatting
...
cli/command/*: remove deprecated formatting-related functions and types
2025-08-22 12:10:26 +02:00
5bb8ab4e6f
cli/command/trust: remove deprecated formatting functions
...
These were deprecated in 95c9b1b13b , which
is part of the v28.4 release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:43:27 +02:00
8969b57500
cli/command/task: remove deprecated formatting functions
...
These were deprecated in c3ee82fdc3 , which
is part of the v28.4 release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:42:53 +02:00
c6f4573153
cli/command/service: remove deprecated formatting functions
...
These were deprecated in 9f453d3fea , which
is part of the v28.4 release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:42:24 +02:00
04bcae3a8c
cli/command/secret: remove deprecated formatting functions
...
These were deprecated in f3088e37a0 , which
is part of the v28.4 release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:41:52 +02:00
c592932f47
cli/command/registry: remove deprecated formatting functions
...
These were deprecated in 83371c2014 , which
is part of the v28.4 release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:41:11 +02:00
264080d2fc
cli/command/plugin: remove deprecated formatting functions
...
These were deprecated in bf47419852 , which
is part of the v28.4 release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:40:43 +02:00
e5a0fb09a3
cli/command/node: remove deprecated formatting functions
...
These were deprecated in 123ef81f7d , which
is part of the v28.4 release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:40:09 +02:00
7b172fcf53
cli/command/network: remove deprecated formatting functions
...
These were deprecated in e3903a1ac8 , which
is part of the v28.4 release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:39:35 +02:00
d223ec3b56
cli/command/image: remove deprecated formatting functions
...
These were deprecated in 15cf4fa912 , which
is part of the v28.4 release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:38:56 +02:00
206a8da307
cli/command/container: remove deprecated formatting functions
...
These were deprecated in 907507e22a and
fdc90caeee , which are part of the v28.4
release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:38:09 +02:00
f969adf63f
cli/command/config: remove deprecated formatting functions
...
These were deprecated in e626f778ec , which
is part of the v28.4 release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:36:11 +02:00
e416418e70
cli/command/checkpoint: remove deprecated formatting functions
...
These were deprecated in d861b78a8a , which
is part of the v28.4 release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:34:17 +02:00
efd6e7b6e0
cli/command/system: prettyPrintVersion: accept a plain io.Writer
...
We're only writing to a single stream, so may as well just let it
take an io.writer.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:22:56 +02:00
f72ec26693
cli/command/trust: inline vars and use struct literals
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:19:11 +02:00
6de2cdd1af
cli/command/task: inline vars and use struct literals
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:19:11 +02:00
e308036440
cli/command/service: inline vars and use struct literals
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:19:11 +02:00
12d30bb50c
cli/command/secret: inline vars and use struct literals
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:19:11 +02:00
863b5633f3
cli/command/registry: inline vars and use struct literals
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:19:11 +02:00
aa39a7e7be
cli/command/plugin: inline vars and use struct literals
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:19:10 +02:00
1a433cdbdb
cli/command/node: inline vars and use struct literals
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:19:10 +02:00
3d2bd97a82
cli/command/config: formatWrite: inline vars and use struct literals
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:19:10 +02:00
70033b78d4
cli/command/checkpoint: formatWrite: inline vars and use struct literals
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:19:10 +02:00
8cb8056efa
cli/command/image: historyWrite: inline vars and use struct literals
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:19:10 +02:00
7589722e93
cli/command/network: formatWrite: inline vars and use struct literals
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:19:09 +02:00
e06e758d5f
cli/command/system: TestVersionFormat: use table-test and struct literal
...
- Use a table-test to more easily allow adding test-cases
- Use the test-name itself as name for the golden file
- Use a struct-literal to create the fixture for formatting.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:11:35 +02:00
95c9b1b13b
cli/command/trust: deprecate formatting-related functions and types
...
It's part of the presentation logic of the cli, and only used internally.
We can consider providing utilities for these, but better as part of
separate packages.
This deprecates the following types and functions:
- `SignedTagInfo`
- `SignerInfo`
- `NewTrustTagFormat`
- `NewSignerInfoFormat`
- `TagWrite`
- `SignerInfoWrite`
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-21 15:25:26 +02:00
c3ee82fdc3
cli/command/task: deprecate NewTaskFormat, FormatWrite
...
It's part of the presentation logic of the cli, and only used internally.
We can consider providing utilities for these, but better as part of
separate packages.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-21 15:25:26 +02:00