-
Notifications
You must be signed in to change notification settings - Fork 73
✨ e2e: isolate tests with per-scenario dynamic catalogs #2651
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
base: main
Are you sure you want to change the base?
Changes from all commits
71caf2f
24295e5
56836f4
36c10cb
c5d4a72
dfae850
cb541fa
1d053f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,118 @@ | ||||||
| # E2E Test Isolation: Per-Scenario Catalogs via Dynamic OCI Image Building | ||||||
|
|
||||||
| ## Problem | ||||||
|
|
||||||
| E2E test scenarios previously shared cluster-scoped resources (ClusterCatalogs, CRDs, packages), | ||||||
| causing cascading failures when one scenario left state behind. Parallelism was impossible because | ||||||
| scenarios conflicted on shared resource names. | ||||||
|
|
||||||
| ## Solution | ||||||
|
|
||||||
| Each scenario dynamically builds and pushes its own bundle and catalog OCI images at test time, | ||||||
| parameterized by scenario ID. All cluster-scoped resource names include the scenario ID, making | ||||||
| conflicts structurally impossible. | ||||||
|
|
||||||
| ``` | ||||||
| Scenario starts | ||||||
| -> Generate parameterized bundle manifests (CRD names, deployments, etc. include scenario ID) | ||||||
| -> Build + push bundle OCI images to e2e registry via go-containerregistry | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tmshort WDYT? Can it work on downstream?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Working on that! #2651 (comment)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've got this PR updated to keep around the essentials needed to avoid (hopefully) avoid breaking downstream. I've also got a new downstream PR that contains no downstream changes (just cherry-pick from upstream, resolve conflicts, and vendor): openshift/operator-framework-operator-controller#700
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| -> Generate FBC catalog config referencing those bundle image refs | ||||||
| -> Build + push catalog OCI image to e2e registry | ||||||
| -> Create ClusterCatalog pointing at the catalog image | ||||||
| -> Run scenario steps | ||||||
| -> Cleanup all resources (including catalog) | ||||||
| ``` | ||||||
|
|
||||||
| ### Key Properties | ||||||
|
|
||||||
| - Every cluster-scoped resource name includes the scenario ID -- no conflicts by construction. | ||||||
| - Failed scenario state is preserved for debugging without affecting other scenarios. | ||||||
| - Parallelism (`Concurrency > 1`) is safe without further changes. | ||||||
| - Adding new scenarios requires zero coordination with existing ones. | ||||||
|
|
||||||
| ## Builder API (`test/e2e/catalog/`) | ||||||
|
||||||
| ## Builder API (`test/e2e/catalog/`) | |
| ## Builder API (`test/internal/catalog/`) |
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
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.
@joelanford should we get it merged?
It might be nice have the design of the tests but should this dir be the correct one/
I think it was generated by CLAUDE to address the need.
Uh oh!
There was an error while loading. Please reload this page.
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.
Do we have a directory for this kind of thing? I do think we should merge this kind of doc, and I was definitely intending to have this exact discussion.
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.
If we want define how our e2e test is design I would put that in the Contributing.MD
If you want to track design decisions then we need a new dir, so far all is in the google drive.