Merged
Conversation
mfrw
reviewed
May 8, 2025
Member
mfrw
left a comment
There was a problem hiding this comment.
Can we please add some documentation on how to use this :)
dmcilvaney
reviewed
May 8, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR extends the build failure logging to help diagnose sporadic build failures by printing hidden build blockers and refactoring unresolved dependency computations.
- Added a new function PrintHiddenBuildBlockers in printresults.go to log potentially hidden blockers when no obvious failures are present.
- Refactored the unresolved dependencies computation by extracting a new helper getUnresolvedDependencies.
- Updated the fatal error message in scheduler.go to include the build log file for augmented troubleshooting.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| toolkit/tools/scheduler/schedulerutils/printresults.go | Added logging of hidden build blockers and refactored unresolved dependencies handling. |
| toolkit/tools/scheduler/schedulerutils/depsolver.go | Added a helper to build a subgraph of blocked nodes to support the new logging. |
| toolkit/tools/scheduler/scheduler.go | Updated fatal error messaging and added call to PrintHiddenBuildBlockers. |
| toolkit/tools/internal/pkggraph/pkggraph_test.go | Extended test coverage for new unresolved nodes functionality. |
| toolkit/tools/internal/pkggraph/pkggraph.go | Added AllUnresolvedNodes helper function. |
| toolkit/tools/internal/pkggraph/graphprinter*.go | New and updated files for graph printing functionality. |
Comments suppressed due to low confidence (2)
toolkit/tools/scheduler/schedulerutils/printresults.go:162
- [nitpick] Consider including the goal node identifier or additional context in this log message to aid in debugging hidden blockers when the build unexpectedly fails.
logger.Log.Errorf("Detected a blocked build despite no obvious failures.")
toolkit/tools/scheduler/scheduler.go:228
- [nitpick] Ensure that the fatal error message format remains consistent with other modules, and verify that the inclusion of the log file provides sufficient context for troubleshooting.
logger.Log.Fatalf("Unable to build package graph.\nFor details see the build summary section above and the build log '%s'.\nError: %s.", *logFlags.LogFile, err)
dmcilvaney
approved these changes
May 8, 2025
2573adf to
2e61194
Compare
anphel31
approved these changes
May 13, 2025
jslobodzian
approved these changes
May 14, 2025
jslobodzian
approved these changes
May 15, 2025
rlmenge
added a commit
to rlmenge/CBL-Mariner
that referenced
this pull request
May 23, 2025
This reverts commit 8a67fc4.
This was referenced May 23, 2025
AkarshHCL
pushed a commit
to AkarshHCL/azurelinux
that referenced
this pull request
Jul 31, 2025
SumitJenaHCL
pushed a commit
to SumitJenaHCL/azurelinux
that referenced
this pull request
Aug 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./SPECS/LICENSES-AND-NOTICES/data/licenses.json,./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md,./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
Occasionally we get hit by build failures even though the build summary indicates that all packages built without issues and no specific details to the reason why the build failed are displayed. These failures seem to be random and hard to reproduce.
This change adds additional logging to be printed for such cases to help identify any dangling, unresolved nodes in the build graph, which may help us debug this issue.
Sample outputs:
Printing all nodes, even duplicates.

Skipping duplicates.

Does this affect the toolchain?
No.
Associated issues
Test Methodology