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

DEVPROD-11818 Limit build variant names to 100 characters in artifacts path name #8716

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion operations/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ type artifactDownload struct {

func getArtifactFolderName(task *service.RestTask) string {
if evergreen.IsPatchRequester(task.Requester) {
return fmt.Sprintf("artifacts-patch-%v_%v_%v", task.PatchNumber, task.BuildVariant, task.DisplayName)
Copy link
Contributor

Choose a reason for hiding this comment

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

if the build variant is less than 100 characters this will panic; we should case on this. Also shouldn't we do this in the non-patch-requester case as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be worth adding a unit test for this function, to ensure the output does what you want.

return fmt.Sprintf("artifacts-patch-%v_%v_%v", task.PatchNumber, task.BuildVariant[:100], task.DisplayName)
}

if len(task.Revision) >= 5 {
Expand Down
Loading