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

"Restore your working copy" process is broken #44

Open
pixelzoom opened this issue Apr 23, 2017 · 19 comments
Open

"Restore your working copy" process is broken #44

pixelzoom opened this issue Apr 23, 2017 · 19 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Apr 23, 2017

Deploying a PhET Simulation says:

Step 8. Restore your working copy

  • Check out master for dependencies: grunt checkout-master
  • Run again to prune and update node modules: grunt checkout-master, Skip This Step if you are using a chipper sha that is newer than Jan 24th, 2017.
  • Check out master for the sim repo: git checkout master

Following those instructions fails. Here's an example after doing a maintenance release of function-builder 1.0:

% cd function-builder
% git checkout 1.0
% grunt checkout-shas
// do a maintenance release here
% grunt checkout-master
% grunt checkout-master 
Loading "Gruntfile.js" tasks...ERROR
>> Error: Cannot find module 'istanbul'
Warning: Task "checkout-master" not found. Use --force to continue.

Aborted due to warnings.
%
@pixelzoom
Copy link
Contributor Author

Here's a short-term workaround, which requires manually fixing chipper before doing the second checkout-master.

% cd function-builder
% git checkout 1.0
% grunt checkout-shas
// do a maintenance release here
% grunt checkout-master
% cd ../chipper
% npm prune
% npm update
% cd ../function-builder
% grunt checkout-master 
% git checkout master

@samreid
Copy link
Member

samreid commented Apr 24, 2017

What if we bail on npm and just check everything in to sherpa? (We would still need to npm update after checkout-shas to support legacy versions, but going forward this process would be simpler.).

@samreid
Copy link
Member

samreid commented Apr 24, 2017

Or should we just paste the instructions with npm prune and update #44 (comment) into the instructions and call it good?

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Apr 24, 2017

First, I'd like to know why istanbul (code coverage tool) is necessary for the checkout-master task -- that makes no sense to me. Who added this dependency? What is it actually being used for?...

@samreid asked:

#44 (comment)

Ummm... No. Having to run checkout-master twice is already enough brain damage.

@pixelzoom pixelzoom self-assigned this Apr 24, 2017
@samreid
Copy link
Member

samreid commented Apr 24, 2017

Ummm... No. Having to run checkout-master twice is already enough brain damage.

For future versions (not legacy), then you would have to run checkout-master once. What is the argument against bailing on npm?

@samreid
Copy link
Member

samreid commented Apr 24, 2017

Who added this dependency? What is it actually being used for?

@jonathanolson added istanbul as a code coverage tool which runs during the build step.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Apr 24, 2017

What is the argument against bailing on npm?

I'm not clear on what you're suggesting. Are you suggesting that we manage (in sherpa) everything that npm currently installs? That sounds like a lot of work. And we have enough trouble staying up-to-date with the relatively small number of 3rd-party libs that we currently use.

@jonathanolson added istanbul as a code coverage tool which runs during the build step

Presumably that means during the build task. Why is it required for checkout-master?

@pixelzoom
Copy link
Contributor Author

@jonathanolson added istanbul as a code coverage tool which runs during the build step

@jonathanolson:
(1) How is istanbul adding value to the build task?
(2) Why is istanbul required for the checkout-master task?

@samreid
Copy link
Member

samreid commented Apr 24, 2017

Are you suggesting that we manage (in sherpa) everything that npm currently installs? That sounds like a lot of work.

Yes, that was the main idea. Grunt may make that impossible though, depending on how it works. (may require local node_modules).

Presumably that means during the build task. Why is it required for checkout-master?

It could be that it gets resolved during module-load time and if any module fails to load, then the process fails.

@jonathanolson
Copy link
Contributor

How is istanbul adding value to the build task?

It allows checking code coverage for sims, which has been helpful.

Why is istanbul required for the checkout-master task?

The main gruntfile requires generateCoverage, which depends on istanbul. Most Node things assume that the node_modules has things from package.json installed.

Presumably this shouldn't be an issue with "npm prune" and "npm update". For a while I've recommended against using chipper's "checkout-master" since it can have this issue, and instead recommend perennial's "grunt checkout-master --repo=...".

@jonathanolson jonathanolson removed their assignment Apr 24, 2017
@samreid
Copy link
Member

samreid commented Apr 24, 2017

perennial sounds like a great solution to this. @pixelzoom can you test it out and if it works well, update the instructions?

@samreid samreid removed their assignment Apr 24, 2017
@pixelzoom
Copy link
Contributor Author

pixelzoom commented Apr 24, 2017

@jonathanolson said:

For a while I've recommended against using chipper's "checkout-master" since it can have this issue, and instead recommend perennial's "grunt checkout-master --repo=...".

@samreid said:

perennial sounds like a great solution to this.

perennial has its own checkout-master task, with different options and a different .js file?!? That's not confusing at all :) Having 2 different tasks with the same name, and no documentation in their .js file to indicate why they are different, does not sound like a "great solution". But I'll take it for a test drive.

@jonathanolson
Copy link
Contributor

perennial has its own checkout-master task, with different options and a different .js file?!? That's not confusing at all :) Having 2 different tasks with the same name, and no documentation in their .js file to indicate why they are different, does not sound like a "great solution".

Agreed, definitely not ideal. I think we should have one solution in perennial for this, since we really should be running the same code both directions (for master=>SHAs and SHAs=>master), instead of running two different chipper versions.

@samreid
Copy link
Member

samreid commented Apr 24, 2017

So maybe delete the chipper one and update instructions and processes to rely on the perennial one?

@pixelzoom
Copy link
Contributor Author

Adding developer-meeting label to discuss, so we can (a) make all developers aware that it's broken, (b) decide how to fix it, and (c) decide who will fix it.

@pixelzoom
Copy link
Contributor Author

@jonathanolson pointed out that the workaround in #44 (comment) can fail in some circumstances. You really need to npm prune and npm install after checkout-shas.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Apr 27, 2017

4/27/17 dev meeting notes:

Sounds like we should ditch the chipper checkout-shas and checkout-master tasks, and use perennial's checkout-shas, with npm install and npm update added (which probably requires changes to builder-server, since it's doing those npm operations elsewhere).

Deferred to 5/4/17 dev meeting, when @mattpen is here, since he's done some working on perennial and build-server.

@Denz1994
Copy link
Contributor

Assigning myself to review this issue's process in an effort to learn more about the build process, as per suggestion by @ariel-phet.

@Denz1994 Denz1994 self-assigned this Apr 27, 2017
@jonathanolson
Copy link
Contributor

Will plan to move to perennial's version. I'll update documentation and process documents.

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

No branches or pull requests

4 participants