Closed Bug 1259203 Opened 9 years ago Closed 9 years ago

Use npm shrinkwrap for all services

Categories

(Taskcluster :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: bstack)

References

Details

This will help us be more deliberate about the versions of dependencies we use in production, and when those change (in fact, it will let us change them more often, not less often!) https://github.com/taskcluster/taskcluster-queue/pull/85
secrets is updated
secrets had to be rolled back, because devDependencies stink. The story is, Heroku uses NPM_CONFIG_PRODUCTION=true, which causes `npm install` to skip its usual practice of installing devDependencies for the current project. Travis doesn't do this (since it needs those deps) nor do developers. So this only fails in production. https://github.com/taskcluster/taskcluster-docs/pull/84 adds a note about not using devDependencies at all.
Have I expressed my hatred for npm? (v0.12.9) dustin@dustin-tc-devel ~/p/taskcluster-auth [master*] $ npm shrinkwrap npm ERR! Linux 3.13.0-83-generic npm ERR! argv "/home/dustin/.nvm/versions/node/v0.12.9/bin/node" "/home/dustin/.nvm/versions/node/v0.12.9/bin/npm" "shrinkwrap" npm ERR! node v0.12.9 npm ERR! npm v2.14.9 npm ERR! Problems were encountered npm ERR! Please correct and try again. npm ERR! missing: taskcluster-lib-stats@~0.8, required by azure-entities@0.9.1 npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Please include the following file with any support request: npm ERR! /home/dustin/p/taskcluster-auth/npm-debug.log but add that package and (v0.12.9) dustin@dustin-tc-devel ~/p/taskcluster-auth [master*] $ npm shrinkwrap npm ERR! Linux 3.13.0-83-generic npm ERR! argv "/home/dustin/.nvm/versions/node/v0.12.9/bin/node" "/home/dustin/.nvm/versions/node/v0.12.9/bin/npm" "shrinkwrap" npm ERR! node v0.12.9 npm ERR! npm v2.14.9 npm ERR! Problems were encountered npm ERR! Please correct and try again. npm ERR! extraneous: taskcluster-lib-stats@0.8.8 /home/dustin/p/taskcluster-auth/node_modules/taskcluster-lib-stats npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Please include the following file with any support request: npm ERR! /home/dustin/p/taskcluster-auth/npm-debug.log I suspect that's a peer dependency of azure-entities. So I guess shrinkwrap doesn't support peer dependencies either. This sucks.
(and yes, I tried that with node 4, too)
Jonas, I'm sorry to keep coming crying to you with "npm be crazy, yo!", but.. what would you recommend here? Is node 5 / npm 3 likely to be better? If so, what other speedbumps am I likely to hit?
Flags: needinfo?(jopsen)
@dustin, I would recommend not having these as direct dependencies: https://github.com/taskcluster/taskcluster-auth/blob/790974932c1f8cc8949c0a8a340a83dcc0ad0f01/package.json#L38-L42 Use taskcluster-base, get the latest versions and fix issues related to that. Then you shouldn't see these issues. because queue doesn't have them. Oh, and consider, hooking it up with babel-compile and going directly to node 5. When refactoring there is little point in trying to make things work with old versions.
Flags: needinfo?(jopsen)
I'm in way over my head here. Brian is, I think, better positioned to move this forward.
Assignee: dustin → bstack
tc-purge-cache and tc-auth are now live in production with shrinkwrap. Going to go through in a bit and inventory what we have left that should be updated.
See Also: → 1262477
This is now complete for all services listed on the wiki that we haven't deprecated with the exception of cloud-mirror. It will be complete as soon as https://github.com/taskcluster/cloud-mirror/pull/13 lands.
::hero::
cloud-mirror has landed the revision with npm-shrinkwrap! We're done here.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.