Repository navigation
Add experimental sessions download with legacy run reconstruction #65263
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
Changes from 1 commit
08cbb67
947086d
acf1182
6ef9f7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,6 +125,9 @@ func sessionArtifactName(names []string, base, legacy string) (string, error) { | |
| } | ||
| var matches []string | ||
| for _, name := range names { | ||
| if base == "info" && (strings.HasSuffix(name, "-aw-info") || strings.HasSuffix(name, "-aw_info")) { | ||
| continue | ||
| } | ||
| if strings.HasSuffix(name, "-"+base) || (legacy != "" && strings.HasSuffix(name, "-"+legacy)) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The 💡 Why this blocks merge
That is exactly the mixed historical layout this feature claims to support, so the current matching can reject valid legacy runs or pick the wrong metadata source. The fix should make the workflow-call prefix match exact for the whole artifact name, or special-case
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in |
||
| matches = append(matches, name) | ||
| } | ||
|
|
||
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.
[/codebase-design] This re-implements
audit_command.go'sapplyAuditRepoFlagrepo-slug parsing inline instead of reusing it, and the behavior differs subtly:applyAuditRepoFlagvalidatesowner/repowithstrings.SplitNand rejects malformed input with a clear error, while this path usesrepoutil.NormalizeRepoForAPI+SplitRepoSlug, a different parser with different error semantics.💡 Suggestion
Either extract a single shared helper used by both
auditandsessions, or add a short comment explaining whysessionsintentionally uses therepoutilparser (e.g. because it must also accept a host prefix). As written, a reader has no way to tell if the divergence is intentional, which hurts navigability per/codebase-design.@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.
Clarified in
acf1182:sessionsintentionally usesNormalizeRepoForAPIbecause its--repoflag supports[HOST/]owner/repofor GHES/Proxima; the audit helper only parses plainowner/repo.