Skip to content

feat(Feature Lifecycle): Update API with feature lifecycle info#7789

Draft
emyller wants to merge 2 commits into
mainfrom
feat/feature-lifecycle-api-endpoints
Draft

feat(Feature Lifecycle): Update API with feature lifecycle info#7789
emyller wants to merge 2 commits into
mainfrom
feat/feature-lifecycle-api-endpoints

Conversation

@emyller

@emyller emyller commented Jun 16, 2026

Copy link
Copy Markdown
Contributor
  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Closes #7433

  1. Introduces a new endpoint (also to MCP) /api/v1/projects/{project_pk}/features/lifecycle-status-counts/?environment=42
    {
      "NEW": 475,
      "LIVE": 734,
      "PERMANENT": 190,
      "STALE": 374,
      "NEEDS_MONITORING": 30,
      "TO_REMOVE": 197
    }
  2. Adds new query params on the existing GET /api/v1/projects/{project_pk}/features/ (list):
    • lifecycle_stage: one of stages below; requires environment.
    • evaluation_period_days:
      • A larger window means more caution, as fewer features classify as TO_REMOVE
      • A shorter window means more aggressive
  3. Adds a new attribute lifecycle_stage to the above list endpoint, and also to .../{feature_id} (retrieve), also carrying one of stages below.

Stages logical propositions are as follows:

State Condition
PERMANENT has_permanent_tag
LIVE ~has_permanent_tag AND ~has_stale_tag AND has_code_references
NEW ~has_permanent_tag AND ~has_stale_tag AND ~has_code_references
STALE ~has_permanent_tag AND has_stale_tag AND has_code_references
NEEDS_MONITORING ~has_permanent_tag AND has_stale_tag AND ~has_code_references AND evaluated_recently
TO_REMOVE ~has_permanent_tag AND has_stale_tag AND ~has_code_references AND ~evaluated_recently

How did you test this code?

  • New tests

@emyller emyller self-assigned this Jun 16, 2026
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jun 17, 2026 3:49am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ignored Ignored Preview Jun 17, 2026 3:49am
flagsmith-frontend-staging Ignored Ignored Preview Jun 17, 2026 3:49am

Request Review

@github-actions github-actions Bot added api Issue related to the REST API docs Documentation updates feature New feature or request and removed docs Documentation updates labels Jun 16, 2026
@kyle-ssg kyle-ssg mentioned this pull request Jun 16, 2026
4 tasks
@emyller emyller force-pushed the feat/feature-lifecycle-api-endpoints branch from 613356f to 69b78cd Compare June 17, 2026 03:34
@github-actions github-actions Bot added docs Documentation updates feature New feature or request and removed feature New feature or request docs Documentation updates labels Jun 17, 2026
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.11765% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.57%. Comparing base (e85f77b) to head (e75211b).

Files with missing lines Patch % Lines
api/app_analytics/analytics_db_service.py 83.33% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #7789    +/-   ##
========================================
  Coverage   98.57%   98.57%            
========================================
  Files        1464     1467     +3     
  Lines       56625    56959   +334     
========================================
+ Hits        55818    56149   +331     
- Misses        807      810     +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@emyller emyller force-pushed the feat/feature-lifecycle-api-endpoints branch from 3bbd50f to e75211b Compare June 17, 2026 03:49
@github-actions github-actions Bot added the docs Documentation updates label Jun 17, 2026
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request docs Documentation updates labels Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve API support for feature lifecycle dashboard

1 participant