Repository navigation
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.
Resolve remote workflow names for logs targets #59454
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
Uh oh!
There was an error while loading. Please reload this page.
Resolve remote workflow names for logs targets #59454
Changes from all commits
a227d25File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/diagnosing-bugs] Confirmed regression:
matchRemoteWorkflowNamematches on the file-derived key (no extension), butsplitCrossRepoWorkflowTarget/resolveLogsWorkflowTargetleave file targets likeowner/repo/.github/workflows/daily-report.ymlwith the.ymlsuffix intact, so this new resolution step now fails cross-repo file targets that worked before this PR.💡 Repro + fix
I reproduced this with a standalone test:
The root cause (mismatched display name) is fixed, but a second pre-existing normalization gap (extension not stripped for file-path targets before matching) is now newly exercised by this code path. Normalize
target.workflowName(e.g. vianormalizeWorkflowID) before callingmatchRemoteWorkflowName, and add a regression test for a.yml/.md-suffixed file target.@copilot please address this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/tdd]
resolveRemoteLogsWorkflowTargetsWithFetcherhas no test for the multi-target/repo-cache behavior it advertises (single fetch per repo, skip-on-error preserving other targets, per-repo error reuse). Only a single successful target is exercised.💡 Suggested test cases
repoOverride, assertfetchWorkflowsis called exactly once (e.g. via a call counter closure).workflow not found).fetchWorkflowsreturning an error for a repo with two targets: assert both targets getfailed to resolve workflow nameerrors and the fetch is attempted only once (errorsByRepocache hit).workflowNamestill carries a.yml/.mdsuffix (file-path target), to catch the normalization gap noted in the other comment.Without these, the repository-cache and skip-unresolved logic described in the PR body can silently regress.
@copilot please address this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new test only exercises a single happy-path target, so the repository-level cache and partial-failure behavior added in
resolveRemoteLogsWorkflowTargetsWithFetchercan regress unnoticed. A second target in the same repo and an unresolved target in the same batch are the cases that prove this logic actually preserves successful targets while reusing the cached workflow list.💡 Add a batch test that covers the new control flow
The new code introduces two behaviors that are easy to break independently:
Without a test like this, a future refactor can accidentally re-fetch per target or drop all results after the first unresolved workflow, and this PR would still pass.
Uh oh!
There was an error while loading. Please reload this page.