RegEx for Segment Naming

Đang mở
#8,155 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
full-stack

Hướng nghiên cứu

Không có tệp, bài kiểm thử hoặc điểm vào nào được nêu tên. Hãy bắt đầu bằng cách xác định các thiết lập quy ước đặt tên và các đường dẫn tạo segment cũng như xác thực việc đổi tên, sau đó theo dõi cách các lỗi xác thực được hiển thị. Được xem là hoàn tất khi các tiêu chí chấp nhận hoạt động cho cấu hình, việc tạo, các cập nhật và phản hồi rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
9.9k
Fork
658
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
168

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Flagsmith/flagsmith

Tất cả issue của Flagsmith/flagsmith

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.