RegEx for Segment Naming

Abierto
#8,155 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python
Área
full-stack

Línea de trabajo

No se nombran archivos, pruebas ni puntos de entrada. Empieza localizando la configuración de las convenciones de nombres y las rutas de creación de segmentos y validación de renombrados; después, sigue cómo se muestran los errores de validación. Se considerará terminado cuando los criterios de aceptación funcionen para la configuración, la creación, las actualizaciones y unos comentarios claros.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
9.9k
Forks
658
Merge medio
1 d 15 h
PR fusionados (30 d)
168

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Flagsmith/flagsmith

Todos los issues de Flagsmith/flagsmith

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.