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

Maintenance deploys causing twitter cards to fail #570

Closed
mattpen opened this issue Apr 25, 2017 · 7 comments
Closed

Maintenance deploys causing twitter cards to fail #570

mattpen opened this issue Apr 25, 2017 · 7 comments
Assignees

Comments

@mattpen
Copy link
Contributor

mattpen commented Apr 25, 2017

I recently added a step to the build-for-server process that generates an image for use in the twitter cards on the main website pages. The changes are all included in this commit: 31ee343

However, most sims do not have a version of chipper in their respective dependencies.json that includes this change, so every time we do a maintenance deploy, I have to copy the twitter card into the build directory manually.

I have written a script as a workaround that will be running on a cron job shortly, so that we minimize the downtime for the twitter cards and remove the manual step, but it would probably be good if at some point we merged this sha into the chipper release branches, possibly with the next maintenance deploy.

@jonathanolson what would be the correct way to proceed to fix this permanently?

@mattpen
Copy link
Contributor Author

mattpen commented Apr 25, 2017

The workaround script is stored in phet-server:/home/phet-admin/update-twitter-cards.js and is scheduled (by the phet-admin user) to run once an hour.

@jonathanolson
Copy link
Contributor

Sounds like something that should be pushed out as a maintenance release. What happens with translations being built?

It would probably be good to verify that Jimp is in package.json for all production sims, as that would cause issues.

Presumably I can check if patches work (after npm prune/update) if RC deploys have the twitter card on spot?

This would probably be an excellent maintenance release to test that #567 doesn't break maintenance releases.

@mattpen
Copy link
Contributor Author

mattpen commented Apr 25, 2017

What happens with translations being built?

I don't think this should cause a problem. If I remember correctly, translations overwrite the appropriate files in the production directory which means that the file for the twitter card will remain in place.

Presumably I can check if patches work (after npm prune/update) if RC deploys have the twitter card on spot?

I think so. generate-twitter-card is part of build-for-server, which should be run during RC deploys.

@mattpen
Copy link
Contributor Author

mattpen commented Apr 25, 2017

It would probably be good to verify that Jimp is in package.json for all production sims, as that would cause issues.

Is this necessary? It looks like it is missing from most if not all. I was able to generate the screenshots using grunt with jimp missing from the sims' package.jsons. Wouldn't jimp need to be in chipper's package.json, at least in the shas used in production sims?

@jonathanolson
Copy link
Contributor

Wouldn't jimp need to be in chipper's package.json, at least in the shas used in production sims?

Yes, it would only need to be in each sims' chipper version.

A few spot-checks indicate it's probably in most "modern" sims as it's needed for screenshot operations already.

@ariel-phet, thoughts about whether this warrants:

  1. Full maintenance release (both apply the commits to sims' release branches AND deploy-rc/test/deploy-production), whenever I'm available concurrently working on something else.
  2. Partial maintenance release (just apply the commits, but skip RCs/deploying/full testing and do that only for the next required maintenance release).
  3. Rely on @mattpen's script as noted above for creating twitter cards.

(1) or (2) would be cleanest long-term and ensure uptime for twitter cards, but if I'm responsible for the maintenance release it will take the normal amount of time. It may be beneficial to diversify who is familiar with the maintenance release process, and I could guide someone else through the process without spending all of the time.

@ariel-phet, thoughts?

@ariel-phet
Copy link
Contributor

@mattpen will improve the script for twitter cards

@mattpen
Copy link
Contributor Author

mattpen commented Mar 6, 2018

Closing for now, the scripts are working just fine and the chipper change will be picked up eventually.

@mattpen mattpen closed this as completed Mar 6, 2018
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

3 participants