Skip to content

✨ Use docker API instead of exec'ing docker cmds #4413

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

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

stmcginnis
Copy link
Contributor

@stmcginnis stmcginnis commented Mar 30, 2021

What this PR does / why we need it:

This gets rid of calls out to the docker CLI with parsing of its
output to perform docker management. Calls now use the docker SDK
directly.

This is the first step towards making the CAPD more testable and
potentially able to use other CRIs. Ideally, long term, we will want to
refactor the code to move all runtime interaction into one or more
interfaces that would give us the option for swapping out implementations.

We can also then set up better unit testing for all code paths to make sure
the interacting code is correct, regardless of the implementation of the
runtime interaction.

Which issue(s) this PR fixes:
Related #4380

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 30, 2021
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 30, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @stmcginnis. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 30, 2021
@sbueringer
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 30, 2021
@stmcginnis stmcginnis force-pushed the no-docker branch 2 times, most recently from 99f2657 to 9e934e2 Compare April 1, 2021 11:50
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 1, 2021
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 1, 2021
@stmcginnis stmcginnis force-pushed the no-docker branch 2 times, most recently from 81f924a to aa02f82 Compare April 1, 2021 12:49
@stmcginnis
Copy link
Contributor Author

/test pull-cluster-api-test-main

@stmcginnis
Copy link
Contributor Author

/retest

Unable to reproduce failure locally. Will give it one go with CI.

@stmcginnis
Copy link
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 1, 2021
@stmcginnis stmcginnis changed the title WIP: ✨ Use docker API instead of exec'ing docker cmds ✨ Use docker API instead of exec'ing docker cmds Apr 1, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 1, 2021
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 6, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 6, 2021
@sbueringer
Copy link
Member

@stmcginnis I put it in my list for review. Hopefully I get to it this week

Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stmcginnis great work! Only a few nits from my side

@sbueringer
Copy link
Member

Thx!!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 8, 2021
Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks Sean!
/lgtm

@fabriziopandini
Copy link
Member

/lgtm

@fabriziopandini
Copy link
Member

/approve

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 13, 2021
This gets rid of calls out to the docker CLI with parsing of its
output to perform docker management. Calls now use the docker SDK
directly.

This is the first step towards making the CAPD more testable and
potentially able to use other CRIs. Ideally, long term, we will want to
refactor the code to move all runtime interaction into one or more
interfaces that would give us the option for swapping out
implementations.

We can also then set up better unit testing for all code paths to make
sure the interacting code is correct, regardless of the implementation
of the runtime interaction.

Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 13, 2021
@stmcginnis
Copy link
Contributor Author

Rebased on master due to conflict from f1a4299

@fabriziopandini
Copy link
Member

/lgmt
/approve

@sbueringer
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 13, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot merged commit e3febc7 into kubernetes-sigs:master Jul 13, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.4 milestone Jul 13, 2021
@stmcginnis stmcginnis deleted the no-docker branch December 21, 2023 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants