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

feat: --container-options #1462

Merged
merged 5 commits into from
Dec 6, 2022
Merged

feat: --container-options #1462

merged 5 commits into from
Dec 6, 2022

Conversation

ChristopherHX
Copy link
Contributor

This deprecates the following options

  • --privileged
  • --container-cap-add
  • --container-cap-drop
  • --container-architecture
  • --userns

If we decide to get rid of the options, we might want to add a warning before removal.

This deprecates the following options
- `--privileged`
- `--container-cap-add`
- `--container-cap-drop`
- `--container-architecture`
- `--userns`
@ChristopherHX ChristopherHX requested a review from a team as a code owner November 24, 2022 20:06
@github-actions
Copy link
Contributor

github-actions bot commented Nov 24, 2022

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 6 0 0.04s
✅ REPOSITORY gitleaks yes no 2.59s
✅ REPOSITORY git_diff yes no 0.0s
✅ REPOSITORY secretlint yes no 0.99s

See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@codecov
Copy link

codecov bot commented Nov 24, 2022

Codecov Report

Merging #1462 (55d9942) into master (4f8da0a) will increase coverage by 3.07%.
The diff coverage is 66.93%.

@@            Coverage Diff             @@
##           master    #1462      +/-   ##
==========================================
+ Coverage   57.50%   60.58%   +3.07%     
==========================================
  Files          32       44      +12     
  Lines        4594     6998    +2404     
==========================================
+ Hits         2642     4240    +1598     
- Misses       1729     2455     +726     
- Partials      223      303      +80     
Impacted Files Coverage Δ
pkg/common/file.go 0.00% <0.00%> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/container/host_environment.go 0.00% <0.00%> (ø)
pkg/container/util.go 0.00% <0.00%> (ø)
pkg/model/action.go 0.00% <0.00%> (ø)
pkg/model/step_result.go 0.00% <ø> (ø)
pkg/container/docker_run.go 12.71% <11.25%> (+7.16%) ⬆️
pkg/model/workflow.go 45.65% <23.58%> (-5.26%) ⬇️
...ontainer/linux_container_environment_extensions.go 24.32% <24.32%> (ø)
pkg/container/docker_pull.go 33.33% <33.33%> (ø)
... and 37 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ChristopherHX
Copy link
Contributor Author

ChristopherHX commented Nov 24, 2022

Seems like the options merge process should be improved, a -v bind mount remove all predefined binds...

EDIT
bind mounts are now appended

@mergify
Copy link
Contributor

mergify bot commented Nov 24, 2022

@ChristopherHX this pull request has failed checks 🛠

EDIT I don't like these messages

@mergify mergify bot added the needs-work Extra attention is needed label Nov 24, 2022
@mergify mergify bot removed the needs-work Extra attention is needed label Nov 24, 2022
Copy link
Member

@KnisterPeter KnisterPeter left a comment

Choose a reason for hiding this comment

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

Before we merge this there should be warnings about changed parameters, you are right.
I will approve when you add warnings.

@mergify mergify bot requested a review from a team November 25, 2022 08:50
@ChristopherHX ChristopherHX marked this pull request as draft November 25, 2022 11:36
@ChristopherHX
Copy link
Contributor Author

ChristopherHX commented Nov 25, 2022

This change needs some adjustments to correctly replace the old flags. I will look into improving this change this weekend and switch this PR again to ready to review state.

Currently this change doesn't alter the the functionality of the old flags, which should continue to work as before without a --container-options flag.

@ChristopherHX ChristopherHX marked this pull request as ready for review November 28, 2022 16:19
@ChristopherHX
Copy link
Contributor Author

Added deprecation warning, options are also applied to stepcontainer.

I'm not shure what happens with the docker network option if it isn't in the options string

@mergify mergify bot merged commit 4c2524a into master Dec 6, 2022
@mergify mergify bot deleted the container-options branch December 6, 2022 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants