RegEx for Segment Naming

Aperta
#8,155 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
full-stack

Direzione di ricerca

Non vengono indicati file, test o punti di ingresso. Inizia individuando le impostazioni delle convenzioni di denominazione e i percorsi per la creazione dei segmenti e la convalida dei rinomini, quindi segui il modo in cui vengono mostrati gli errori di convalida. Il lavoro è completato quando i criteri di accettazione funzionano per la configurazione, la creazione, gli aggiornamenti e un feedback chiaro.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Is your feature request related to a problem?

This is not related to a bug, this is an enhancement request.

Describe the solution you'd like.

I'd like to be able to enforce segment naming conventions using regular expressions. Ideally, it would work in the manner that regular expressions are being used to enforce feature naming.

Regular expressions for segment naming would provide business value

  • Reduced manual configuration: Eliminate need to create individual segments for each environment/team variant
  • Improved scalability: Support enterprise rollout across different teams
  • Consistency: Enforce organizational naming standards through pattern matching
  • Efficiency: Streamline onboarding of new teams and applications
Acceptance Criteria

AC1 – Administrator can configure a segment naming regex
Given I am an administrator with permission to manage naming policies
When I navigate to the naming convention settings
Then I can define and save a regular expression that will be used to validate segment names.

AC2 – Segment names are validated during creation
Given a segment naming regex has been configured
When a user creates a new segment
Then the system validates the segment name against the configured regex
And only allows creation if the name matches the pattern.

AC3 – Segment names are validated during updates
Given a segment naming regex has been configured
When a user renames an existing segment
Then the system validates the updated name against the configured regex
And prevents the update if the name does not match the pattern.

AC4 – Users receive clear validation feedback
Given a user enters a segment name that does not satisfy the configured regex
When validation occurs
Then the user is shown a clear error message indicating the name is invalid
And the message includes the expected naming format or pattern description.
Example message:
"Segment names must follow the format -- (e.g., dx-prod-reporting)."

Describe alternatives you've considered

Manual enforcement is one option. This option works, and is what we use, but involves a bit of guesswork (what is the convention?)

Additional context

Thank you! This is related to [email protected] (One Call) but that user name is unable to create a issue.

Lingua principale
Python
Stelle
9.9k
Fork
658
Merge medio
1g 15h
PR unite (30g)
168

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Flagsmith/flagsmith

Tutte le issue di Flagsmith/flagsmith

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.