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-13971 Add temporary role arn to s3 commands #8682

Merged
merged 10 commits into from
Feb 11, 2025

Conversation

ZackarySantana
Copy link
Contributor

@ZackarySantana ZackarySantana commented Jan 30, 2025

DEVPROD-13971

Description

This PR adds a temporary role arn to the s3 get and s3 put commands. This role arn will be upgraded to a permanent addition but some more work is needed to make the feature fully fledged.

I also threaded some internal buckets just for otel for now. Later on in the project, it will be used in the commands.

Testing

Unit tests. I also ran this staging task that uploads to a brand new bucket that only trusts the specific role I included in the task (relevant log line).

The bucket before:
Screenshot 2025-02-06 at 11 47 18 AM

The bucket after:
Screenshot 2025-02-06 at 11 52 59 AM

@ZackarySantana ZackarySantana self-assigned this Jan 30, 2025
@ZackarySantana ZackarySantana changed the title DEVPROD-13971 Add temporary role arn and internal bucket checks to s3 commands DEVPROD-13971 Add temporary role arn s3 commands Jan 31, 2025
@ZackarySantana ZackarySantana changed the title DEVPROD-13971 Add temporary role arn s3 commands DEVPROD-13971 Add temporary role arn to s3 commands Jan 31, 2025
@ZackarySantana ZackarySantana requested a review from a team February 6, 2025 16:55
@ZackarySantana ZackarySantana marked this pull request as ready for review February 6, 2025 16:55
@ZackarySantana
Copy link
Contributor Author

Also small note, the artifacts uploaded via this cannot be retrieved by Evergreen (i.e. on the files tab it will give AccessDenied when trying to view the file (unless it has public read access). This is why it is still a temporary and not permanent addition

}
// There must be only one of local_file or extract_to specified.
catcher.NewWhen(c.LocalFile != "" && c.ExtractTo != "", "cannot specify both local file path and directory to extract to")
catcher.NewWhen(c.LocalFile == "" && c.ExtractTo == "", "must specify either local file path or directory to extract to")
Copy link
Contributor

Choose a reason for hiding this comment

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

Ty for converting these to the more modern style of error accumulation! 🙏

agent/command/s3_get.go Outdated Show resolved Hide resolved
agent/command/s3_get.go Outdated Show resolved Hide resolved
agent/command/s3_get.go Outdated Show resolved Hide resolved
agent/command/s3_get.go Outdated Show resolved Hide resolved
@ZackarySantana ZackarySantana merged commit 32e4dde into evergreen-ci:main Feb 11, 2025
10 checks passed
@ZackarySantana ZackarySantana deleted the DEVPROD-13971 branch February 11, 2025 17:46
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