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

fix(builder): strenghten matching dependencies heuristic #5187

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

squakez
Copy link
Contributor

@squakez squakez commented Feb 27, 2024

The TestRunBuildOrderStrategyMatchingDependencies uses to be flaky. I've investigated and the root cause seems to be the heuristic we are using to detect matching dependencies. The following piece of code missing >= len(required)/2 seem to be the problem, in the sense that when the number of required is odd, then, the code is rounded to a integer value that is not matching the condition. The ideal solution is to add +1 to that division, or removing the equality which would sort the same effect.

This PR address the problem. The heuristic used is strengthen against this corner case and validated with a few unit test.

Release Note

fix(builder): strenghten matching dependencies heuristic

@squakez
Copy link
Contributor Author

squakez commented Feb 27, 2024

Part of #5090 - FYI @lburgazzoli

Copy link
Contributor

✔️ Unit test coverage report - coverage increased from 36% to 36.2% (+0.2%)

@lburgazzoli
Copy link
Contributor

lburgazzoli commented Feb 27, 2024

@squakez can you add some better release notes ? it is not clear to me what is the motivation of this change and how it differs form the current behavior and what would be the impact.

@squakez
Copy link
Contributor Author

squakez commented Feb 27, 2024

@squakez can you add some better release notes ? it is not clear to me what is the motivation of this change and how it differs form the current behavior and what would be the impact.

Sure. Done. Thanks.

Copy link
Contributor

@christophd christophd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work. Thanks!

It failed when we had odd number of dependencies
@squakez squakez force-pushed the chore/strenght_tests branch from 08452f6 to 6ca3ba8 Compare February 28, 2024 10:42
Copy link
Contributor

✔️ Unit test coverage report - coverage increased from 36% to 36.2% (+0.2%)

@squakez squakez merged commit ae661a7 into apache:main Feb 28, 2024
15 checks passed
@squakez squakez deleted the chore/strenght_tests branch February 28, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants