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

Automated release workflow #2649

Merged
merged 56 commits into from Nov 1, 2022
Merged

Conversation

trask
Copy link
Member

@trask trask commented Apr 28, 2022

Hey all!

We've spent a lot of time lately improving our release workflow in the OTel Java repos, and I'd like to see if our toil and pain can be of any benefit to other repos (starting with python of course!).

I also think there's some benefit of shared cross-SIG knowledge going forward if we follow somewhat similar workflow practices.

I've tried to document things here: https://github.com/trask/repository-template/blob/main/template-docs/release-automation.md

Some highlights in this PR:

  • Uses -dev version suffix on main (@lzchen mentioned you were thinking about doing this anyways)
  • The release workflow autogenerates the release notes from the change log and publishes the github release
  • Uses the bot workaround discussed in Add github-actions[bot] to EasyCLA allowlist community#809 (comment) (maybe we should consider creating a shared otel bot that all repos could use?)
  • The branch names are based on the minor release (e.g. release/v1.12.x-0.31bx), and patch releases are made out of those same branches. Tags are still applied to each individual release.

New complications in this repo that we hadn't faced in the Java repos:

  • Separate versions for stable/unstable components (this wasn't a big deal, just a bit more workflow code to handle/increment them both).
  • I tried adding the Skip Changelog label to the generated pull requests that target main, but that requires giving the bot triage rights to the repo, so instead suppressed the changelog workflow when github.actor is the bot.

I'd love to stop by your SIG meeting, but it's always at the same time as the Java SIG 😢. Maybe next week I can sneak away and jump to your meeting for a bit.

Please throw your questions this way though, I'd love to better understand where we can align more, and where things will naturally diverge based on SIG needs/preferences.

@trask trask requested a review from a team as a code owner April 28, 2022 05:45
CHANGELOG.md Outdated Show resolved Hide resolved
@srikanthccv
Copy link
Member

This is nice

@trask
Copy link
Member Author

trask commented May 10, 2022

I should have mentioned, I tested all of these workflows on my python repo fork, though there may still be a hiccup or two on the first try here. I'd be happy to coordinate and be online with you during the first release using these new workflows if you are interested.

@srikanthccv
Copy link
Member

Sorry I haven't gotten a time to review this in detail but there are many things I like about this. Team has been focused on getting the rc for metrics work for the past few weeks. So it might take sometime before we review and get it merged.

RELEASING.md Outdated Show resolved Hide resolved
RELEASING.md Outdated Show resolved Hide resolved
RELEASING.md Show resolved Hide resolved
RELEASING.md Show resolved Hide resolved
RELEASING.md Show resolved Hide resolved
RELEASING.md Outdated Show resolved Hide resolved
RELEASING.md Outdated Show resolved Hide resolved
RELEASING.md Outdated Show resolved Hide resolved
RELEASING.md Show resolved Hide resolved
RELEASING.md Show resolved Hide resolved
RELEASING.md Outdated Show resolved Hide resolved
RELEASING.md Show resolved Hide resolved
@trask
Copy link
Member Author

trask commented May 11, 2022

@lzchen thanks for all the comments! I have made several updates and I think replied to all of your comments, happy to make further updates

@srikanthccv
Copy link
Member

@trask will it be possible for you to attend tomorrow python SIG meeting and present it to all?

@trask
Copy link
Member Author

trask commented May 19, 2022

@trask will it be possible for you to attend tomorrow python SIG meeting and present it to all?

yes, I'll plan on it, would it work to join at 9:30am Pacific Time?

@srikanthccv
Copy link
Member

That should work

@lzchen
Copy link
Contributor

lzchen commented May 19, 2022

@trask

Will be approving after the rc case has been confirmed to work.

@trask
Copy link
Member Author

trask commented May 20, 2022

I updated the workflow to work with "pre-release" versions, e.g. "1.13.0rc", and tested making a "pre-release" in https://github.com/trask/repository-template/releases/tag/v1.1.0rc.

I'll re-test the full workflow in my opentelemetry-python fork one last time once everything is approved, but first could use some help resolving the build error below:

ERROR: Cannot install opentelemetry-instrumentation-requests==0.31b0, opentelemetry-sdk==1.13.0.dev0 and opentelemetry-semantic-conventions 0.32b0.dev0 (from /home/runner/work/opentelemetry-python/opentelemetry-python/opentelemetry-semantic-conventions) because these package versions have conflicting dependencies.

The conflict is caused by:
The user requested opentelemetry-semantic-conventions 0.32b0.dev0 (from /home/runner/work/opentelemetry-python/opentelemetry-python/opentelemetry-semantic-conventions)
opentelemetry-sdk 1.13.0.dev0 depends on opentelemetry-semantic-conventions==0.32b0-dev
opentelemetry-instrumentation-requests 0.31b0 depends on opentelemetry-semantic-conventions==0.31b0

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

@trask
Copy link
Member Author

trask commented Oct 24, 2022

Rebased and re-tested the release process (both minor and patch) in my fork.

I realized that the backport automation (for patches) will fail currently most of the time due to change log conflicts. I think I can make the backport automation smarter and handle that, but I don't think it's necessarily required for landing this PR, as backports for patch releases can still be done manually.

Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

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

Thanks, We will need to do this for contrib as well, not necessarily immediately.

@srikanthccv
Copy link
Member

Ah I see the failed jobs are because the contrib versions are not .dev and fail to work. I think it's going to some effort to create same for contrib. We can mark not required for the time being but I would like to see that addressed soon as well. What do you think @lzchen

@lzchen
Copy link
Contributor

lzchen commented Oct 31, 2022

@srikanthccv
When you say marked not required, do you mean marking the contrib tests as not required for merging? I am fine with that for now. As for how to fix the builds in the near future, it should simply be marking the contrib versions with dev right?

@srikanthccv
Copy link
Member

When you say marked not required, do you mean marking the contrib tests as not required for merging? I am fine with that for now

I was talking about the trace-context job, the contrib-build tests are already not marked required.

As for how to fix the builds in the near future, it should simply be marking the contrib versions with dev right?

Yes.

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.

None yet

5 participants