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

fix: ensure project names are unique #5039

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

matthewelwell
Copy link
Contributor

@matthewelwell matthewelwell commented Jan 24, 2025

Changes

Ensures uniqueness of project names in an organisation at the API level.

Note: I originally wrote this PR to enforce the uniqueness at the database level (see here), but I realised that this might affect integrations where we tag data with the project name (e.g. influx). As such, I have enforced this only at the API level. If we want to enforce it at the DB level later on, this will at least protect us from further exacerbating the database level issue.

Fixes #5038

How did you test this code?

Wrote 2 relevant unit tests.

@matthewelwell matthewelwell requested a review from a team as a code owner January 24, 2025 14:49
@matthewelwell matthewelwell requested review from gagantrivedi and removed request for a team January 24, 2025 14:49
Copy link

vercel bot commented Jan 24, 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 Jan 24, 2025 3:23pm
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Jan 24, 2025 3:23pm
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Jan 24, 2025 3:23pm

@github-actions github-actions bot added api Issue related to the REST API fix labels Jan 24, 2025
Copy link
Contributor

github-actions bot commented Jan 24, 2025

Docker builds report

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

Copy link
Contributor

github-actions bot commented Jan 24, 2025

Uffizzi Ephemeral Environment deployment-60254

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

📄 View Application Logs etc.

What is Uffizzi? Learn more!

@github-actions github-actions bot added fix and removed fix labels Jan 24, 2025
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.40%. Comparing base (2faca89) to head (68a83a0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5039   +/-   ##
=======================================
  Coverage   97.40%   97.40%           
=======================================
  Files        1193     1193           
  Lines       41675    41690   +15     
=======================================
+ Hits        40593    40608   +15     
  Misses       1082     1082           

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

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible to create multiple projects in an organisation with the same name
2 participants