Skip to content

fix(e2e): Incorrect project selected in RBAC E2E on staging#5433

Merged
Zaimwa9 merged 4 commits intomainfrom
fix/roles-not-cleaned-up-in-e2e
May 8, 2025
Merged

fix(e2e): Incorrect project selected in RBAC E2E on staging#5433
Zaimwa9 merged 4 commits intomainfrom
fix/roles-not-cleaned-up-in-e2e

Conversation

@Zaimwa9
Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 commented May 8, 2025

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

When testing for roles in e2e, the project is selected by index. An incorrect project is selected on staging. The PR implements a correct test-data-based selector.

How did you test this code?

In CI + locally

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner May 8, 2025 08:29
@Zaimwa9 Zaimwa9 requested review from gagantrivedi and removed request for a team May 8, 2025 08:29
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview May 8, 2025 1:09pm
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview May 8, 2025 1:09pm
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview May 8, 2025 1:09pm

@github-actions github-actions Bot added the api Issue related to the REST API label May 8, 2025
@Zaimwa9 Zaimwa9 requested a review from khvn26 May 8, 2025 08:30
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2025

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-5433 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-5433 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-5433 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-5433 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-5433 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-5433 Finished ✅ Results

@github-actions github-actions Bot added the fix label May 8, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2025

Uffizzi Ephemeral Environment Deploying

☁️ https://app.uffizzi.com/github.com/Flagsmith/flagsmith/pull/5433

⚙️ Updating now by workflow run 14907305716.

What is Uffizzi? Learn more!

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.63%. Comparing base (0031301) to head (de41249).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5433      +/-   ##
==========================================
- Coverage   97.63%   97.63%   -0.01%     
==========================================
  Files        1239     1234       -5     
  Lines       43065    42960     -105     
==========================================
- Hits        42046    41942     -104     
+ Misses       1019     1018       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@khvn26 khvn26 left a comment

Choose a reason for hiding this comment

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

Can see the latest staging E2E run is green so 👍

One minor comment related to rbac model relations having on_delete=CASCADE.

Comment thread api/e2etests/e2e_seed_data.py Outdated
Comment on lines +40 to +44
if settings.IS_RBAC_INSTALLED:
from rbac.models import Role # type: ignore[import-not-found,unused-ignore]

for org in user.organisations.all():
Role.objects.filter(organisation=org).delete()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably needs to be removed?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Went ahead and removed in de41249.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah thanks, was just pushing the removal

@github-actions github-actions Bot added fix and removed fix labels May 8, 2025
@khvn26 khvn26 changed the title fix: clean-up-roles-in-teardown fix(e2e): Incorrect project sometimes selected in RBAC E2E May 8, 2025
@khvn26 khvn26 changed the title fix(e2e): Incorrect project sometimes selected in RBAC E2E fix(e2e): Incorrect project selected in RBAC E2E on staging May 8, 2025
@Zaimwa9 Zaimwa9 merged commit c5a514d into main May 8, 2025
32 checks passed
@Zaimwa9 Zaimwa9 deleted the fix/roles-not-cleaned-up-in-e2e branch May 8, 2025 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API fix front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants