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

Automate per-package release for specific components #2875

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

lmolkova
Copy link
Contributor

@lmolkova lmolkova commented Sep 17, 2024

Description

Adds automation allowing to release individual components.
Packages that can be released individually are:

  • excluded from the main release
  • must have individual changelog
  • follow the same release process and versioning rules:
    • prepare minor/patch that creates
      • long-term package-release/{package}/v{version} branch
      • PRs to update changelog and versions in release branch and main
    • release
  • adds changelogs and versions for for components that are currently released manually as individual packages (opentelemetry-resource-detector-azure, opentelemetry-sdk-extension-aws, opentelemetry-propagator-aws-xray)

Related to #2858

Type of change

How Has This Been Tested?

Tested in the fork https://github.com/lmolkova/opentelemetry-python-contrib/actions

  • Preparing + releasing new minor or patch version of an unstable package
  • Preparing + releasing 'common'

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated

@lmolkova lmolkova marked this pull request as ready for review September 19, 2024 16:40
@lmolkova lmolkova requested a review from a team as a code owner September 19, 2024 16:40
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

> [!NOTE]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you envision this to be a temporary place to hold this note? Will we constantly be updating this when gen-ai instrumentations are added? Perhaps we put all gen-ai instrumentations in the future in a specific folder and outline that components in that folder will also have individual changelogs?

Copy link
Contributor Author

@lmolkova lmolkova Sep 19, 2024

Choose a reason for hiding this comment

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

I think that in the long term we should support individual release for all components (including existing non-gen-ai ones).

I.e. the central CHANGELOG would disappear.

I'm going to steal the following approach from js-contrib:

As of v0.25.1 (2022-01-24) changelog content has moved to separate CHANGELOG.md files for each package. Use this search for a list of all CHANGELOG.md files in this repo.

to avoid listing all changelogs here explicitly

RELEASING.md Outdated Show resolved Hide resolved
>
> These libraries are also excluded from the general patch release.

Per-package patch release preparation is handled by the [`[Package] Release`](./.github/workflows/package-release.yml) workflow that allows
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Per-package patch release preparation is handled by the [`[Package] Release`](./.github/workflows/package-release.yml) workflow that allows
Per-package release is handled by the [`[Package] Release`](./.github/workflows/package-release.yml) workflow that allows


version=${version_dev%.dev}

version_file=$(find $path -type f -name "version.py")
Copy link
Contributor

Choose a reason for hiding this comment

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

@ocelotl

Could potentially affect this pr

version_file=$(find $path -type f -name "version.py")
file_count=$(echo "$version_file" | wc -l)

if [ "$file_count" -ne 1 ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Should we verify that there is a CHANGELOG as well?

@@ -20,17 +20,21 @@

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Can we refactor the comments at the top of this file to reflect the new usage of this script (since we aren't using the push-to-tag mechanism anymore)?

# This script copies release notes for the current version from CHANGELOG.md file
# and stores them in /tmp/release-notes.txt.
# It also stores them in a /tmp/CHANGELOG_SECTION.md which is used later to copy them over to the
# CHANGELOG in main branch which is done by merge_changelog_to_main script.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Can we include that this script is only being used for package-release.yml workflow?

Copy link
Contributor

@lzchen lzchen left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for working on this! Just a few minor comments. Feel free to reach out to one of the maintainers to actually test this out with an actual package once it is merged.

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.

4 participants