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

Conversation

malikchaya2
Copy link
Member

@malikchaya2 malikchaya2 commented Feb 14, 2025

DEVPROD-11818

Description

Evergreen fetch uses the build variant as part of the directory name when fetching artifacts. Build variants are sometimes generated with very long names (a user reported a 256 character long path name). This change limits the build variant name to 100 characters.

Documentation

The directory name is currently not documented anywhere (and mongodb/mongo doesn't seem to be relying on it) so I don't think we need to send out any communications or update any documentation. Please let me know if you disagree.

@malikchaya2 malikchaya2 requested a review from a team February 14, 2025 17:22
@@ -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.

@malikchaya2 malikchaya2 requested a review from ablack12 February 19, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants