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

Upload dependencies to S3 bucket on new tag release #689

Merged
merged 5 commits into from
Apr 18, 2024

Conversation

constanca-m
Copy link
Contributor

What does this PR do?

Uploads dependencies to S3 bucket on new tag release.

This workflow is dependent on workflow release - that is, it waits for the new release to zip all the dependencies and send it to S3 bucket.

You can see more details discussed in issue #683.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.md

Related issues

Closes #683.

@constanca-m constanca-m self-assigned this Apr 17, 2024
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

The changes in this PR look good - nice work.

#685 makes me a little nervous - IIUC we could recreate the tag whenever a change is made to version.py, which seems a little too implicit for my liking.

I think we should make sure some tests are run before releasing any new artifacts. That should probably be done before tagging.

- name: Get version number
shell: bash
run: |
VERSION=$(grep -oE '[0-9]+\.[0-9]+\.[0-9]+(\-[a-zA-Z]+[0-9]+)?' share/version.py)
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps get the tag from git, to avoid duplicating this logic across multiple workflows? e.g. we could use git describe to get the tag for the current branch.

@constanca-m
Copy link
Contributor Author

IIUC we could recreate the tag whenever a change is made to version.py, which seems a little too implicit for my liking.

Indeed, I noticed it too, but I figured there is really no reason to change that file unless to update the version.

I think we should make sure some tests are run before releasing any new artifacts.

What kind of tests? There is the test workflow (make coverage) that is running all the tests, any missing?

I don't mind recreating the PR to make a few changes @axw

@constanca-m
Copy link
Contributor Author

I actually made a mistake on the workflow to release a new tag, so I have to create a new PR on it anyway @axw. The PR is this one #690. Can you post your comments there on:

makes me a little nervous - IIUC we could recreate the tag whenever a change is made to version.py, which seems a little too implicit for my liking.

@axw
Copy link
Member

axw commented Apr 18, 2024

What kind of tests? There is the test workflow (make coverage) that is running all the tests, any missing?

Ah I see. Is that guaranteed to have run before the release workflow?

I guess that's OK to start with, but ideally we would run some smoke tests too, preferably before even tagging. But anyway that can come in a followup.

For reference, apm-aws-lambda runs smoke tests on every push to main: https://github.com/elastic/apm-aws-lambda/blob/main/.github/workflows/smoke-tests.yml. Maybe a little excessive, but there might be some workflows and code that could be reused.

@constanca-m
Copy link
Contributor Author

Ah I see. Is that guaranteed to have run before the release workflow?

Yes, it runs on every PR. The release only works on a push, so only after the tests.

@constanca-m constanca-m merged commit cfab7e7 into elastic:main Apr 18, 2024
4 checks passed
@constanca-m constanca-m deleted the workflow-upload-dependencies branch April 18, 2024 09:48
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.

Create pipeline to push zip file with dependencies to an S3 bucket
2 participants