8000 Make version guessing more deterministic if two branches appear to be the base of a feature branch by Seldaek · Pull Request #12129 · composer/composer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make version guessing more deterministic if two branches appear to be the base of a feature branch #12129

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

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

Seldaek
Copy link
Member
@Seldaek Seldaek commented Sep 25, 2024

This caused issues for example https://github.com/phpstan/phpstan-src/actions/runs/10707505997/job/29687642092

Where a PR based on an 1.12 branch of PHPStan had an equal diff to the 2.0 branch:

$ 'git' 'rev-list' 'remotes/origin/2.0.x..37fe841588827442002752de801040744699aa3b'
37fe841588827442002752de801040744699aa3b
bdf9b1dc66709de86486a1ffbeca086cb589873e

$ 'git' 'rev-list' 'remotes/origin/1.12.x..37fe841588827442002752de801040744699aa3b'
37fe841588827442002752de801040744699aa3b
bdf9b1dc66709de86486a1ffbeca086cb589873e

Then due to the parallelism involved when running the rev-list commands, it would sometimes return 1.12.x-dev and sometimes 2.0.x-dev, failing builds at random.

This makes it more deterministic, and hopefully more often correct too.

Targetting for 2.8 because it's a possibly risky change even tho a bug fix.

@Seldaek Seldaek added the Bug label Sep 25, 2024
@Seldaek Seldaek added this to the 2.8 milestone Sep 25, 2024
@Seldaek Seldaek requested a review from naderman September 25, 2024 14:30
@Seldaek Seldaek merged commit d37dd5f into composer:main Sep 26, 2024
20 checks passed
@Seldaek Seldaek deleted the deterministic_guess branch September 26, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0