Skip to content

feat(platform): add 'for_organization' to list all runs of an org - #510

Merged
akunft merged 4 commits into
mainfrom
feat/list_runs_for_org
Mar 31, 2026
Merged

feat(platform): add 'for_organization' to list all runs of an org#510
akunft merged 4 commits into
mainfrom
feat/list_runs_for_org

Conversation

@akunft

@akunftakunft commented Mar 25, 2026

Copy link
Copy Markdown
Collaborator

Adds for_organization parameter to Runs.list and Runs.list_data: If set, returns all runs triggered by users of the specified organization that match the filter criteria. If None, only the runs of the user are returned.

  • Now also allows to set for_organization in the service & cli

CopilotAI review requested due to automatic review settings March 25, 2026 21:32

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an organization-scoped filter to the Platform Runs resource so admins/superadmins can list runs for a whole organization, not just the current user, while keeping existing filters and pagination behavior.

Changes:

  • Added for_organization parameter to Runs.list() and Runs.list_data() and propagated it into the API call.
  • Updated unit test coverage to assert for_organization is passed through when combining all filters.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
src/aignostics/platform/resources/runs.pyExposes for_organization on Runs.list / Runs.list_data and forwards it to list_runs_v1_runs_get.
tests/aignostics/platform/resources/runs_test.pyExtends the “all filters combined” test to include for_organization.

Comment threadsrc/aignostics/platform/resources/runs.py
Comment threadsrc/aignostics/platform/resources/runs.py Outdated
@codecov

codecovBot commented Mar 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing linesPatch %Lines
src/aignostics/application/_service.py0.00%2 Missing ⚠️
Files with missing linesCoverage Δ
src/aignostics/application/_cli.py70.30% <100.00%> (-1.79%)⬇️
src/aignostics/platform/__init__.py100.00% <100.00%> (ø)
src/aignostics/platform/resources/runs.py65.21% <ø> (ø)
src/aignostics/application/_service.py60.96% <0.00%> (-3.44%)⬇️

... and 4 files with indirect coverage changes

@akunft

Copy link
Copy Markdown
CollaboratorAuthor

From offline discussion: Make available in CLI (if not auto-discovered).

CopilotAI review requested due to automatic review settings March 26, 2026 17:18
@akunft
akunftforce-pushed the feat/list_runs_for_org branch from 00153c7 to c136907CompareMarch 26, 2026 17:18

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment threadsrc/aignostics/application/_cli.py Outdated
Comment threadsrc/aignostics/application/_cli.py Outdated
@akunft
akunftforce-pushed the feat/list_runs_for_org branch from c136907 to 8aaf95dCompareMarch 30, 2026 12:51
@sonarqubecloud

Copy link
Copy Markdown

@akunft
akunft requested a review from arne-aignxMarch 30, 2026 13:32
@arne-aignx

Copy link
Copy Markdown
Collaborator

LGTM.
Nice solution for the user error messages depending on the scope

@akunft
akunft merged commit 3f06055 into mainMar 31, 2026
28 of 29 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@akunft@arne-aignx