elastic / elastic-serverless-forwarder

Elastic Serverless Forwarder
Other
35 stars 36 forks source link

Upload dependencies to S3 bucket on new tag release #689

Closed constanca-m closed 5 months ago

constanca-m commented 5 months ago

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 https://github.com/elastic/elastic-serverless-forwarder/issues/683.

Checklist

Related issues

Closes https://github.com/elastic/elastic-serverless-forwarder/issues/683.

constanca-m commented 5 months ago

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 commented 5 months ago

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 https://github.com/elastic/elastic-serverless-forwarder/pull/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 commented 5 months ago

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 commented 5 months ago

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.