Skip to content

Use variables for all SOCI CLI flag names#1867

Merged
sondavidb merged 3 commits into
awslabs:mainfrom
sondavidb:cleanup-cli-flags
Feb 24, 2026
Merged

Use variables for all SOCI CLI flag names#1867
sondavidb merged 3 commits into
awslabs:mainfrom
sondavidb:cleanup-cli-flags

Conversation

@sondavidb
Copy link
Copy Markdown
Contributor

@sondavidb sondavidb commented Feb 19, 2026

Issue #, if available:

Description of changes:
Should be a no-op in practice, just chores :)

We identified a problem in #1866 where we were looking for the value of --username when pushing an image instead of using --user. This PR should hopefully help us avoid this mistake in the future.

This should also help us to better identify dead code/flags that are no longer used in the CLI, such as the LabelFlag, which was removed in a separate commit. There's still quite a few pieces of code that are gangling (e.g. many of the registry flags) but some of these might be more desirable in the future.

Added a "global" package as well so CLI packages can refer to globally set variables as needed.

There's probably other housekeeping to be done here (internal package is a bit messy IMO) but this is a good start.

Testing performed:
Ensured the changes built via make

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This was an artifact from when we had `rpull` bundled in the CLI. As
this has been removed in awslabs#998, we no longer need it.

Signed-off-by: David Son <davbson@amazon.com>
@sondavidb sondavidb requested a review from a team as a code owner February 19, 2026 00:39
@github-actions github-actions Bot added the go Pull requests that update Go code label Feb 19, 2026
@sondavidb
Copy link
Copy Markdown
Contributor Author

@prafgup just an FYI since I know you're doing a large PR on the CLI. Don't want you to be blindsided by a huge rebase 🙂

@sondavidb sondavidb force-pushed the cleanup-cli-flags branch 2 times, most recently from 1df566d to 02f6fca Compare February 19, 2026 00:46
@prafgup
Copy link
Copy Markdown
Contributor

prafgup commented Feb 19, 2026

@prafgup just an FYI since I know you're doing a large PR on the CLI. Don't want you to be blindsided by a huge rebase 🙂

Thanks for notifying!! I'll rebase once this is merged 😓

Comment thread cmd/soci/commands/create.go Outdated
Comment thread cmd/soci/commands/ztoc/list.go
Comment thread cmd/soci/commands/push.go Outdated
Signed-off-by: David Son <davbson@amazon.com>
Should be a no-op in practice, just chores :) This should also help us
to better identify dead code/flags that are no longer used in the CLI
(hence the commit before this). There's still quite a few that are
gangling (e.g. many of the registry flags) but some of these might be
more desirable in the future.

Added a "global" package as well so CLI packages can refer to globally
set variables as needed.

There's probably other housekeeping to be done here (internal package is
a bit messy IMO) but this is a good start.

Signed-off-by: David Son <davbson@amazon.com>
@sondavidb sondavidb merged commit 291ce10 into awslabs:main Feb 24, 2026
75 of 79 checks passed
@sondavidb sondavidb deleted the cleanup-cli-flags branch February 24, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants