Skip to content

feat: return experiment status counts along paginated list#7625

Merged
Zaimwa9 merged 6 commits into
mainfrom
feat/add-experiment-status-count
May 29, 2026
Merged

feat: return experiment status counts along paginated list#7625
Zaimwa9 merged 6 commits into
mainfrom
feat/add-experiment-status-count

Conversation

@Zaimwa9
Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 commented May 28, 2026

Thanks for submitting a PR! Please check the boxes below:

  • 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

  • Added status_counts object to pass each status number of experiments:
{
  created: 3,
  running: 2,
  completed: 54
}

How did you test this code?

  • tests

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner May 28, 2026 12:57
@Zaimwa9 Zaimwa9 requested review from khvn26 and removed request for a team May 28, 2026 12:57
@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

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

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview May 28, 2026 1:19pm
flagsmith-frontend-preview Ignored Ignored Preview May 28, 2026 1:19pm
flagsmith-frontend-staging Ignored Ignored Preview May 28, 2026 1:19pm

Request Review

@github-actions github-actions Bot added api Issue related to the REST API feature New feature or request labels May 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

Docker builds report

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

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds status counts to the experiment list endpoint and includes corresponding unit tests. The feedback highlights that the search query (q) is currently ignored when calculating status counts, which can lead to incorrect counts in the UI. Additionally, a defensive check is recommended to ensure response.data is a dictionary before modification, along with an additional unit test to verify status counts when searching.

Comment thread api/experimentation/views.py
Comment thread api/tests/unit/experimentation/test_experiment_views.py
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.52%. Comparing base (588fa17) to head (8a5033e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7625   +/-   ##
=======================================
  Coverage   98.52%   98.52%           
=======================================
  Files        1439     1439           
  Lines       54787    54822   +35     
=======================================
+ Hits        53977    54012   +35     
  Misses        810      810           

☔ View full report in Codecov by Sentry.
📢 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.3 seconds
commit  c788300
info  🔄 Run: #17068 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  39.2 seconds
commit  c788300
info  🔄 Run: #17068 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  38.9 seconds
commit  eee7219
info  🔄 Run: #17067 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.7 seconds
commit  eee7219
info  🔄 Run: #17067 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  50.7 seconds
commit  eee7219
info  🔄 Run: #17067 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  49.4 seconds
commit  eee7219
info  🔄 Run: #17067 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  39 seconds
commit  c788300
info  🔄 Run: #17068 (attempt 2)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  39.1 seconds
commit  8a5033e
info  🔄 Run: #17073 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.4 seconds
commit  c788300
info  🔄 Run: #17068 (attempt 2)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  43.8 seconds
commit  8a5033e
info  🔄 Run: #17073 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  38.8 seconds
commit  8a5033e
info  🔄 Run: #17073 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  36.6 seconds
commit  8a5033e
info  🔄 Run: #17073 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  37.7 seconds
commit  8a5033e
info  🔄 Run: #17073 (attempt 2)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.4 seconds
commit  8a5033e
info  🔄 Run: #17073 (attempt 2)

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

passed  19 passed

Details

stats  19 tests across 15 suites
duration  1 minute, 8 seconds
commit  8a5033e
info  🔄 Run: #17073 (attempt 3)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  37.8 seconds
commit  8a5033e
info  🔄 Run: #17073 (attempt 3)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  42.8 seconds
commit  8a5033e
info  🔄 Run: #17073 (attempt 3)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  39.7 seconds
commit  8a5033e
info  🔄 Run: #17073 (attempt 3)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

Visual Regression

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

@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels May 28, 2026
@Zaimwa9 Zaimwa9 requested review from gagantrivedi and removed request for khvn26 May 28, 2026 13:36
@Zaimwa9 Zaimwa9 merged commit aa85699 into main May 29, 2026
53 of 61 checks passed
@Zaimwa9 Zaimwa9 deleted the feat/add-experiment-status-count branch May 29, 2026 08:57
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.

2 participants