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

Add unique constraint on group name #9827

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

flomonster
Copy link
Contributor

@flomonster flomonster commented Nov 22, 2024

Without this constraint some commands does not work properly like editoast group include.

@flomonster flomonster requested a review from a team as a code owner November 22, 2024 15:25
@github-actions github-actions bot added the area:editoast Work on Editoast Service label Nov 22, 2024
@flomonster flomonster enabled auto-merge November 22, 2024 15:28
@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.78%. Comparing base (28c965c) to head (922d8df).
Report is 1 commits behind head on dev.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #9827      +/-   ##
==========================================
- Coverage   37.79%   37.78%   -0.02%     
==========================================
  Files         994      994              
  Lines       91192    91192              
  Branches     1176     1176              
==========================================
- Hits        34468    34453      -15     
- Misses      56270    56285      +15     
  Partials      454      454              
Flag Coverage Δ
editoast 72.95% <ø> (-0.06%) ⬇️
front 20.09% <ø> (ø)
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 86.74% <ø> (ø)

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.


🚨 Try these New Features:

@flomonster flomonster added this pull request to the merge queue Nov 22, 2024
Merged via the queue into dev with commit 027896f Nov 22, 2024
27 checks passed
@flomonster flomonster deleted the fam/add-unique-constraint-group-name branch November 22, 2024 16:15
@leovalais
Copy link
Contributor

Looks fine to me, but do we really want groups to have a unique name? I hardly believe that a purely technical constraint like the CLI API is a good enough reason to ask users to never duplicate group names.

This also raises some UX questions: I (a lambda user) create a group with the name "My Group", which gets rejected. How do we display the error? Do we just show "A group named My Group already exists. Please choose another name."? (We can't show the group owner.) This is rather classic for user IDs and we can easily understand why, but for group names, as a user, I can hardly see the rationale behind that.

Wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editoast Work on Editoast Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants