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

infra: removing workflow, updating script #734

Merged
merged 5 commits into from
May 26, 2020

Conversation

codeboten
Copy link
Contributor

More work to improve release process:

  • adding RELEASING.md file to describe release process
  • updated prepare_release.sh script to allow it to be run manually by maintainers
  • removed workflow to automatically publish PR, current recommendation from otel technical committee is not to use bot accounts

@codeboten codeboten requested a review from a team May 25, 2020 22:47
# cherry pick the change from the release branch
git cherry-pick $(git log -n 1 origin/release/0.7b0 --format="%H")
# update the version number, make it a "dev" greater than release number, e.g. 0.8.dev0
perl -i -p -e 's/0.7b0/0.8.dev0/' $(git grep -l "0.7b0" | grep -vi CHANGELOG)
Copy link
Contributor

Choose a reason for hiding this comment

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

I know perl is available almost anywhere but still feels a bit strange to depend on it for a python project when a python script could probably have done this. Perhaps the whole flow described in this section could be automated with a py script?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I started on a python script to replace all of this but wont have time to finish it before this week's release. I'm just documenting the current process in this doc.

Copy link
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

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

Approved as I know you're doing a release today. Have some comments that may be worth revisiting later.


If for some reason the action failed, do it manually:

- To avoid pushing untracked changes, check out the repo in a new dir
Copy link
Member

Choose a reason for hiding this comment

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

or git reset --hard?

- updates version and changelog files
- commits the change to a new branch `release/<version>-auto`

*NOTE: This script was run by a GitHub Action but required the Action bot to be excluded from the CLA check, which it currently is not.*
Copy link
Member

Choose a reason for hiding this comment

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

should we fiile an issue around this work? since it is a requirement for complete automation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's an issue here: open-telemetry/community#306 that tracks a migration to EasyCLA which should allow us to start using the GH actions bot again.

@@ -72,10 +72,17 @@ function update_changelog() {
fi
}

# create the release branch
git fetch origin/master
git rebase origin/master
Copy link
Member

Choose a reason for hiding this comment

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

won't this rebase on the current branch, without checking it? is that the intended behavior of this script? It seems like the intent here is to work on the user's local master branch .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yuuuup... missed an ever important checkout step 🤦

@@ -72,10 +72,17 @@ function update_changelog() {
fi
}

# create the release branch
git fetch origin/master
git rebase origin/master
Copy link
Member

Choose a reason for hiding this comment

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

also if the intent is to ensure that the state of the current branch matches that of origin/master, I'd consider using git reset --hard origin/master

# checkout a new branch from master
git checkout -b v0.7b0-master-update
# cherry pick the change from the release branch
git cherry-pick $(git log -n 1 origin/release/0.7b0 --format="%H")
Copy link
Member

Choose a reason for hiding this comment

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

I think I missed a point in previous discussions around this, but I believe cherry-picking commits will result in a completely different git hash, which means diverged git history from the get go between this branch on the master branch.

The end result is to have the same code in both places (the version updates), so I feel like this is a situation that could be handled by a git merge instead. But again, unrelated to the automation that is the focus of this PR.

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.

Nicely explained!

@codeboten codeboten merged commit 1ee85c8 into open-telemetry:master May 26, 2020
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