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

Correct counting of indirect-failed packages #72

Merged
merged 5 commits into from
Sep 23, 2024
Merged

Conversation

bsiegert
Copy link
Owner

Fixes #70.

This changes the algorithm to determine failed dependencies like pbulk does.

A package is now only considered to "break" another package if it is Failed or Prefailed, not IndirectFailed or IndirectPrefailed.

So if a depends on b depends on c, and c failed to build, a's failed dependency is c, not b. There is a test for exactly this!

Tested locally. The test dataset looks very different now!

NB: Once deployed, this will only be used in newly published build reports. Older ones will continue using the old method.

This fixes a few typos introduced in the last set of commits.
It also contains the result of "go mod tidy". The set of dependencies
is a bit smaller now.
PkgsFromReport used to do two things: parse the machine-readable report
and prune the dependencies to actually failed ones. Now it only does the
former and is called ResultsFromReport. FixUpDependencies does the
latter.
The new test tests only the parsing. A separate test tests the
dependency pruning.
A package is now only considered to "break" another package if it is
Failed or Prefailed, not IndirectFailed or IndirectPrefailed.

So if a depends on b depends on c, and c failed to build, a's failed
dependency is c, not b. (There is a test for exactly this!)

This matches how pbulk does it and is more correct and useful.
@bsiegert bsiegert merged commit 97a0197 into sql Sep 23, 2024
5 checks passed
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.

Failed dependency counts differ from pbulk output
1 participant