Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified BIN +58 Bytes (100%) pkg/cmd/run/view/fixtures/run_log.zip
Binary file not shown.
1 change: 1 addition & 0 deletions 1 pkg/cmd/run/view/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ func logFilenameRegexp(job shared.Job, step shared.Step) *regexp.Regexp {
// * Truncate long job names
//
sanitizedJobName := strings.ReplaceAll(job.Name, "/", "")
sanitizedJobName = strings.ReplaceAll(sanitizedJobName, ":", "")
Copy link
Member

Choose a reason for hiding this comment

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

Just because the run_log.zip is a binary, here are all the changes being made:

$ diff -r ~/Downloads/run_log ~/Downloads/run_log\ \(1\) 
Only in /Users/andyfeller/Downloads/run_log: .DS_Store
Only in /Users/andyfeller/Downloads/run_log: cool job  with colon

$ cat ~/Downloads/run_log/cool\ job\ \ with\ colon/1_fob\ the\ barz.txt 
log line 1
log line 2
log line 3

sanitizedJobName = truncateAsUTF16(sanitizedJobName, JOB_NAME_MAX_LENGTH)
re := fmt.Sprintf(`^%s\/%d_.*\.txt`, regexp.QuoteMeta(sanitizedJobName), step.Number)
return regexp.MustCompile(re)
Expand Down
12 changes: 12 additions & 0 deletions 12 pkg/cmd/run/view/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1522,6 +1522,18 @@ func Test_attachRunLog(t *testing.T) {
// not the double space in the dir name, as the slash has been removed
wantFilename: "cool job with slash/1_fob the barz.txt",
},
{
name: "job name with colon matches dir with colon removed",
job: shared.Job{
Name: "cool job : with colon",
Steps: []shared.Step{{
Name: "fob the barz",
Number: 1,
}},
},
wantMatch: true,
wantFilename: "cool job with colon/1_fob the barz.txt",
},
{
name: "Job name with really long name (over the ZIP limit)",
job: shared.Job{
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.