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] GetRun logic paginates more arrays #1132

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

Conversation

gkiko10
Copy link
Contributor

@gkiko10 gkiko10 commented Jan 21, 2025

What changes are proposed in this pull request?

The existing code only paginates tasks and iterations. With this PR we update the logic to also paginate job_clusters, job_parameters and repair_history. This changes are needed for Jobs API 2.2 compatibility.

How is this tested?

I enabled API 2.2 calls by modifying URL string /api/2.2/jobs/runs/get in service/jobs/impl.go. Then I ran unit test from service/jobs/ext_api_test.go

@gkiko10 gkiko10 temporarily deployed to test-trigger-is January 21, 2025 12:32 — with GitHub Actions Inactive
@renaudhartert-db renaudhartert-db self-requested a review February 3, 2025 14:28
Comment on lines +29 to +32
run.JobClusters = append(run.JobClusters, nextRun.JobClusters...)
run.JobParameters = append(run.JobParameters, nextRun.JobParameters...)
run.RepairHistory = append(run.RepairHistory, nextRun.RepairHistory...)
run.NextPageToken = nextRun.NextPageToken
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a comment to explain why we are doing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link

github-actions bot commented Feb 4, 2025

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-go

Inputs:

  • PR number: 1132
  • Commit SHA: a0100773ac14d51bafe177f0e88f4cf42a2e4b72

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