Skip to content

ROX-26420: Add migration to delete v1 report configs#19243

Draft
ksurabhi91 wants to merge 2 commits intomasterfrom
remove_v1config
Draft

ROX-26420: Add migration to delete v1 report configs#19243
ksurabhi91 wants to merge 2 commits intomasterfrom
remove_v1config

Conversation

@ksurabhi91
Copy link
Contributor

This PR adds a migration to delete v1 report configs since 4.1 is not longer supported and customers wont roll back to 4.1. V1 report configs are in the database in the backend but not visible in UI but they can refer to collections. In this case customers are unable to delete collections . Removing deprecated v1 config will fix this problem.
report config version is used to filter configs which will be deleted.
0 refers v1 report configs not migrated to v2
1 refers to migrated report config
2 refers to v2 report configs
This is explained in the report config proto https://github.com/stackrox/stackrox/blob/master/proto/storage/report_configuration.proto

Automated testing

  • [ X] added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

Fix is verified with integration tests and following upgrade tests

  1. deploy ACS 4.1. create v1 report configs and tech preview v2 configs
  2. upgrade to 4.2 so v1 configs and TP v2 config are migrated
    3.create v2 report configs
  3. upgrade to 4.9.x to verify all v1 report configs (with version set to 0 and 1)are deleted

@openshift-ci
Copy link

openshift-ci bot commented Feb 27, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Feb 27, 2026

Images are ready for the commit at 7f74050.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-205-g7f74050a95.

@ksurabhi91 ksurabhi91 force-pushed the remove_v1config branch 2 times, most recently from 850ab9f to 7c47236 Compare February 27, 2026 20:55
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 85.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.61%. Comparing base (3513e9b) to head (7f74050).

Files with missing lines Patch % Lines
...o_m_221_remove_v1_report_configs/migration_impl.go 83.33% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19243   +/-   ##
=======================================
  Coverage   49.60%   49.61%           
=======================================
  Files        2676     2678    +2     
  Lines      201921   201941   +20     
=======================================
+ Hits       100169   100185   +16     
- Misses      94291    94292    +1     
- Partials     7461     7464    +3     
Flag Coverage Δ
go-unit-tests 49.61% <85.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants