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

handle release/dist tags for published artifacts when there are multiple dev branches #2668

Closed
trentm opened this issue May 2, 2022 · 2 comments
Assignees
Labels
agent-nodejs Make available for APM Agents project planning.
Milestone

Comments

@trentm
Copy link
Member

trentm commented May 2, 2022

A new 4.x major of elastic-apm-node is coming. We will have two active branches: 3.x for 3.x releases and main for 4.x releases. We need to make sure that published artifacts don't collide -- in particular the "latest" tag or marker for the various registries. The plan is detailed in comments below.

Original description:
We have added support for CI-based npm publish ... on new vX.Y.Z version tags. When we do a new major (4.x) and may then have new maintenance releases of the previous major (3.x), then we need to make sure that the npm publish becomes npm publish --tag <some-tag-name-other-than-"latest">. Otherwise a 3.x release will be incorrectly npm-dist-tagged with "latest".

@trentm trentm added this to the next-major milestone May 2, 2022
@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label May 2, 2022
@trentm trentm changed the title add dist-tag to Jenkinsfile-based npm publish ... for non-current-major releases add dist-tag to CI-based npm publish ... for non-current-major releases Jul 25, 2023
@trentm trentm self-assigned this Jul 26, 2023
@trentm
Copy link
Member Author

trentm commented Jul 26, 2023

npm dist-tag plan:

  • we want latest on the current dev branch (currently "main"): use npm publish or npm publish --tag=latest
  • let's use latest-<major>, e.g. "latest-3", for releases from a maintenance branch. When 4.x releases are GA (i.e. no longer prereleases) and 3.x is only for maintenance releases, let's use npm publish --tag=latest-3. We can't publish without a dist-tag, because npm publish doesn't support that, AFAIK.
  • for pre-releases for a new major that is not yet GA, lets use prerelease. Note: We don't plan to publish any prereleases.

docker tag plan:
There is nothing we need to do here, because the current ./dev-scripts/push-docker.sh script (a) publishes docker.elastic.co/observability/apm-agent-nodejs:1.2.3 and (b) only tags and publishes docker.elastic.co/observability/apm-agent-nodejs:latest if the current release tag is the latest according to git tag --list --sort=version:refname "v*".

github releases tag plan:
By default gh release create ... will tag with "latest" by default. Their CLI docs say "automatic based on date and version", which is totally unclear to me. However, apparently gh release create --latest=false ... can be used to avoid that. So the plan is the "3.x" maintenance branch "release.yml" should update to use that --latest=false flag. We could add an explicit --latest flag on the "main" branch.

AWS Lambda Layers tag plan:
There is no tagging of "latest" here, that I know of, so there is nothing to do here.

These are all the published artifacts for a release. (I'm excluding the docs. That will be handled separately.)

@trentm trentm changed the title add dist-tag to CI-based npm publish ... for non-current-major releases handle release/dist tags for published artifacts when there are multiple dev branches Aug 9, 2023
trentm added a commit that referenced this issue Aug 14, 2023
… maintenance branch (#3573)

- chore: simplify and doc push-docker.sh dev script
- some cleanup of CONTRIBUTING content
- docs: better document the release process, prepping for a coming 4.x new major

Refs: #2668
@trentm
Copy link
Member Author

trentm commented Aug 30, 2023

This was all handled in #3573 which was pushed to the "dev/4.x" branch... as long as the newly documented steps in "CONTRIBUTING.md" for a release are followed.

@trentm trentm closed this as completed Aug 30, 2023
@trentm trentm mentioned this issue Aug 30, 2023
24 tasks
fpm-peter pushed a commit to fpm-git/apm-agent-nodejs that referenced this issue Aug 20, 2024
… maintenance branch (elastic#3573)

- chore: simplify and doc push-docker.sh dev script
- some cleanup of CONTRIBUTING content
- docs: better document the release process, prepping for a coming 4.x new major

Refs: elastic#2668
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-nodejs Make available for APM Agents project planning.
Projects
Archived in project
Development

No branches or pull requests

1 participant