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

Iterate through ReleaseBranch objects before submitting build requests #323

Closed
Tracked by #407
liammulh opened this issue Dec 9, 2022 · 12 comments
Closed
Tracked by #407
Assignees

Comments

@liammulh
Copy link
Member

liammulh commented Dec 9, 2022

In our conversation with @kathy-phet and @jonathanolson about #322, we realized that we aren't sending build requests for active phet-io branches that don't match the current current published phet brand branch. To fix this, @jonathanolson suggested we use the ReleaseBranch.js module in phetsims/perennial to identify all active phet and phet-io branches that we need to request builds for.

What this will look like is using the ReleaseBranch.js module to get a list of ReleaseBranch objects. We will then iterate over those objects, and create build request objects for each object where isReleased is true. We decided that we should include the branch that we get from the ReleaseBranch objects in the build request objects.

Here is some sample code that @jonathanolson created:

  const ReleaseBranch = require( './js/common/ReleaseBranch.js' );
  ( async () => {
    const branches = await ReleaseBranch.getMaintenanceBranches( repo => repo === 'natural-selection', false );
    console.log( branches );
  } )();

Be careful to pass false as the second parameter to the getMaintenanceBranches method so that it will obtain the information needed only from the sim metadata, rather than from a parallel checkout of the sim repos.

Here is the location of the code we need in perennial: https://github.com/phetsims/perennial/blob/6606be0cdcc1dc7b6bd6eb25b6f1bf7b7343322f/js/common/ReleaseBranch.js#L659-L661.

@jbphet
Copy link
Contributor

jbphet commented Dec 10, 2022

As we continued to discuss this, we recognized that there isn't any value in requesting rebuilds of the _all files for the old-style phet-io branches, i.e. the ones with the -phetio version suffix. Here is a bit of the Slack dialog:

@jonathanolson [1:47 PM]:
Hey! @kathy-phet - it looks like release branches that are old enough to have a suffix of "-phetio" do NOT have all-locale HTML files. It seems to me like building those for translation updates would have no effect currently.
Would you want a maintenance release to add all-locale HTML files to those? (initial estimate is a half week of my time for figuring that out).
They all look like they were from 2017 or before.

@kathy-phet [1:50 PM]:
No - we really only need this translation updates working for GAO that was just deployed and moving forward. Please limit any effort to get new translations into old sims. If its easier to do it, that's fine. Which ever way is minimal effort. (edited)

We will need to take this into account when implementing this. Let's make sure that we don't request builds for the -phetio suffix branches, even if it is easier to do so, since we don't want to have to investigate build failures for these branches.

@jbphet
Copy link
Contributor

jbphet commented Feb 1, 2023

@liammulh - I'm going to unassign myself from this issue, since it doesn't seem worthwhile to implement this in Rosetta 1 with Rosetta 2.0 so close. Please double check it's implemented and has been tested in Rosetta 2.0.

@jbphet jbphet removed their assignment Feb 1, 2023
@liammulh
Copy link
Member Author

liammulh commented Feb 1, 2023

We did not plan to add this to Rosetta 2.0, and it isn't implemented in Rosetta 2.0.

I believe the plan was to add the patch to 1.0, and once that was done, it would be added to 2.0.

I am happy to add the patch, but since Rosetta 2.0 is already in testing, I don't think it makes sense to add this and then do another yet another spot check before deploying 2.0.

@liammulh liammulh mentioned this issue May 23, 2023
14 tasks
@liammulh
Copy link
Member Author

@jbphet and I talked about this on Friday, and we recall this was an extra thing to do on top of the work we did to add PhET-iO build request support, but we need more context on this from @jonathanolson before we implement this.

@jbphet
Copy link
Contributor

jbphet commented Jun 14, 2023

This was discussed in a meeting on 6/14/2023 and @kathy-phet says that this is high priority and, once it is working, we should push out anything that was NOT published as a result of the lack of this feature.

@jbphet
Copy link
Contributor

jbphet commented Sep 6, 2023

The sims that currently could have out-of-date translations are the ones that have previously released phet-io versions that are still active and that are not the main branch, and where the previous branch is not one with a -phetio suffix. The sims that currently fall into that category are:

  • graphing-quadratics
  • gravity-and-orbits
  • molecule-polarity
  • natural-selection
  • ph-scale
  • ph-scale-basics

Once I've added the code to Rosetta to request builds for all active phet-io branches, I'll need to go through this list and see if any of them need to have their translations updated. I will probably create some sort of script to help in this effort.

@jbphet
Copy link
Contributor

jbphet commented Sep 8, 2023

The code to submit requests for previous phet-io releases has been added, and as of this writing I've tested it locally and on ox-dev. I can't fully test it on the main server because it would affect real translations (this is where the capability described in #113 would be extremely helpful), so I've deployed it there and set a calendar reminder to check for submissions by real translators for one of the sims listed above.

@jbphet
Copy link
Contributor

jbphet commented Sep 11, 2023

For reference, these change were deployed to the live version of Rosetta on Sep 08 15:32:10, so I'll need to check submissions after that timestamp to verify that things are working correctly.

@jbphet
Copy link
Contributor

jbphet commented Sep 11, 2023

I verified that there are translations successfully being submitted and deployed after these changes were made, which is a good regression test. However, as of this moment there have been no deployments of the sims listed above, so I've not yet verified the changes for deploying translations for previous phet-io releases.

@jbphet
Copy link
Contributor

jbphet commented Sep 13, 2023

There was a maintenance action on August 24th that republished many of the phet-io sims, and I verified with @jonathanolson that such actions rebuild the _all_phet-io file with the latest translations. I verified that each of the sims listed above were updated by that action, then checked if any of them had received new or updated translations since that time. None of them had. I believe we can conclude from this that there are no missing translations in the older phet-io branches that are still supported.

@jbphet
Copy link
Contributor

jbphet commented Sep 13, 2023

I think this is done, but I am going to leave it open until we get at least one translation submitted for a sim that has a supported older phet-io branch. That might take a while, so I have a weekly reminder on my calendar. I'm going to reduce the priority in the mean time.

@jbphet
Copy link
Contributor

jbphet commented Oct 4, 2023

I just checked Rosetta's log and found that a mi (Māori) version of graphing-quadratics was submitted this morn at around 4:48 AM. I checked that both the current 1.3 and previous 1.2 versions of the sim support this locale and they do, so this appears to be working.

I was also able to see evidence of there being multiple build requests, one for each of these versions, submitted to the build server. Here is an excerpt from the log that shows this:

Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info: returning dependencies
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info: getting phet-io metadata request with https://phet.colorado.edu/services/metadata/phetio?&active=true&latest=true
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info: getting dependencies from https://phet-io.colorado.edu/sims/graphing-quadratics/1.2.14/dependencies.json
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info: returning dependencies
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info: build request object 1 of 2:
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   api: 2.0
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   simName: graphing-quadratics
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   version: 1.3.2
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   locales: mi
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   servers: production
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   brands: phet,phet-io
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   translatorId: 274564
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info: build request object 2 of 2:
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   api: 2.0
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   simName: graphing-quadratics
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   version: 1.2.14
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   locales: mi
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   servers: production
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   brands: phet-io
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info:   translatorId: 274564
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info: starting to send build requests to https://phet.colorado.edu/deploy-html-simulation
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info: sending build request 1 of 2
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info: build request status: 202
Oct 04 04:48:29 phet-server2.int.colorado.edu rosetta[798254]: info: sending build request 2 of 2
Oct 04 04:48:30 phet-server2.int.colorado.edu rosetta[798254]: info: build request status: 202
Oct 04 04:48:30 phet-server2.int.colorado.edu rosetta[798254]: info: build requests succeeded
Oct 04 04:48:30 phet-server2.int.colorado.edu rosetta[798254]: info: done attempting to submit translation

I think I can safely close this issue now.

@jbphet jbphet closed this as completed Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants