Skip to content

Conversation

@vvihorev
Copy link
Contributor

@vvihorev vvihorev commented Apr 15, 2025

Problem

It is impossible to query V3 annotator reports using the SDK. Reports V1 can be queried, but are not created since 11/05/2024.

Solution

Add a new top-level command and an action for V3 annotator reports: darwin report annotators.

Instead of requesting an annotator report synchronously, start a report job, and poll for results with exponential backoff. For now, log the id of the created job and raise an error if the happy path fails.

Changelog

Added top-level report command, added report annotators command to query V3 annotator reports

@vvihorev vvihorev self-assigned this Apr 15, 2025
@linear
Copy link

linear bot commented Apr 15, 2025

Copy link
Collaborator

@umbertoDifa umbertoDifa left a comment

Choose a reason for hiding this comment

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

Looks good! I've added a few discussion point we should discuss about

@umbertoDifa umbertoDifa requested a review from Copilot April 16, 2025 14:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

Comments suppressed due to low confidence (2)

darwin/client.py:720

  • The symbol 'urljoin' is used but not imported; add 'from urllib.parse import urljoin' at the top of the file.
raise JobPendingException(f"Polling for generated report results timed out, job status can be requested manually: {urljoin(self.url, job_status_url)}")

tests/darwin/client_test.py:826

  • The exception 'NotFound' is used in the test but does not appear to be imported or defined; ensure it is imported from the appropriate module or replace it with the correct exception.
with pytest.raises(NotFound):

@vvihorev vvihorev force-pushed the dar-6195-add-ability-to-query-reports_v3-through-the-sdk branch from f1ebfd2 to fbf580b Compare April 17, 2025 08:45
Copy link
Collaborator

@umbertoDifa umbertoDifa left a comment

Choose a reason for hiding this comment

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

LGTM

@AndriiKlymchuk
Copy link
Contributor

Looks good

vvihorev

This comment was marked as resolved.

@vvihorev vvihorev merged commit c0d6ac5 into master Apr 17, 2025
24 checks passed
@vvihorev vvihorev deleted the dar-6195-add-ability-to-query-reports_v3-through-the-sdk branch April 17, 2025 11:56
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.

4 participants