Automatically archive orphaned feature segments if they are not part of any overrides

未关闭
#7,468 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
冷清
技术栈
python
领域
backend

调研方向

没有指定文件、测试或入口点。首先跟踪特性专用的 segment override 是如何创建、移除、归档和进行垃圾回收的,然后检查相关的持久化和环境文档行为。完成标准是,移除 override 后不再留下未被引用的 segment,同时可复用的 segment 仍然可用。

由索引模型根据 Issue 内容生成。

描述

How are you running Flagsmith
  • Self Hosted with Docker
  • Self Hosted with Kubernetes
  • SaaS at flagsmith.com
  • Some other way (add details in description below)
Describe the bug

When a feature specific segment continues to exist even when it is not associated with a feature flag anymore leading to environment document bloat. It requires users to manually clean it up after the feature has been rolled out fully which impacts UX, velocity and tech debt.

Steps To Reproduce
  1. Create new feature flag
  2. Create Feature specific segment override
  3. Remove the segment override
  4. The orphaned segment can still be found in the list of segments (referencing the feature flag for which it was created) creating bloat even after feature is rolled out.
Expected behavior
  • The orphaned feature specific segment should be automatically archived and eventually garbage collected.
  • Creating segments for frequent operations such as gradual rollout of a simple boolean is an overkill. (Gradual rollouts must be a slider option alongside the feature flag (similar to A/B test) without forcing the user to create a new segment)

The cleanest solution here is to inline the rules right next to the feature flag, instead of creating feature specific segment overrides for each feature. The goal of a segment is to be reusable across features. Feature specific segments slow down velocity and add to tech debt.

Screenshots

No response

主要语言
Python
星标
9.9k
派生
658
平均合并
1 天 15 小时
30 天内合并 PR
168

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Flagsmith/flagsmith 的其他 Issue

查看 Flagsmith/flagsmith 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。