Giter VIP home page Giter VIP logo

Comments (9)

ElijahLynn avatar ElijahLynn commented on August 16, 2024

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.

ElijahLynn avatar ElijahLynn commented on August 16, 2024

Oh my, it did work this time, but instead of deleting the PR that it came from it deleted ALL PR-N multidevs...

https://github.com/pantheon-systems/example-drops-8-composer/blob/master/.circleci/scripts/pantheon/04-merge-master#L24-L26

# 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.

ElijahLynn avatar ElijahLynn commented on August 16, 2024

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.

ElijahLynn avatar ElijahLynn commented on August 16, 2024

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.

greg-1-anderson avatar greg-1-anderson commented on August 16, 2024

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.

ElijahLynn avatar ElijahLynn commented on August 16, 2024

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.

greg-1-anderson avatar greg-1-anderson commented on August 16, 2024

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.

ataylorme avatar ataylorme commented on August 16, 2024

@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.

ElijahLynn avatar ElijahLynn commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.