Comments (9)
Hrm, at https://pantheon.io/docs/guides/build-tools/merge/ it does say it should be deleted, but my first test it did not delete. Something funny is happening, testing some more.
from example-drops-8-composer.
Oh my, it did work this time, but instead of deleting the PR that it came from it deleted ALL PR-N multidevs...
# Delete old multidev environments associated with a PR that has been
# merged or closed.
terminus -n build:env:delete:pr "$TERMINUS_SITE" --yes
But $TERMINUS_SITE is the site ID and terminus build:env:delete:pr --help
says
Delete all of the build environments matching the pattern for pull request branches, i.e., all multidevs whose name begins with "pr-".
So this definitely needs some work. And I think it didn't delete the PR environment before because I tested it with the initial build which was CI-N, and it doesn't match that pattern.
from example-drops-8-composer.
In the triggered build in the "handle merge to master (if needed)" step I got this. Which means it was looking for all OPEN PRs, when it should look for all CLOSED PRs.
[notice] Call GitHub API: repos/ElijahLynn/pantheon-d8-composer-project-elijah/pulls?state=open
[notice] Deleted the multidev environment pr-2.
[notice] Deleted the multidev environment pr-3.
[notice] Deleted the multidev environment pr-4.
[notice] Deleted the multidev environment pr-5.
[notice] Deleted the multidev environment pr-6.
from example-drops-8-composer.
It seems like terminus-build-tools-plugin 2.x may not fetch all OPEN PRs anymore as I can see it has been heavily refactored. The docker build-tools-ci image doesn't have this though it isn't easy to test via that workflow. I will see about testing the build-tools-plugin 2.x locally.
from example-drops-8-composer.
There are still problems with the multidev delete code; it works in some instances, but many users have reported problems.
I agree that the algorithm should be looking for CLOSED PRs. The current algorithm protects multidevs that are associated with a PR that is still open; it would be safer if it only deleted a PR if it could definitively find a PR that had been merged or closed.
from example-drops-8-composer.
The current algorithm protects multidevs that are associated with a PR that is still open
In my example above, pr-{4..6} were associated with PRs still open, yet still deleted, so the protection has an edge case somewhere.
from example-drops-8-composer.
If the code says "delete a PR unless it has an open PR", and the open PR check comes back with an error due to a bug, then the algorithm might delete a PR by mistake. If we switched it to say "only delete a PR if it has a closed/merged PR", and the closed/merge PR check comes back with an error due to a bug, then the algorithm might fail to delete a PR that it could have cleaned up. I think the later scenario is preferable.
from example-drops-8-composer.
@ElijahLynn multidevs associated with PRs have been working for some time now (sorry this issue fell through the cracks). We also recently re-organized the CI scripts in this example repository.
Try out the changes to Build Tools (and this repo) and re-open this if you are still experiencing trouble.
from example-drops-8-composer.
Thanks, I trust it is all working now. I haven't been on a recent Pantheon project but will test this out on the next one I am on!
from example-drops-8-composer.
Related Issues (20)
- Use build:comment:add:pr instead of build:comment:add:comment
- Update drupalextension to version 4 HOT 4
- Consider Removing Local Drush from Upstream HOT 2
- Update settings.php to latest Drupal 8.8.0 recommendations. HOT 9
- Update to using PHP Unit 6.5 HOT 1
- Error: Your requirements could not be resolved to an installable set of packages. HOT 2
- Drush updatedb command unable to run HOT 1
- config_installer is obsolete; use core feature instead HOT 1
- Installing drupal 8 distribution on pantheon
- pantheon_advanced_page_cache
- Drops 8 Scaffolding Failing HOT 1
- Can not call drupal-scaffold script
- Please use a more contemporary php version on composer.json HOT 2
- Use Drupal\MinkExtension instead of Behat default HOT 1
- Documentation: Note that drush_version must be specified in pantheon.yml if not using Drush 8 HOT 11
- CircleCI error [RuntimeException] The .git directory is missing HOT 2
- Static tests fail when using drupal/core:^9 HOT 2
- Github Actions not deploying new builds HOT 8
- Could not scan for classes inside "web/core/lib/Drupal/Core/Http/InputBag.php" which does not appear to be a file nor a folder HOT 2
- Pushing back VR test results - link no longer works HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from example-drops-8-composer.