-
Notifications
You must be signed in to change notification settings - Fork 14
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
Build PhET and PhET-iO brands together #567
Comments
I have a faint recollection that someone within the last 2 weeks was trying to run 2 requirejs builds and we needed to clear it out somehow? Maybe it was @zepumph? I'm asking because it could impact how we can use requirejs during chipper steps. |
It was not me. |
@kathy-phet can we put the "PhET" and "PhET-iO" builds side by side like this? https://phet.colorado.edu/sims/html/states-of-matter/1.0.2/phet |
Not with the current licensing and contract statements - these say that the sims at the phet.colorado.edu website are CC-BY. It was the easiest way to be clear about which sims were available under our CC-BY license. So if you want to do this, we will need to revisit. Why do you want to do this approach -- since its not at phet-io? It seems like it would be confusing to clients, and could cause some regular users to run the phet-io sims out of compliance with the license. |
Builds on spot could presumably live side-by-side in the same directory, e.g.:
But "grunt deploy-production" should deploy them to different production servers, as @kathy-phet indicated in #567 (comment). |
Or if we put brands in subdirectories on spot, as discussed in yesterday's dev meet:
|
We are looking at ways to unify the phet and phet-io development/build/test/deployment process. One recommendation from yesterdays development meeting was that the build process should build both brands during each build. I'm mainly trying to enumerate constraints and see what's possible. |
Brainstorming: Perhaps we can publish phet-io and phet simulations on spot and phet-io.colorado.edu. If the only restriction is not having the io simulations accessible from phet.colorado.edu, perhaps they could be blacklisted with an apache directive. Then the same build/deploy process can be used for all 3 sites. |
That is (aside from the html/) Plan A, which involves some additional complexity to the build and deploy process. We may eventually go with it, but first it would be good to understand alternatives. |
@jonathanolson, @samreid and I met for a bit this morning. We didn't decide on anything concrete, but rather just pursued different ideas and brainstormed pros and cons. When thinking through the task of combining the phet-io and phet build processes together, a spectrum we thought about was how much to manipulate the build process (meaning the build server too). On one side, a solution would be to just update the instructions to manually build the phet and phet-io sims one after another. This would be a simple(ish) implementation because the basic problem would be just combining release branches (1.1 with 1.1-phetio) so that when you manually build both it is always from the same shas. This is a bummer though because it is a hassle to add so many steps to the build process, especially if you don't care about one of the brands you are building. We could also fork grunt into two sub processes (not a popular choice because there are potentially unforeseen problems in propagating errors/feedback through), one for the phet build and a fully separate one for the phet-io build. The other side would be dig deep into the grunt build and make the default Either way, maintaining and updating the dependencies.json file is a large part of the problem. If we have two fully separate dependency.json files, then it would not have to manipulate the grunt command as much (see deployUtil.commitAndPushDependeciesJSON for details), but that could be a slippery slope, having one dependencies.json file per brand. A few other talking points:
Please add your thoughts as you see fit, to this issue or below. @samreid and @jonathanolson and I are going to sleep on it, talk about this again soon, try to solidify a few concrete solutions with pros and cons, and then bring it up to developers on Thursday. |
This wasn't ready for discussion in today's dev meeting. We should shoot to have a conversation about this before next dev meeting. |
Here are some upcoming availabilities: Tuesday May 2, 1pm-3pm Mountain Time |
Both of those work well for me. @jonathanolson what's good for you? |
Tuesday sounds great to me. |
Alright sounds good. How about 1pm tomorrow then? |
1pm-1:50pm Tuesday works OK for me. I have another meeting at 2pm I'll need to prepare for. |
We chatted about this yesterday and @pixelzoom joined in. It seems important to only have one maintenance branch per version which includes all the brands. That is, instead of having 1.1-phetio and 1.1, we would have only 1.1 and it would support all brands. To decide:
|
Off the top of my head....
Having a dependencies file per brand feels like the way to go. Add the brand name as a file suffix, e.g. Speaking of brand suffixes... This might also be the time to consider whether the HTML file for PhET brand should be (e.g.)
This is the wrong question, it implies that there will only be phet and phet-io brands. If we're looking at longterm solutions, we need to stop thinking of this as "phet and phet-io". That said... The build task already has a
If PhET is really committed to brands in general, and PhET-iO in particular, then I don't think there's any argument that PhET needs a well-defined process and automated build tools to support those things. So in the longterm, there is no way to avoid incurring the large cost of modifying/developing tools and processes to support those things -- it's a question of when. "Making do" with existing tools may allow PhET to avoid the larger cost for awhile. But it will almost certainly increase the cost/complexity of a longterm solution (more manual work for developers in the meantime, more legacy "intermediate solutions" to support in the future, ...) |
I agree with the majority of your comment above, the only part I am curious about is why to have different dependencies.json. It seems like that would provide the opportunity for SHAs to get out of sync. Having one dependencies.json would guarantee that SHAs are all in sync and there is no opportunity for error (same reason as we wanted to eliminate multiple maintenance branches). I see two main options here:
|
There are situations where the shas should be out of sync for each brand. Suppose you make a PhET-iO fix and want to publish only the phet-io brand in maintenance release 1.0.4. Run |
This is probably also a good place to recommend that PhET consider having someone whose primary responsibility is supporting the building and deployment of PhET products. PhET's requirements in this area are more complicated (and unique) than the majority of organizations that I've consulted for in the past. And 100% of those organizations had someone whose full-time responsibility was to support building and deploying products. The introduction of brands and PhET-iO has increased the complexity of this significantly, and it's unreasonable to expect that this can be handled by developers whose primary responsibility is sim development. |
Assigning to @zepumph to distill this issue and perhaps open a new distilled issue, or break out the key points into separate issues and close. |
Here is my summary of this issue. In general I will create new issues for different parts of this. Bold parts are headers. First we talked about what the build artifacts will look like in the build/ dir. This assumes that we are building both(all) every time, but I don't think that was settled at all.
B. same build folder like for spot/testing purposes:
Then we talked about amount of work to be done to the build process
DECIDED: one maintenance branch per version How do handle the dependencies files:
Build and Deploy each time?
Other questions not really answered:
|
Now I am going to summarize the summary: I'm pretty sure these are decided, but it will still be good to discuss and make sure:
Not really decided at all:
Assigning back to @ariel-phet to review and tagging for dev meeting. |
Self assigning so that I remember to review comments on this issue that occurred since 11/17/17. |
Re @zepumph summary in #567 (comment) ... (1) The summary seems to be related to an unidentified discussion ("we talked about") that took place. It would be nice to have context. (2) The directory structures don't match the decisions made in 11/16/17 dev meeting, which were approved by @kathy-phet. See "desired directory structure" in #560 (comment). Why are we changing the directory structures? (3) I see:
If this means "one maintenance branch per {{MAJOR}}.{{MINOR}} pair" then agreed. If not, then please clarify, because this is not what was decided previously. |
"Talked" meaning commented above, everything is a synopsis of the above issue comments.
#560 (comment) is the final decision. The above is just noise. Look at #560 for finalized directory structure.
This means one maintenance branch per {{MAJOR}}.{{MINOR}} pair, with all brands built in that branch. |
I don't have anything to add--it seems #567 (comment) is a good summary. I don't know what to do about 3rd parties that don't have phet-io checked out. Gracefully skipping it would be nice, but we would need to add checks that make sure it doesn't accidentally get omitted by a PhET developer build. |
From the above, if we want to be able to build all brands with one grunt command, we'd need to modify our file/directory structure. If we change it so they build in the same directory (please no), it will make the build-server really complicated (we have to ship the different brands to different locations). Having multiple builds of different brands or options in different directories would be great for continuous testing (we have to make a literal copy of all source repos for every different build/brand tested right now, since we only have one So if we want to switch our full build/deploy/build-server system to a different scheme, we'd need to decide soon ideally. It will come with costs, and I'd recommend against it.
If we ever expect people to use our codebase, we should probably do this.
I've mostly rewritten or ported (to ES6/promises) most of chipper and perennial, and it's not that much code. Assuming others take on build-server and rosetta, I can probably take on maintenance for this without too much interruption.
Don't have to decide now, we'll have support. |
The majority of this work is done in the chipper 2.0 branch (decided on in #560 how to handle multiple brands). Leaving this open for a few remaining questions (and getting it to work in cases where no phet-io dependencies are checked out). |
Marking for dev meeting to see if this can be closed |
In #560 we decided we want to investigate building both brands simultaneously.
@jonathanolson and @zepumph and @samreid will work together to investigate how to make this happen.
Questions:
We'll try to look into this before May 4.
The text was updated successfully, but these errors were encountered: