Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove most ctr refs from CLI #874

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

sondavidb
Copy link
Contributor

@sondavidb sondavidb commented Oct 17, 2023

Issue #, if available:
#841 (partial fix)

Description of changes:
Removed many references to ctr. Only things not removed were the run and the image rpull commands. Both were more challenging to port over — run is entirely delegated to ctr and may not even be worth the effort to port over, while image rpull uses more than just the containerd client, which might require larger scale changes should we focus on this later. All other references to ctr should be gone.

Unsure if the place I put client.go adhered to proper structure. It made sense to me given that every other file in every other folder was relevant to a command, so the internal folder made the most sense to me for the code for creating a new containerd client.

Testing performed:
Minimal testing on some basic operations (create, push, ztoc, ls) and ensured they remained functionally the same. I suppose the testing suite will perform some more robust tests as they use the CLI.

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

@sondavidb sondavidb requested a review from a team as a code owner October 17, 2023 21:42
@sondavidb sondavidb force-pushed the remove-ctr-refs-from-cli branch from 3180631 to 58e8b1f Compare October 17, 2023 21:51
@turan18
Copy link
Contributor

turan18 commented Oct 27, 2023

Overall LGTM, besides the small nit. Can we update the commit message to mention which specific commands still reference the commands package?

cmd/soci/commands/push.go Outdated Show resolved Hide resolved
@sondavidb sondavidb force-pushed the remove-ctr-refs-from-cli branch from f7ce392 to 87b9248 Compare October 27, 2023 17:10
@sondavidb
Copy link
Contributor Author

sondavidb commented Oct 27, 2023

Overall LGTM, besides the small nit. Can we update the commit message to mention which specific commands still reference the commands package?

I think it would make the commit msg a little too verbose. TIL there's a difference between a commit message and a commit subject/header x.x

Removed all references except from "image rpull" and "run".
"run" is entirely delegated to ctr and thus probably not worth porting.
"image rpull" uses more than just flags and might be a tad more
difficult to port over.

Signed-off-by: David Son <[email protected]>
@sondavidb sondavidb force-pushed the remove-ctr-refs-from-cli branch from 87b9248 to b19950e Compare October 27, 2023 18:02
@sondavidb sondavidb merged commit 7557b6c into awslabs:main Oct 31, 2023
4 checks passed
@sondavidb sondavidb deleted the remove-ctr-refs-from-cli branch October 31, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants