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

Deprecation notice: Treeherder /jobdetail/ endpoint for uploaded artifacts #43

Closed
sarah-clements opened this issue Apr 3, 2020 · 2 comments
Assignees

Comments

@sarah-clements
Copy link

@sarah-clements sarah-clements commented Apr 3, 2020

Treeherder will stop storing uploaded artifacts in our JobDetail table since its a write intensive action and the artifacts can be retrieved via a taskcluster API. Tentative deadline is April 30th.

What you'll need to do:

  • Stop using the /jobdetail/ endpoint to retrieve the uploaded artifacts.

  • Instead, extract task_id and retry_id (synonymous with run) from any of the /jobs/ endpoints (you won't need job_id anymore if you're only using it for the /jobdetail/ endpoint).

  • For UI code, you'll want to generate the url like this to retrieve artifacts (to retrieve all or by specific artifact value/name, depending on your needs). Usehttps://firefox-ci-tc.services.mozilla.com as the rootUrl and the taskcluster-lib-urls library.

  • To format the code in the UI so it has the same keys as what the /jobdetail/ endpoint returns you'll want a helper like this one.

  • For python code, the equivalent is here

Let me know if you have questions :)

@mnoorenberghe
Copy link
Owner

@mnoorenberghe mnoorenberghe commented Apr 5, 2020

I believe I addressed this now in 86fe20e and 28c033d. Let me know if I missed anything. It's a bit unfortunate I have to make an artifact request per job now whereas before I could get the artifacts for multiple jobs in one request. Hopefully it's not too many simultaneous requests to TC at once.

@sarah-clements
Copy link
Author

@sarah-clements sarah-clements commented Apr 7, 2020

I believe I addressed this now in 86fe20e and 28c033d. Let me know if I missed anything.

I took a look and it seems fine. One thing you might want to look into is a continuationToken. We used that in fetchArtifacts in handler.py (see link in my initial post). More details here: https://docs.taskcluster.net/docs/reference/platform/queue/api#listArtifacts

It's a bit unfortunate I have to make an artifact request per job now whereas before I could get the artifacts for multiple jobs in one request. Hopefully it's not too many simultaneous requests to TC at once.

We're not querying the taskcluster API in the same way you are, so your best bet is to ask someone in the #taskcluster matrix channel. You might also want to ask if you're better off using the taskcluster-lib-urls library rather than hard-coding the API url (due to any versioning changes in the future).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants