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

✨ Use a separate namespace for each e2e test #1428

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tmshort
Copy link
Contributor

@tmshort tmshort commented Nov 6, 2024

Fixes #1307

Create and use a new namespace for every e2e test. This means that extension resources are placed in their own namespace. The tests deletes the namespace, and then waits until completion. This ensures that most of an extension's resources are deleted.

It does guarantee that global resources (e.g. CRDs, CRs, CRBs) are deleted.

And would eventually allow the tests to be run in parallel (assuming the installed extensions allow for that).

Description

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

@tmshort tmshort requested a review from a team as a code owner November 6, 2024 18:02
Copy link

netlify bot commented Nov 6, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 7b79ace
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/672bd7cf439c930008a61d12
😎 Deploy Preview https://deploy-preview-1428--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.26%. Comparing base (6bda277) to head (7b79ace).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1428      +/-   ##
==========================================
- Coverage   73.42%   73.26%   -0.17%     
==========================================
  Files          42       42              
  Lines        3063     3063              
==========================================
- Hits         2249     2244       -5     
- Misses        641      644       +3     
- Partials      173      175       +2     
Flag Coverage Δ
e2e 55.20% <ø> (-0.14%) ⬇️
unit 52.59% <ø> (+0.03%) ⬆️

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.

@tmshort
Copy link
Contributor Author

tmshort commented Nov 6, 2024

I have encountered one failure over the course of several dozen; so this is not perfect, but it does reduce the likelyhood

@tmshort tmshort force-pushed the fix-e2e-flakes branch 2 times, most recently from ae21f27 to d940463 Compare November 6, 2024 20:49
Fixes operator-framework#1307

Create and use a new namespace for every e2e test. This means that
extension resources are placed in their own namespace. The tests
deletes the namespace, and then waits until completion. This ensures
that _most_ of an extension's resources are deleted.

It does guarantee that global resources (e.g. CRDs, CRs, CRBs) are
deleted.

And would eventually allow the tests to be run in parallel (assuming
the installed extensions allow for that).

Signed-off-by: Todd Short <tshort@redhat.com>
@tmshort
Copy link
Contributor Author

tmshort commented Nov 6, 2024

Of course, it failed e2e... but it failed because the bundle's CRDs were still present... not much we can do here except chase a timeout, which is never a good idea.

This was the interesting condition on the CRDs:

{Terminating True 2024-11-06 21:00:31 +0000 UTC InstanceDeletionFailed could not list instances: storage is (re)initializing}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e error: already exists in namespace '' and cannot be managed by operator-controller
1 participant