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

[BEAM-3255] Updating release guide to use Gradle commands #424

Closed
wants to merge 13 commits into from

Conversation

pabloem
Copy link
Member

@pabloem pabloem commented Apr 19, 2018

No description provided.

-DupdateWorkingCopyVersions=false \
-DupdateBranchVersions=true \
-DreleaseVersion="${VERSION}-SNAPSHOT"
git branch ${BRANCH}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to clarify that the branch is to made on the upstream apache/beam repo and pushed, and not on a fork, or is something done by the release plugin?

Copy link
Member Author

Choose a reason for hiding this comment

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

It should be done in the upstream repo. I've mentioned 'Apache' there. LMK what you think.

git branch ${BRANCH}

# Now change the version in existing gradle files, and Python files
sed -i 's/'$RELEASE'/'${NEXT_VERSION_IN_BASE_BRANCH}'/g' build_rules.gradle
Copy link
Member

Choose a reason for hiding this comment

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

The single quotes as written don't just match strings with single quotes.
Maybe
sed -i -e "s/'${RELEASE}'/'${NEXT_VERSION_IN_BASE_BRANCH}'/g" build_rules.gradle

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice! thanks.


Version represents the release currently underway, while next version specifies the anticipated next version to be released from that branch. Normally, 1.2.0 is followed by 1.3.0, while 1.2.3 is followed by 1.2.4.

Use Maven release plugin to create the release branch and update the current branch to use the new development version. This command applies for the new major or minor version. (Warning: this command automatically pushes changes to the code repository.)
**NOTE**: Only if you are doing an incremental/hotfix releasei (e.g. 2.5.1), please check out the previous release tag, before running the following instructions:
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: releasei -> release

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. Thanks Scott.

NEXT_VERSION="1.2.4"
BRANCH_NAME="release-${VERSION}"
DEVELOPMENT_VERSION="${NEXT_VERSION}-SNAPSHOT"
RELEASE_VERSION=2.5.0
Copy link
Member

Choose a reason for hiding this comment

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

Either this should be RELEASE=2.5.0 or occurrences of $RELEASE below changed to match

Copy link
Member Author

Choose a reason for hiding this comment

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

Ugh, sorry about that. Thanks.

-DreleaseVersion=${VERSION} \
-Dtag=${RC_TAG} \
-DupdateWorkingCopyVersions=false
./gradlew release -Prelease.newVersion=${RELEASE_VERSION}-SNAPSHOT \
Copy link
Member

Choose a reason for hiding this comment

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

Is release.newVersion 2.5.0-SNAPSHOT or 2.6.0-SNAPSHOT? ${NEXT_VERSION_IN_BASE_BRANCH}-SNAPSHOT ?

@pabloem

This comment has been minimized.

@pabloem

This comment has been minimized.

@pabloem

This comment has been minimized.

@pabloem

This comment has been minimized.

@pabloem
Copy link
Member Author

pabloem commented Apr 25, 2018

TODO: Add update of runners - and dataflow.container_version.

@pabloem

This comment has been minimized.

@pabloem

This comment has been minimized.

@pabloem
Copy link
Member Author

pabloem commented Apr 25, 2018

TODO: Information on how to create the new key

@swegner
Copy link
Contributor

swegner commented May 1, 2018

I've proposed a set of changes for source distribution here: pabloem#2

@pabloem
Copy link
Member Author

pabloem commented May 1, 2018

I've merged your changes, scott, and added a few to fix some todos that we discovered earlier. I'm still unclear if the instructions to update dataflow.container_version should be here, or in a Dataflow release guide.
@aaltay what should we do with dataflow.container_version?

@swegner
Copy link
Contributor

swegner commented May 2, 2018

@pabloem Can you elaborate on what you're referring to with dataflow.container_version? I don't see this in the existing release documentation or your current changes.

I want to get this unblocked so that we can follow this release guide for the 2.5.0 release.

I seem to recall that we need to update dataflow.container_version as some part of the release, but I don't think the requirements would change with the Gradle migration. Put otherwise: if documentation about dataflow.container_version is missing, then we should track that as a bug, but it shouldn't hold up this doc update.

@pabloem
Copy link
Member Author

pabloem commented May 2, 2018

I think I agree with that. I've covered all the other TODOs that we ran into during our demo with Ahmet. So we can do the final review for this PR.

r: @aaltay PTAL

@jbonofre jbonofre self-requested a review May 3, 2018 18:38
@@ -158,12 +158,11 @@ Adjust any of the above properties to the improve clarity and presentation of th

### Verify that a Release Build Works

Run `mvn -Prelease clean install` to ensure that the build processes that are specific to that
profile are in good shape.
Run `./gradlew -PisRelease clean build` to ensure that the build processes that are specific to that profile are in good shape.
Copy link
Member

Choose a reason for hiding this comment

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

From a clean workspace git clean -fdx, perform ./gradlew -PisRelease build

The gradle tasks you list don't run in the order that you specified, they just get added to the task tree and execute in dependency order (and if there is no dependency between them, then in arbitrary order).

Copy link
Member Author

Choose a reason for hiding this comment

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

Added.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure whether we should instruct users to use --no-parallel or not here as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

ah yes that's true

@boyuanzz
Copy link

boyuanzz commented Jun 2, 2018

Hey @pabloem @alanmyrvold , I added more updates in commit 9eab89c. Please take a look and review it. Thanks!

@swegner
Copy link
Contributor

swegner commented Jun 4, 2018

I didn't realize this PR is still open. The published release guide still references the old Maven commands. If this doc is close or good enough, can it be merged and continue to iterate in separate PR's?

@pabloem
Copy link
Member Author

pabloem commented Jun 4, 2018

@jbonofre @aaltay WDYT? Should we merge this PR now?

@boyuanzz
Copy link

boyuanzz commented Jun 4, 2018

Hey @alanmyrvold, could you please review my recent updates: 9eab89c, 9d0fd1c ?


BASE_RELEASE=2.5.0
RELEASE=2.5.1
NEXT_VERSION_IN_BASE_BRANCH=2.5.0
Copy link
Member

Choose a reason for hiding this comment

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

NEXT_VERSION_IN_BASE_BRANCH=2.6.0


The rest of this guide assumes that commands are run in the root of a repository on `${BRANCH_NAME}` with the above environment variables set.

### Update the beam version on master to the next dev version
Copy link
Member

Choose a reason for hiding this comment

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

This step should be done on master and is the purpose of the sed scripts above?


Check out the release branch.

git checkout ${BRANCH_NAME}
git checkout ${BRANCH}
Copy link
Member

Choose a reason for hiding this comment

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

This step needs to be moved later, after changing versions on master?

Copy link

Choose a reason for hiding this comment

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

We do all master update in previous sed scripts. The rest of instructions all happen in release branch.

@boyuanzz
Copy link

boyuanzz commented Jun 5, 2018

Hey @alanmyrvold , please review commit d238c9e, which addressed your comments above.


1. Add and commit all the files.

svn add beam/${VERSION}
svn add beam/${RELEASE}
svn commit

1. Verify that files are [present](https://dist.apache.org/repos/dist/dev/beam).

Copy link
Member

Choose a reason for hiding this comment

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

Need a step to build the python binaries and stage on dist.apache.org/dev/beam, like https://dist.apache.org/repos/dist/dev/beam/2.5.0/

* Set up the necessary git commands to account for the new and deleted files from the javadoc.
* Update the Javadoc link on this page to point to the new version (in `src/documentation/sdks/javadoc/current.md`).

#### Create Pydoc
Add the new Pydoc to [SDK API Reference page]({{ site.baseurl }}/documentation/sdks/pydoc/) page, as follows:

* Copy the generated Pydoc into the website repository: `cp -r ${PYDOC_ROOT} src/documentation/sdks/pydoc/${VERSION}`.
* Copy the generated Pydoc into the website repository: `cp -r ${PYDOC_ROOT} src/documentation/sdks/pydoc/${RELEASE}`.
* Remove `.doctrees` directory.
* Update the Pydoc link on this page to point to the new version (in `src/documentation/sdks/pydoc/current.md`).

Copy link
Member

Choose a reason for hiding this comment

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

Need to push the RC1 tag to github?
And verify that the cythonized built python artifacts are on dist.apache.org along with the source?

Copy link

Choose a reason for hiding this comment

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

@boyuanzz
Copy link

boyuanzz commented Jun 6, 2018

Hey @alanmyrvold @robertwb , please review this commit: ab15c1b . Thanks!

@boyuanzz
Copy link

boyuanzz commented Jun 6, 2018

Re: @robertwb, I think so. @alanmyrvold what do you think?

@boyuanzz
Copy link

boyuanzz commented Jun 7, 2018

@robertwb commit c6b6cc2 copies zip file into sdks/python/staging subdir

@pabloem pabloem closed this Jun 8, 2018
@pabloem pabloem reopened this Jun 8, 2018
@boyuanzz
Copy link

boyuanzz commented Jun 8, 2018

retest this please

Copy link
Member

@aaltay aaltay left a comment

Choose a reason for hiding this comment

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

@pabloem please address comments before merging.

sudo apt-get install gcc
sudo apt-get install python-dev
```
Make sure your ```time``` alias to ```/usr/bin/time```, if not:
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need time for release verification?

Copy link

Choose a reason for hiding this comment

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

python tests script uses time. If /usr/bin/time is not alias to time, tests will fail.

svn commit

1. Verify that files are [present](https://dist.apache.org/repos/dist/dev/beam).

### Stage python binaries on dist.apache.org
Copy link
Member

Choose a reason for hiding this comment

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

Do we explain how to generate all python dependencies? (If not could we file a JIRA?)

Copy link

Choose a reason for hiding this comment

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

We don't explain that so far. Do we need this?

Copy link
Member

Choose a reason for hiding this comment

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

I meant, all python "artifacts". Sorry for the confusion. I mean the tar ball, and platform dependent whl files.

@boyuanzz
Copy link

boyuanzz commented Jun 8, 2018

retest this please

1 similar comment
@boyuanzz
Copy link

boyuanzz commented Jun 8, 2018

retest this please

@boyuanzz
Copy link

boyuanzz commented Jun 8, 2018

This PR is ready to merge. Issues above were discussed offline.

@pabloem
Copy link
Member Author

pabloem commented Jun 8, 2018

@asfgit merge

@asfgit asfgit closed this in dac24e6 Jun 8, 2018
@pabloem pabloem deleted the gradle-release-guide branch June 8, 2018 23:26
swegner pushed a commit to swegner/beam that referenced this pull request Jun 12, 2018
charlesccychen pushed a commit to cosmoskitten/beam that referenced this pull request Jun 14, 2018
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

7 participants