[1/11/2016 4:30:04 PM] @pixelzoom Need someone's immediate help. I just published a maintenance release of Beer's Law Lab, and all of the translated html files now appear to be gone!! I did not get an email indicating a successful or failed build. Last line of the figaro:/data/share/phet/phet-repos/perennial/build-server.log is:
[1/11/2016 4:30:06 PM] @pixelzoom 2016-01-11T23:19:17.575Z - info: build for beers-law-lab finished successfully
[1/11/2016 4:30:47 PM] @pixelzoom But all links to translated versions are now 404 Not Found.
[1/11/2016 4:32:02 PM] @pixelzoom The English version appear to be OK and has the expected version number, 1.3.1.
[1/11/2016 4:36:03 PM] @pixelzoom Looks like build-server ran with --locales=en. Isn't it supposed to rebuild all locales?
[1/11/2016 4:40:12 PM] @jbphet I'm taking a look. I have to catch a bus shortly, but can take a look at it from home in a bit too.
[1/11/2016 4:40:47 PM | Edited 4:41:02 PM] @pixelzoom I've tried to deploy twice, and it's only building English, and not sending email.
[1/11/2016 4:41:15 PM] @pixelzoom I'm going to try another deploy with --locales=* to see if that does anything.
[1/11/2016 4:42:52 PM] @pixelzoom --locales=* is not passed to build-server. From log:
[1/11/2016 4:42:53 PM] @pixelzoom 2016-01-11T23:41:23.783Z - info: running command: grunt build-for-server --brand=phet --locales=en
[1/11/2016 4:43:55 PM] @pixelzoom malleyc@figaro[64]: pwd
/beers-law-lab
[65]: ls 1.3.0
beers-law-lab-128.png beers-law-lab_ko.html
beers-law-lab-600.png beers-law-lab_pl.html
beers-law-lab_ar.html beers-law-lab_pt_BR.html
beers-law-lab_da.html beers-law-lab_te.html
beers-law-lab_en.html beers-law-lab_vi.html
beers-law-lab_en-iframe.html beers-law-lab.xml
beers-law-lab_es_PE.html beers-law-lab_zh_TW.html
beers-law-lab_fa.html dependencies.json
beers-law-lab_it.html
[66]: ls 1.3.1
beers-law-lab-128.png beers-law-lab_en.html beers-law-lab.xml
beers-law-lab-600.png beers-law-lab_en-iframe.html dependencies.json
[1/11/2016 4:44:14 PM] @pixelzoom Definitely not building translated versions.
[1/11/2016 4:44:37 PM] @jbphet I'm seeing the same thing in the build server log - it's just building the English version.
[1/11/2016 4:44:48 PM] @pixelzoom Is there a config file for build-server on figaro?
[1/11/2016 4:45:16 PM] @pixelzoom build-server.js doc says:
[1/11/2016 4:45:17 PM] @pixelzoom * - locales - a comma-separated list of locales to build [optional, defaults to all locales in babel]
[1/11/2016 4:45:58 PM] @jbphet Yes, it is supposed to do all locales in babel by default. Aaron and I worked on that a bit just before he left.
[1/11/2016 4:46:36 PM] @pixelzoom This is the first time I've deployed a maintenance release of a sim that has translation support. Lucky me.
[1/11/2016 4:47:05 PM] @samreid: I'm not sure what's wrong...
[1/11/2016 4:47:14 PM | Edited 4:47:25 PM] @jbphet I did it before, ran into issues, worked with Aaron to resolve. I thought some had been done since then, but possibly not.
[1/11/2016 4:48:05 PM] @samreid: Workaround brainstorm: iterate through the translations and approve them one by one...
[1/11/2016 4:48:25 PM] @pixelzoom How can I do that? I can't even get them to build?
[1/11/2016 4:48:43 PM] @jbphet Let's not go into workaround mode yet. It's not worth the possible issues.
[1/11/2016 4:49:07 PM] @jbphet I need to run to catch the bus, and will check in once I'm home.
[1/11/2016 4:49:16 PM] @pixelzoom ok thanks.
[1/11/2016 4:49:21 PM] @samreid: Sounds good
[1/11/2016 4:51:43 PM] @jonathanolson: available now, looking into it
[1/11/2016 4:52:25 PM] @jonathanolson: until it is fixed, should I revert the deploy and bring back the previous files?
[1/11/2016 4:52:39 PM] @pixelzoom i guess so
[1/11/2016 4:52:39 PM] @jonathanolson: or I guess changing the symbolic link will do that
[1/11/2016 4:52:58 PM] @pixelzoom is it a symlink or htaccess?
[1/11/2016 4:53:15 PM] @jonathanolson: sorry, htaccess
[1/11/2016 4:53:29 PM] @jonathanolson: 1.3.0 is good, 1.3.1 is bad?
[1/11/2016 4:53:33 PM] @pixelzoom 1.3.0 good
[1/11/2016 4:53:44 PM] @pixelzoom /data/web/htdocs/phetsims/sims/html/beers-law-lab/.htaccess
[1/11/2016 4:53:51 PM] @jonathanolson: changed .htaccess
[1/11/2016 4:53:55 PM] @pixelzoom thanks
[1/11/2016 4:54:25 PM] @pixelzoom verified that we're back online
[1/11/2016 4:55:19 PM] @jonathanolson: revered version on the website, so it doesn't show out-of-date notification
[1/11/2016 4:55:30 PM] @jonathanolson: OK, now for the deploy bit
[1/11/2016 4:55:41 PM] @pixelzoom what is "revered version" ?
[1/11/2016 4:55:57 PM] @pixelzoom oh... reverted?
[1/11/2016 4:56:11 PM] @jonathanolson: reverted, sorry
[1/11/2016 4:56:22 PM] @pixelzoom I thought maybe we were getting religious :)
[1/11/2016 4:56:43 PM] @jonathanolson: My "holy logic" was missing a case!
[1/11/2016 4:57:11 PM] @pixelzoom I have the feeling we're dealing with holey logic, not holy.
[1/11/2016 4:57:17 PM] @jonathanolson: babel on figaro shows many BLL translations
[1/11/2016 4:57:25 PM] @pixelzoom where does that live on figaro
[1/11/2016 4:57:26 PM] @pixelzoom ?
[1/11/2016 4:57:32 PM] @jonathanolson: /data/share/phet/phet-repos/babel
[1/11/2016 4:57:37 PM] @pixelzoom thanks.
[1/11/2016 4:58:14 PM] @pixelzoom build-server.js line 424 says:
[1/11/2016 4:58:15 PM] @jonathanolson: I found out on Friday that the build-server and rosetta seem to be using the same checked-out repos (I think?), so there may be a whole range of bugs available
[1/11/2016 4:58:15 PM] @pixelzoom Get all of the deployed locales from the latest version before publishing the next version,
[1/11/2016 4:58:29 PM] @pixelzoom Is it possibly looking at 1.2.0 instead of 1.3.0?
[1/11/2016 4:59:10 PM] @pixelzoom I don't understand why it would be looking a the latest version instead of babel. But perhaps its definition of "latest" version is faulty.
[1/11/2016 4:59:46 PM] @pixelzoom That doc is for a function named getLocales.
[1/11/2016 5:00:27 PM] @pixelzoom Hate code like this:
[1/11/2016 5:00:29 PM] @pixelzoom // from rosetta
if ( locales && locales !== '*' ) {
callbackLocales = locales;
}
// from grunt deploy-production
else {
[1/11/2016 5:00:39 PM] @pixelzoom Where there's a big chunk of space between if-else.
[1/11/2016 5:02:03 PM] @jonathanolson: yeah
[1/11/2016 5:02:12 PM] @pixelzoom fixed and pushed
[1/11/2016 5:02:42 PM] @jonathanolson: also now line 463, and possibly elsewhere :(
[1/11/2016 5:03:00 PM] @pixelzoom ok, i'll fix that too and look for others
[1/11/2016 5:06:36 PM] @jonathanolson: Looks like the logic to inspect "current" translations was for https://github.com/phetsims/rosetta/issues/101
[1/11/2016 5:07:25 PM] @jonathanolson: which was all done after my code-review of build-server, which is why I didn't recall that code
[1/11/2016 5:08:57 PM] @pixelzoom ah... s*t. you know what's going on? I'm doing a maintenance release, and therefore have an older version of chipper.
[1/11/2016 5:08:58 PM] @jonathanolson: https://github.com/phetsims/rosetta/issues/101#issuecomment-155251142
[1/11/2016 5:09:07 PM] @jonathanolson: > however maintenance releases of sims that don't have the latest chipper will need to use grunt deploy-production --locales=
[1/11/2016 5:09:14 PM] @jonathanolson: yup
[1/11/2016 5:09:20 PM] @pixelzoom I tried that and it's not passed through.
[1/11/2016 5:09:36 PM] @pixelzoom grunt deploy-production --noDev --locales=*
[1/11/2016 5:10:15 PM] @jonathanolson: we can probably manually put together the build-server call that should build it
[1/11/2016 5:10:32 PM] @jonathanolson: or just build locally and SCP it up
[1/11/2016 5:12:30 PM] @jonathanolson: or patch the old deployProduction.js equivalent to pass locales=*
[1/11/2016 5:12:39 PM] @pixelzoom or build with chipper from the maintenance branch, then check out chipper master to do the deploy-production?
[1/11/2016 5:12:52 PM] @jonathanolson: no
[1/11/2016 5:12:55 PM] @pixelzoom ?
[1/11/2016 5:13:01 PM] @jonathanolson: it will try to build with that chipper SHA then
[1/11/2016 5:13:06 PM] @jonathanolson: on the build-server
[1/11/2016 5:13:49 PM] @pixelzoom ah right, deploy-production ships over the shas.
[1/11/2016 5:14:29 PM] @jonathanolson: I don't understand this:
However, we don't want to build locales=* because that will build everything that has strings in babel.
[1/11/2016 5:14:38 PM] @jonathanolson: (comment in https://github.com/phetsims/rosetta/issues/101#issuecomment-155251142)
[1/11/2016 5:15:00 PM] @pixelzoom yeah... build-server has a lot of odd stuff in it that makes little sense to me.
[1/11/2016 5:15:02 PM] @jonathanolson: I thought babel kept strings "not yet ready" in its DB
[1/11/2016 5:15:41 PM] @pixelzoom maybe that's why getLocales function looks at "latest version" and builds only locales that were in that version.
[1/11/2016 5:16:01 PM] @jonathanolson: yes, that's rosetta #101, which I don't think should have been fixed like that
[1/11/2016 5:16:12 PM] @jonathanolson: It seems like defaulting to * is exactly what is desired
[1/11/2016 5:17:26 PM] @pixelzoom well... shall I attempt to patch deployProduction.js ?
[1/11/2016 5:17:56 PM] @jonathanolson: Probably the easiest, yes
[1/11/2016 5:18:08 PM] @pixelzoom feels like it might be a rathole.
[1/11/2016 5:18:09 PM] @jonathanolson: https://github.com/phetsims/perennial/commit/98c820aa08c5da92df01a7b0ef33c06f14fb657c#diff-becbf176979403e2eaca3527f9aea5c5 is the commit that moved things over to looking at "latest version"
[1/11/2016 5:18:17 PM] @jonathanolson: or just build it on your computer and SCP it
[1/11/2016 5:18:28 PM] @jonathanolson: although the server XML is wrong
[1/11/2016 5:18:30 PM] @jonathanolson: so don't do that
[1/11/2016 5:18:41 PM] @samreid: CM ask JO if my brainstorm workaround would be better
[1/11/2016 5:19:14 PM] @pixelzoom SR proposed that we should open each translation in Rosetta, pretend you are a translator. and then press "submit".
[1/11/2016 5:19:30 PM] @pixelzoom ... presumably to trigger a build of each translation,
[1/11/2016 5:19:40 PM] @samreid: But I haven't been able to follow the other proposed workarounds, so I am not sure what is better
[1/11/2016 5:19:45 PM] @jonathanolson: presumably easier to patch deployProduction
[1/11/2016 5:19:49 PM] @jonathanolson: I can assist with that
[1/11/2016 5:19:56 PM] @samreid: OK I trust your judgment
[1/11/2016 5:19:57 PM] @jonathanolson: that would trigger the developer as a translator
[1/11/2016 5:20:14 PM] @jonathanolson: and could cause the same translation-credits website-side failures due to lack of lastname
[1/11/2016 5:20:20 PM] @pixelzoom i don't want to figure out how to use rosetta, and possibly find more problems there.
[1/11/2016 5:20:55 PM] @pixelzoom if I patch deployProduction.js, do I need to commit it?
[1/11/2016 5:21:04 PM] @jonathanolson: presumably not
[1/11/2016 5:21:14 PM] @pixelzoom meant "edit locally" vs "patch".
[1/11/2016 5:21:31 PM] @jonathanolson: understood, presumably no need to commit
[1/11/2016 5:22:38 PM] @samreid: Afk probably working later tonight
[1/11/2016 5:23:01 PM] @pixelzoom I'm going to try applying this commit: https://github.com/phetsims/chipper/commit/dfa45c1613a09c16d71afc9a896e8a246adc41da
[1/11/2016 5:23:25 PM] @jonathanolson: ok
[1/11/2016 5:24:05 PM] @pixelzoom skeptical, because my deployProduction.js looks very different.
[1/11/2016 5:24:39 PM | Edited 5:25:02 PM] @pixelzoom bet a default of locales=\ doesn't get passed through, since explicit locales=\ didn't.
[1/11/2016 5:25:17 PM] @jonathanolson: http://phet.colorado.edu/deploy-html-simulation, with all the query parameters filled in
[1/11/2016 5:25:37 PM] @jonathanolson: though encoding the stringified array is a bit more complicated
[1/11/2016 5:26:32 PM] @pixelzoom I'm not even going to try this patched deployProduction.js. I can tell it's not going to work.
[1/11/2016 5:27:27 PM] @jonathanolson: Recommendation: checkout master chipper, replace request( url, ... ) with console.log( url ). Replace chipper SHA in that with the chipper SHA you need, and load the URL in a browser
[1/11/2016 5:28:06 PM] @pixelzoom what might go wrong if I build translated html files locally and scp them to figaro?
[1/11/2016 5:28:33 PM] @jonathanolson: The beers-law-lab.xml that the website uses to determine titles/translation list wouldn't exist, and would need to be copied (fixable)
[1/11/2016 5:28:55 PM] @jonathanolson: make sure to copy dependencies.json
[1/11/2016 5:29:07 PM] @pixelzoom The only thing missing from beers-law-lab/1.3.1/ on figaro is the translated html files.
[1/11/2016 5:29:26 PM] @pixelzoom dependencies.json is already there, as is the English version.
[1/11/2016 5:29:37 PM] @jonathanolson: MISSING, yes, but 1.3.1/beers-law-lab.xml indicates English is the only translation
[1/11/2016 5:29:49 PM] @pixelzoom so I should be able to scp the translated html files, then fix beers-law-lab.xml.
[1/11/2016 5:29:55 PM] @jonathanolson: 1.3.0/beers-law-lab.xml includes all translations
[1/11/2016 5:30:10 PM] @jonathanolson: yes, then notify me and/or "synchronize" the project
[1/11/2016 5:30:13 PM] @pixelzoom cp 1.3.0/beers-law-lab.xml 1.3.1/
[1/11/2016 5:30:19 PM] @jonathanolson: yes
[1/11/2016 5:30:27 PM] @pixelzoom ok, i'm going to give that a try
[1/11/2016 5:30:33 PM] @jonathanolson: ok
[1/11/2016 5:30:41 PM] @pixelzoom all this for a 30-second maintenance fix
[1/11/2016 5:31:09 PM] @jonathanolson: :(
[1/11/2016 5:32:07 PM] @pixelzoom i suppose 'grunt --locales=*' will build everything in babel, and only the translations that were deployed in 1.3.0 should be scp'ed to 1.3.1
[1/11/2016 5:32:25 PM] @jonathanolson: It is my understanding that if it's IN babel, it's a live translation
[1/11/2016 5:32:53 PM] @jonathanolson: but I've run across enough stuff recently that I don't like to make assumptions
[1/11/2016 5:32:59 PM] @pixelzoom Not the case. There are translations in babel that were ported from Java and have not been officially submitted by a translator.
[1/11/2016 5:34:14 PM] @pixelzoom For BLL, 33 translations were just built from babel. 11 are deployed in 1.3.0.
[1/11/2016 5:37:18 PM] @jbphet I'm home. I'll be making dinner but can help in parallel.
[1/11/2016 5:38:31 PM] @jbphet I don't think it's true that everything in babel is a live translation. Java strings were moved in, and are used to help translators, but if no translator has touched it, than it is not yet live.
[1/11/2016 5:39:08 PM] @jbphet Sorry, just realized that I reiterated CM's last post. Didn't quite scroll to the end of the dialog so far.
[1/11/2016 5:45:11 PM] @pixelzoom now i can't copy the translated html files to beers-law-lab/1.3.1 due to permissions.
[1/11/2016 5:45:24 PM] @pixelzoom they are in
[1/11/2016 5:45:46 PM] @jonathanolson: ahh, the phet-admin account probably
[1/11/2016 5:46:08 PM] @pixelzoom i'm about to be kicked out of the coffee shop/
[1/11/2016 5:46:18 PM] @jonathanolson: ok, I can complete it
[1/11/2016 5:46:24 PM] @jonathanolson: FYI, phet-admin credentials are in https://phet.unfuddle.com/a#/projects/9404/notebooks/17996/pages/105766/latest
[1/11/2016 5:46:46 PM] @pixelzoom thanks, that would be appreciated. it's my 30th wedding anniversary and I'm already 1.5 hours late because of this mess.
[1/11/2016 5:47:26 PM] @jonathanolson: Congratulations, and sorry! I'll definitely tackle from here.
[1/11/2016 5:47:30 PM] @jonathanolson: ls
[1/11/2016 5:47:38 PM] @pixelzoom thanks. afk
[1/11/2016 5:52:29 PM] @jonathanolson: ok, should be up and fixed now
[1/11/2016 6:04:14 PM] @jbphet Thanks JO. I just spot checked a few of the translations and they look good.
[1/11/2016 6:07:04 PM] @samreid: working
[1/11/2016 6:08:04 PM] @samreid: it would be good to get a TLDR of the above scenario—it’s a bit difficult to follow and I’m not sure what the next steps or takeaway message area
[1/11/2016 6:09:13 PM] @jbphet Summary is that a workaround was done for this deployment, a long term solution should be implemented.
[1/11/2016 6:11:00 PM] @samreid: long term solution = the ability to deploy maintenance releases of translated sims?
[1/11/2016 6:13:48 PM] @jbphet Yes, for releases with an older version of Chipper. Some things were changed about the interaction between Chipper and the build server, and some fixes were made (see https://github.com/phetsims/rosetta/issues/101) but something about the fix isn't working.
[1/11/2016 6:14:25 PM] @jbphet It's now on agenda for dev meeting tomorrow.