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

[chore] add update version automation workflow for artifacts release #684

Conversation

jackgopack4
Copy link
Contributor

@jackgopack4 jackgopack4 commented Oct 2, 2024

Add quality-of-life enhancement to automate bumping version number in the Makefile as well as the various distribution manifests (as the number of distros grows, this step will become more of a pain).

Feel free to run in your own fork to verify; also see the successful run in my fork:
https://github.com/jackgopack4/opentelemetry-collector-releases/actions/runs/12320554731/job/34390067049
As well as the generated PR in my fork:
jackgopack4#23

If this gets merged I will open a PR to update collector release doc in opentelemetry-collector repo.

Automatic version bump (increase minor version number) is default behavior; this can be overridden by providing a manual version number update (like bugfix v0.110.0 -> v0.110.1)

@jackgopack4 jackgopack4 requested a review from a team as a code owner October 2, 2024 14:40
@jackgopack4 jackgopack4 changed the title add update version automation workflow for artifacts release [chore] add update version automation workflow for artifacts release Oct 2, 2024
Copy link
Member

@andrzej-stencel andrzej-stencel left a comment

Choose a reason for hiding this comment

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

I 💯 agree that bumping the version should be a simple, single step. This change implements this as a series of steps in GitHub Actions, which makes it not usable if you want to run it outside of GitHub Actions. I'd rather see a shell script written that does the version updates, and that script called as a single step in GitHub Actions. Committing changes should be separate from the script, so that anyone can run the script locally and preview the changes before making it a commit.

Note that there are (to my knowledge) three potentially different versions that need to be bumped in the manifests, as described here:

  • stable components all use the stable version - currently v1.15.0
  • unstable components from core repository use the core's version - currently v0.109.0
  • unstable components from contrib repository use the contrib's version - currently v0.109.0

The core and contrib versions are usually the same, but they are not guaranteed to be the same.

@jackgopack4
Copy link
Contributor Author

jackgopack4 commented Oct 3, 2024

I 💯 agree that bumping the version should be a simple, single step. This change implements this as a series of steps in GitHub Actions, which makes it not usable if you want to run it outside of GitHub Actions. I'd rather see a shell script written that does the version updates, and that script called as a single step in GitHub Actions. Committing changes should be separate from the script, so that anyone can run the script locally and preview the changes before making it a commit.

Would be happy to do it this way, just was modeling it after the existing action script in collector core: https://github.com/open-telemetry/opentelemetry-collector/blob/main/.github/workflows/prepare-release.yml

(EDIT: just realized that only uses github actions to take in the variables and passes them to a Bash script; will make similar changes)

Note that there are (to my knowledge) three potentially different versions that need to be bumped in the manifests, as described here:

  • stable components all use the stable version - currently v1.15.0
  • unstable components from core repository use the core's version - currently v0.109.0
  • unstable components from contrib repository use the contrib's version - currently v0.109.0

Got it, will add stable and beta component update

@jackgopack4
Copy link
Contributor Author

@andrzej-stencel made the changes you requested; runs in one bash script that can be ran locally in addition to in github actions and adds stable/beta functionality

mx-psi pushed a commit to open-telemetry/opentelemetry-collector that referenced this pull request Oct 7, 2024
…ge" (#11379)

Reverts #11234

The PR to publish container images for builder
open-telemetry/opentelemetry-collector-releases#671
has not been merged yet (neither has the one adding "Update version"
workflow
open-telemetry/opentelemetry-collector-releases#684).
We should only publish these docs after the images are published.

Fixes
#11347
.github/workflows/scripts/bump-versions.sh Outdated Show resolved Hide resolved
.github/workflows/update-version.yaml Outdated Show resolved Hide resolved
.github/workflows/scripts/bump-versions.sh Outdated Show resolved Hide resolved
.github/workflows/scripts/bump-versions.sh Outdated Show resolved Hide resolved
.github/workflows/scripts/bump-versions.sh Outdated Show resolved Hide resolved
Copy link
Member

@andrzej-stencel andrzej-stencel left a comment

Choose a reason for hiding this comment

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

The script in the current form does not update the following places:

  • otelcol_version and version in manifest.yaml files
  • OTELCOL_BUILDER_VERSION in Makefile

I think the script should use the --next-beta-core version for the OTELCOL_BUILDER_VERSION in Makefile and for the otelcol_version field in manifests. As for the version field in manifest, it's probably max(next_beta_core, next_beta_contrib). Or we could add a new parameter to the script and action to specify it.

.github/workflows/scripts/bump-versions.sh Outdated Show resolved Hide resolved
.github/workflows/scripts/bump-versions.sh Outdated Show resolved Hide resolved
@jackgopack4
Copy link
Contributor Author

jackgopack4 commented Dec 13, 2024

successful release PR in my fork: jackgopack4#22

@jackgopack4 jackgopack4 marked this pull request as ready for review December 13, 2024 16:30
@jackgopack4
Copy link
Contributor Author

@andrzej-stencel @mx-psi waiting for checks to run but I feel better about this attempt. incorporated feedback from code review and added changelog step

@jackgopack4
Copy link
Contributor Author

jackgopack4 commented Dec 13, 2024

The script in the current form does not update the following places:

  • otelcol_version and version in manifest.yaml files
  • OTELCOL_BUILDER_VERSION in Makefile

I think the script should use the --next-beta-core version for the OTELCOL_BUILDER_VERSION in Makefile and for the otelcol_version field in manifests. As for the version field in manifest, it's probably max(next_beta_core, next_beta_contrib). Or we could add a new parameter to the script and action to specify it.

addressed both of these. well for version I just set it to next beta core, but if we run into the issue where contrib is updated but core isn't we can address it then.

@jackgopack4 jackgopack4 force-pushed the automate-version-update-artifact-release branch 2 times, most recently from 75bb28a to 17be504 Compare December 13, 2024 18:00
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@andrzej-stencel andrzej-stencel left a comment

Choose a reason for hiding this comment

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

Thank you for your patience with my comments @jackgopack4. Just a couple small things and this will be ready to merge.

.github/workflows/update-version.yaml Outdated Show resolved Hide resolved
.github/workflows/update-version.yaml Outdated Show resolved Hide resolved
.github/workflows/update-version.yaml Outdated Show resolved Hide resolved
.github/workflows/scripts/bump-versions.sh Outdated Show resolved Hide resolved
.github/workflows/scripts/bump-versions.sh Outdated Show resolved Hide resolved
.github/workflows/scripts/bump-versions.sh Show resolved Hide resolved
.github/workflows/scripts/bump-versions.sh Show resolved Hide resolved
.github/workflows/scripts/bump-versions.sh Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
HongChenTW pushed a commit to HongChenTW/opentelemetry-collector that referenced this pull request Dec 19, 2024
…ge" (open-telemetry#11379)

Reverts open-telemetry#11234

The PR to publish container images for builder
open-telemetry/opentelemetry-collector-releases#671
has not been merged yet (neither has the one adding "Update version"
workflow
open-telemetry/opentelemetry-collector-releases#684).
We should only publish these docs after the images are published.

Fixes
open-telemetry#11347
@jackgopack4 jackgopack4 requested a review from a team as a code owner December 31, 2024 17:16
@jackgopack4 jackgopack4 requested a review from a team as a code owner December 31, 2024 17:16
@jackgopack4 jackgopack4 force-pushed the automate-version-update-artifact-release branch 2 times, most recently from cc60fe8 to 10d6da3 Compare December 31, 2024 17:28
@jackgopack4 jackgopack4 force-pushed the automate-version-update-artifact-release branch from 10d6da3 to 21f8e49 Compare December 31, 2024 17:30
Copy link
Member

@andrzej-stencel andrzej-stencel left a comment

Choose a reason for hiding this comment

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

Thanks Jack!

@andrzej-stencel andrzej-stencel added this pull request to the merge queue Jan 3, 2025
Merged via the queue into open-telemetry:main with commit 6102ef0 Jan 3, 2025
53 checks passed
github-merge-queue bot pushed a commit to open-telemetry/opentelemetry-collector that referenced this pull request Jan 3, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
updates documentation to include changes in
open-telemetry/opentelemetry-collector-releases#684

<!--Describe what testing was performed and which tests were added.-->
#### Testing
run locally and via workflows in jackgopack4 fork
<!--Describe the documentation added.-->
#### Documentation
updates to release.md in docs folder
<!--Please delete paragraphs that you did not use before submitting.-->
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.

2 participants