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

Break a generic copy function out of deploy_to_s3. #19251

Merged
merged 2 commits into from
Jun 6, 2023
Merged

Conversation

benjyw
Copy link
Contributor

@benjyw benjyw commented Jun 5, 2023

This will allow us to support copying non deploy-related
files to s3 during CI.

The first example (in a follow-on change) being the pytest
XML output files, so we can gather test performance data.

@benjyw benjyw added the category:internal CI, fixes for not-yet-released features, etc. label Jun 5, 2023
@benjyw benjyw requested a review from jsirois June 5, 2023 21:47
@benjyw
Copy link
Contributor Author

benjyw commented Jun 5, 2023

I've verified that deploy_to_s3.py and backfill_s3_release_tag_mappings.py generate identical aws commands before and after the change.

@jsirois
Copy link
Contributor

jsirois commented Jun 5, 2023

It seems like it would be more prudent to use https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts and save money. Was that considered?

)
except subprocess.CalledProcessError as ex:
logger.error(f"Process `{' '.join(args)}` failed with exit code {ex.returncode}.")
logger.error(f"stdout:\n{ex.stdout.decode()}\n")
Copy link
Contributor

Choose a reason for hiding this comment

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

You could text=True the run call and save a bit of hoops here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just copied that from its previous location unchanged.

@benjyw
Copy link
Contributor Author

benjyw commented Jun 5, 2023

It seems like it would be more prudent to use https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts and save money. Was that considered?

I thought about it, and we could. Downloading those is a bit annoying because you have to know the RUN_ID of the run, unless you download the artifact for all runs. So there would be more GH API tennis.

The S3 cost of storing the XML files should be completely in the noise compared to our current heavyweight use of S3 for binaries, and our new use of it for remote caching. If we decide we want to move off S3 (that's probably sensible to consider) I would try and go by order of size/cost.

@benjyw benjyw requested a review from huonw June 5, 2023 22:16
@benjyw benjyw merged commit 2be7a2c into main Jun 6, 2023
@benjyw benjyw deleted the benjyw_copy_to_s3 branch June 6, 2023 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:internal CI, fixes for not-yet-released features, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants