Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Internal] Update Jobs list_runs function to support paginated responses #890

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gkiko10
Copy link
Contributor

@gkiko10 gkiko10 commented Feb 17, 2025

What changes are proposed in this pull request?

Introduces logic in the extension for jobs ListRuns call. The extended logic accounts for the new response format of API 2.2. API 2.1 format returns all tasks and job_cluster for each runs in the runs list. API 2.2 format truncates tasks and job_cluster to 100 elements. The extended ListRuns logic calls GetRun for each run in the list to populate the full list of tasks and job_clusters.

The code consumes generator that is returned from super().list_runs and it produces generator as well.

How is this tested?

Unit tests and manual tests. Manual tests were done in two modes: using API 2.2 and using API 2.1. So this code is code is compatible with both API versions.

@gkiko10 gkiko10 deployed to test-trigger-is February 21, 2025 16:58 — with GitHub Actions Active
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 890
  • Commit SHA: b2e6db8684483d6e63c4d91e51c7ad22a8bdfe75

Checks will be approved automatically on success.

Sign up for free to 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.

2 participants