-
Notifications
You must be signed in to change notification settings - Fork 396
T7982: container: generate run arguments once #4826
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
Conversation
|
👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the network configuration handling in the container run arguments generation by consolidating the network parameter construction into a single variable. Instead of having early returns with duplicated command construction, the code now builds a net variable that contains the appropriate network configuration and uses it in a single return statement.
- Introduced a
netvariable to hold network configuration parameters - Replaced early return for host networking with conditional assignment to
net - Unified the final return statement to use the
netvariable consistently
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3a5d42a to
1a8be30
Compare
dmbaturin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any issues with the logic but I think the commit and PR title should clearly mark it container: and explain what arguments the change is about.
|
I added container: and tried to improve the wording |
|
CI integration 👍 passed! Details
|
|
@dmbaturin Would be nice to get this in before working on other container related improvements. |
dmbaturin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic looks good to me now.
hedrok
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean refactoring - no functional changes.
sever-sever
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge container options to simplify and do not duplicate the code.
Code refactoring.
I have not tested it.
Change summary
Simplify container run arguments to reduce chance for unintended inconsistencies between host and container networking
Types of changes
Related Task(s)
Related PR(s)
How to test / Smoketest result
Checklist: