elastic / apm-agent-rum-js

https://www.elastic.co/guide/en/apm/agent/rum-js/current/index.html
MIT License
274 stars 130 forks source link

Move the release process to our CI #518

Open hmdhk opened 4 years ago

hmdhk commented 4 years ago

One of the requirements for deploying the agent bundles on Elastic CDN is to have our release process in our CI/CD.

The release process should:

@elastic/observablt-robots Would you please verify if we can provide these requirements?

v1v commented 4 years ago

Regarding our chat please find below the notes:

Release in the CI with a 2FA

It does require to validate the 2FA.

Lerna is the one in charge to facilitate the release/package for all the packages in the repo.

The CI release is tag release event-based, for such, a particular meta-tag will be created to:

Questions

Requirements

Actions

To support a CDN for the unreleased packages

For such, we will see if the current artifactory service does support the Npm registry and then automate the upload process with the CI pipeline.

Questions

Requirements

Actions

v1v commented 4 years ago

Updates for @v1v will work on the PoC to support the 2FA automation with the infra team.

PoC in place:

Actions:

v1v commented 4 years ago

Make sure any failure during the release process is recoverable

This is a bit tricky, as the worst-case scenario might imply, IIUC, a new release.

What do you mean with this requirement?

v1v commented 4 years ago

Generate a PR with all of the automatically generated changelogs and also provide the team to amend that PR.

The release does already care about this particular feature for the packages, but not for the top-level changelog.

So I'd see if we can automate this process, as we do have some mechanism in place to create PRs and so on.

hmdhk commented 4 years ago

@v1v , I wanted to have an overview of the things that can go wrong at different stages during our release process and how to recover from those. This might just be that we document these in the repo. For example, if release process can push a new release commit to github but it can not publish to npm (for whatever reason).

Also I think we can not use the release process for major releases due to the way lerna generates package versions.

v1v commented 4 years ago

For example, if release process can push a new release commit to github but it can not publish to npm (for whatever reason).

The release process in the CI is the one defined in the steps already done manually which are documented. So, if something went bad then the recovery steps should be similar to the ones you could find when running locally, or do you foresee any other issues?

Also I think we can not use the release process for major releases due to the way lerna generates package versions.

really? Uhm, what's the issue with lerna? and how do you run the release process for major versions locally? If that's a cornercase with a different steps to be execute, we could potentially added to the CI

v1v commented 4 years ago

To support a CDN for the unreleased packages

hmdhk commented 4 years ago

Thanks for the effort @v1v! While using the full version for the folder is fine, I think we need to copy the same assets to a few places for ease of use. As an example the when we make the release version 5.1.2, the following assets should be uploaded/updated:

hmdhk commented 3 years ago

@v1v , Regarding the changelogs, I think having a reminder about fixing the toplevel changelog is very useful for us. Can we change the release process so that it creates a PR with all the changes from CHANGELOG.md files concatenated into the toplevel changelog file. With that we can edit that file in the PR itself and merge, it also serves as a reminder.

Two separate notes,

  1. Can we make a new menu option just for release with parameters correctly set according to https://github.com/elastic/apm-agent-rum-js/blob/master/RELEASE.md#ci-based ? It kind of feels weird to have to check/uncheck the correct parameters everytime.
  2. Is it possible to make a slack post in the apm-agent-js channel about the release process, specially when it requires confirmation?

These two are nice to haves, so I'm happy to create separate issues for them, if you want.

v1v commented 3 years ago

Thanks @jahtalab

Regarding the changelogs.

I can work on automating this process and raise a PR with all those changes.

1) Can we make a new menu option just for release with parameters correctly set according to https://github.com/elastic/apm-agent-rum-js/blob/master/RELEASE.md#ci-based ?

There is no such a feature in the CI. Those parameters help to drive certain scenarios that are not defaulted. The release process might not require to run the benchmark again for a commit that was already tested previously.

We could potentially skip those parameters's behaviour if selecting the release and the branch is master. But if so, it might mislead a bit. What do you think?

See https://github.com/elastic/apm-agent-rum-js/pull/909

2) s it possible to make a slack post in the apm-agent-js channel about the release process, specially when it requires confirmation?

See https://github.com/elastic/apm-agent-rum-js/pull/908 (still draft since I need to test everything works as expected)