Closed Bug 1242877 Opened 10 years ago Closed 10 years ago

taskcluster-npm-cache supports using newer taskcluster-client for buildURL API

Categories

(Taskcluster :: Services, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla46

People

(Reporter: edgar, Assigned: edgar)

References

Details

Attachments

(2 files)

+++ This bug was initially created as a follow-up of Bug #1238469 Comment #38 +++ In https://github.com/taskcluster/taskcluster-client/commit/b0f7e20fd34adc3d4b0cf596dd9531fbd2014815, taskcluster-client buildUrl API formalizes the parameter, so that 'public/node_modules.tar.gz'[1] is formalized to 'public%2Fnode_modules.tar.gz'. Look like we need to separated `public` and `node_modules.tar.gz` as two parameters in taskcluster-npm-cache-get.js , e.g. let url = await queue.buildUrl( queue.getLatestArtifact, indexedTask.taskId, 'public', 'node_modules.tar.gz' ); [1] https://github.com/taskcluster/npm-cache/blob/52ecb6bbc44ebd6f16b69e97cb2c9476fd7f012d/src/bin/taskcluster-npm-cache-get.js#L90
Summary: taskcluster-npm-cache supports newer taskcluster-client for buildURL usage → taskcluster-npm-cache supports using newer taskcluster-client for buildURL API
Comment on attachment 8712044 [details] [review] [npm-cache:master] PR#6, taskcluster-npm-cache supports using newer taskcluster-client for buildURL API Hi Aus, may I have your review? Thank you.
Attachment #8712044 - Flags: review?(aus)
Attachment #8712044 - Flags: review?(aus) → review+
Commit: https://github.com/taskcluster/npm-cache/commit/9305605e389b91c728d04e7f80bcba651b31dfd0 I'll file a bug to release new docker worker images based on this new npm-cache client.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Blocks: 1243085
Assignee: nobody → echen
(In reply to Edgar Chen [:edgar][:echen] from comment #0) > +++ This bug was initially created as a follow-up of Bug #1238469 Comment > #38 +++ > > In > https://github.com/taskcluster/taskcluster-client/commit/ > b0f7e20fd34adc3d4b0cf596dd9531fbd2014815, taskcluster-client buildUrl API > formalizes the parameter, so that 'public/node_modules.tar.gz'[1] is > formalized to 'public%2Fnode_modules.tar.gz'. Look like we need to separated > `public` and `node_modules.tar.gz` as two parameters in > taskcluster-npm-cache-get.js > , e.g. > > let url = await queue.buildUrl( > queue.getLatestArtifact, > indexedTask.taskId, > 'public', > 'node_modules.tar.gz' > ); > > [1] > https://github.com/taskcluster/npm-cache/blob/ > 52ecb6bbc44ebd6f16b69e97cb2c9476fd7f012d/src/bin/taskcluster-npm-cache-get. > js#L90 I found another problem: getLatestArtifact takes only two arguments [1] :( Hi :aus, :jonasf, could you help to provide some advice on this? Thank you. https://github.com/taskcluster/taskcluster-client/blob/master/lib/apis.js#L1381-L1398
Status: RESOLVED → REOPENED
Flags: needinfo?(jopsen)
Flags: needinfo?(aus)
Resolution: FIXED → ---
It takes taskId and artifact name. Hint, the artifact folder is part of the artifact name: > let url = await queue.buildUrl( > queue.getLatestArtifact, > indexedTask.taskId, > 'public/node_modules.tar.gz' > ); See: http://docs.taskcluster.net/queue/api-docs/#getLatestArtifact I hope that helps.
Flags: needinfo?(jopsen)
Comment on attachment 8713101 [details] [review] [npm-cache:master] PR#7, Rename the downloaded file to node_modules.tar.gz Separating the parameter doesn't work because the getLatestArtifact() takes only two arguments [1]. We still need to use public/node_modules.tar.gz for artifact name. Due to buildUrl() formalizes the name to public%2Fnode_modules.tar.gz, we have to rename the downloaded file to node_modules.tar.gz in order to make it can be extracted correctly. This time, I tested it with packaging, installing the changed code in tester image and running gaia test locally. I am pretty sure this patch fixes the problem. May I have your review again, Aus? Thank you. [1] http://docs.taskcluster.net/queue/api-docs/#getLatestArtifact
Flags: needinfo?(aus)
Attachment #8713101 - Flags: review?(aus)
Comment on attachment 8713101 [details] [review] [npm-cache:master] PR#7, Rename the downloaded file to node_modules.tar.gz Wow, that's ummm... weird. Well, it will be good to see this fixed, it should get rid of intermittent issues we're seeing with npm-cache currently.
Attachment #8713101 - Flags: review?(aus) → review+
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
Thank you, Aus!
Moving closed bugs across to new Bugzilla product "TaskCluster".
Component: TaskCluster → Integration
Product: Testing → Taskcluster
Target Milestone: --- → mozilla46
Component: Integration → Services
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: