Skip to content

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

Open
emyller wants to merge 19 commits into
mainfrom
feat/feature-lifecycle-api-endpoints
Open

feat(Feature Lifecycle): Update API with feature lifecycle info#7789
emyller wants to merge 19 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/environments/{environment}/feature-lifecycle-counts/
    {
      "NEW": 475,
      "LIVE": 734,
      "PERMANENT": 190,
      "STALE": 374,
      "NEEDS_MONITORING": 30,
      "TO_REMOVE": 197
    }
  2. Adds new query params to the existing GET /api/v1/projects/{project_pk}/features/ (list):
    • lifecycle_stage: one of stages below; requires environment.
  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

Note

If you've read thus far, here's a pro-tip! :chest:
Reviewing is easier if you split: (comments go to PR, not commits)

  • Part 1: InfluxDB API refactor (to enable tests) — it revealed we need to rewrite it, or maybe invest in something else.
  • Part 2: Feature Lifecycle stage counts API (to feed the count badges in the sidebar.
  • Part 3: Extend the feature list and retrieve endpoints with lifecycle stage information.
  • Part 4: Add filter by lifecycle stage capability to the feature list endpoint.

@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.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Jun 22, 2026 9:28pm
flagsmith-frontend-preview Ignored Ignored Preview Jun 22, 2026 9:28pm
flagsmith-frontend-staging Ignored Ignored Preview Jun 22, 2026 9:28pm

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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.60%. Comparing base (d991940) to head (6b7c8d5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #7789    +/-   ##
========================================
  Coverage   98.59%   98.60%            
========================================
  Files        1472     1480     +8     
  Lines       57370    57750   +380     
========================================
+ Hits        56564    56944   +380     
  Misses        806      806            

☔ 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
@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 22, 2026
@emyller emyller marked this pull request as ready for review June 22, 2026 02:13
@emyller emyller requested review from a team as code owners June 22, 2026 02:13
@emyller emyller requested review from Holmus and khvn26 and removed request for a team June 22, 2026 02:13
@flagsmith-engineering flagsmith-engineering Bot assigned khvn26 and Holmus and unassigned khvn26 Jun 22, 2026
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Jun 22, 2026
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-7789 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-7789 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-7789 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-7789 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7789 Finished ✅ Results

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  32.5 seconds
commit  76de9b7
info  🔄 Run: #17696 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  43 seconds
commit  76de9b7
info  🔄 Run: #17696 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 4 suites
duration  34.4 seconds
commit  76de9b7
info  🔄 Run: #17696 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  1 minute, 7 seconds
commit  76de9b7
info  🔄 Run: #17696 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  21 passed

Details

stats  21 tests across 16 suites
duration  1 minute, 20 seconds
commit  6b7c8d5
info  🔄 Run: #17727 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  44.3 seconds
commit  6b7c8d5
info  🔄 Run: #17727 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.3 seconds
commit  6b7c8d5
info  🔄 Run: #17727 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  56.1 seconds
commit  6b7c8d5
info  🔄 Run: #17727 (attempt 1)

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

@manos-saratsis

This comment was marked as spam.

@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 22, 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

4 participants