pantheon-systems / terminus-mass-update Goto Github PK
View Code? Open in Web Editor NEWA Terminus plugin to apply upstream updates to multiple sites at once
License: MIT License
A Terminus plugin to apply upstream updates to multiple sites at once
License: MIT License
When running the following command, the mass-update plugin executes as intended, and works well.
terminus site:list --format=list | terminus site:mass-update:apply
But upon attempting to apply an update where the site has a merge conflict present, the script terminates upon receiving that error.
Potential solutions
--dry-run
option to test for merge conflicts prior to actually executing the script ahead of time.Thanks for all that you do! :-)
I recently needed this plugin as well as similar functionality for other commands. I copied the approach for looping over sites into a Trait for my own plugin, and was able to apply the same logic for Drush and the backup creation commands. Before publishing that plugin, I wanted to see if there was room in this project to share the looping logic and be able to implement more Terminus commands over time. My plugin is at https://github.com/jnettik/terminus-mass-run
I'm attempting to get a list of all available updates for our organization by using the command terminus org:site:list --format=list "Org Name" | terminus site:mass-update:list
I'm getting this warning a few times before it finally errors out with a "Maximum retry attempts reached" message"
[warning] HTTPS request failed with error cURL error 7: Failed to connect to terminus.pantheon.io port 443: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html). Retrying in 137 milliseconds..
[warning] HTTPS request failed with error Server error:GET https://terminus.pantheon.io/api/sites/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/code-upstream-updates?base_branch=refs/heads/master
resulted in a500 Internal Server Error
response:
"No route to host\n"
I've tried it with org:site:list
and also just site:list
but I don't think the issue is with the site list commands because I can run those on their own with no problems.
As mentioned in pantheon-systems/terminus#1544 (comment).
See the readSitesFromStdin method:
Entry:
terminus site:list --format=list | terminus site:mass-update:apply
Result (repeated exactly twice on the screen):
[notice] Found 89 sites.
[notice] Fetching the list of available updates for each site...
PHP Fatal error: Uncaught Error: Call to undefined method Pantheon\Terminus\Models\Site::getUpstreamStatus() in /Users/tfserwin/vendor/pantheon-systems/terminus/src/Commands/Upstream/Updates/UpdatesCommand.php:27
Stack trace:
#0 /Users/tfserwin/vendor/pantheon-systems/terminus/src/Commands/Upstream/Updates/UpdatesCommand.php(42): Pantheon\Terminus\Commands\Upstream\Updates\UpdatesCommand->getUpstreamUpdates(Object(Pantheon\Terminus\Models\Site))
#1 /Users/tfserwin/.terminus/plugins/terminus-mass-update-1.x/src/Commands/MassUpdateCommandBase.php(72): Pantheon\Terminus\Commands\Upstream\Updates\UpdatesCommand->getUpstreamUpdatesLog(Object(Pantheon\Terminus\Models\Site))
#2 /Users/tfserwin/.terminus/plugins/terminus-mass-update-1.x/src/Commands/MassUpdateCommandBase.php(24): Pantheon\TerminusMassUpdate\Commands\MassUpdateCommandBase->getAllUpdates(Array)
#3 /Users/tfserwin/.terminus/plugins/terminus-mass-update-1.x/src/Commands/ApplyCommand.php(31): Pantheon\TerminusMassUpdate\Commands\MassUpdateCommandBase->getAllSitesAndUpdate in /Users/tfserwin/vendor/pantheon-systems/terminus/src/Commands/Upstream/Updates/UpdatesCommand.php on line 27
Thanks for the hard work that you guys and gals do to make Pantheon a great experience!
Check to see if files are waiting to be committed before switching to git mode.
Good afternoon. When running the mass-update plugin, the script produces a pair of PHP warnings/errors upon hitting a site with a merge conflict present. Same warning twice.
Previous versions of this plugin reported encountering a merge conflict gracefully and ended the script upon receiving that message.
Message encountered is:
PHP Warning: strtr() expects parameter 1 to be string, array given in /Users/{user}/vendor/pantheon-systems/terminus/src/Exceptions/TerminusException.php on line 72
Thanks!
-- Steve Ryan
It would be useful to add an option to back up sites before updating them.
Or if there's something already available to do a mass backup, it'd be good to document it in the README.
Thank you!
It would be nice to have a "force deploy" option maybe in Slack to push to live. So if the regression test fails because of a minor issue the site can still be deployed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.