feat: Bulk Image Patching
This PR introduces bulk patching for copa that allows user to patch multiple container images by passing a single YAML config file path in the --config flag.
eg: copa patch --config path/config.yaml
This is the initial implementation which focuses on the "comprehensive/update-all" patching foundational for report based bulk image patching for future prospects.
The design doc which this is implemented on: Bulk Image Patching
Closes #631
Codecov Report
:x: Patch coverage is 32.93173% with 167 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 39.49%. Comparing base (0c86ad6) to head (73c3edb).
Additional details and impacted files
@@ Coverage Diff @@
## main #1235 +/- ##
==========================================
+ Coverage 39.31% 39.49% +0.18%
==========================================
Files 42 45 +3
Lines 5927 6165 +238
==========================================
+ Hits 2330 2435 +105
- Misses 3396 3521 +125
- Partials 201 209 +8
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@amanycodes can you add an integration test too
@sozercan I was working on integration tests. the basic implementation is done. I'll add in more cases to make this robust with updated CI workflow. Thanks!
@sozercan the integration test is done. The only part that remains is testing multiarch images through the config file. I was having some issues with it's dealing with the manifest in the testcontainer registry (working on it). Please let me know if the workflow is set correctly!
@amanycodes what error do you see when patching manifests with bulk image patching? can we add to this PR to debug
@ashnamehrotra There was a panic due to a race condition in the main Patch() function from the error channels, i fixed that and the single arch tests are passing. still getting some error in the multiarch ones. I think it's more related to the image but I'm not able to point it out. Would love your feedback!
@amanycodes look like the CI is failing. is this ready for review?
@sozercan the PR is ready for review, the multi arch testing part was where i had some issues. rest the feature is working and unit tests and single arch tests are passing.
@ashnamehrotra I hope it's good to go now :)
@amanycodes can we add this to docs?
For the failing test, I think you are missing the required tooling:
- name: Install required tools
shell: bash
run: .github/workflows/scripts/download-tooling.sh
@amanycodes can we add this to the documentation under Features?
@amanycodes are you still working on this?