Skip to content

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 ListJobs 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 job in the jobs list. API 2.2 format truncates tasks and job_cluster to 100 elements. The extended ListJobs logic calls GetJob for each job in the list to populate the full list of tasks and job_clusters.

The code consumes generator that is returned from super().list 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.

@github-actions
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: 889
  • Commit SHA: f7a9f0ad8c284e48e80ddc246aabb9cf665c341d

Checks will be approved automatically on success.

github-merge-queue bot pushed a commit that referenced this pull request Feb 21, 2025
…896)

## What changes are proposed in this pull request?
Introduces logic in the extension for jobs ListJobs 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 job in the jobs list. API 2.2
format truncates tasks and job_cluster to 100 elements. The extended
ListJobs logic calls GetJob for each job in the list to populate the
full list of tasks and job_clusters.

The code consumes generator that is returned from `super().list` 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.

## Notes
Copy of this other PR
#889

The formatter is inconsistent and the original author could make it
work.

---------

Co-authored-by: Giorgi Kikolashvili <[email protected]>
@gkiko10 gkiko10 closed this Feb 21, 2025
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