Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

https://repository.apache.org/#welcome

Info

This is based on the release guide of the Apache Beam project: https://beam.apache.org/contribute/release-guide/

...

Now, add your Apache GPG key to the Flink’s KEYS file in the release repository at dist.apache.org. Follow the instructions listed at the top of these files. (Note: Only PMC members have write access to the release repository. If you end up getting 403 errors ask on the mailing list for assistance.)Configure git to use this key when signing code by giving it your key ID, as follows: PMC member can refer following scripts to add your Apache GPG key to the KEYS in the release repository.

Code Block
languagebash
gitsvn config --global user.signingkey 845E6689

You may drop the --global option if you’d prefer to use this key for the current repository only.

You may wish to start gpg-agent to unlock your GPG key only once using your passphrase. Otherwise, you may need to enter this passphrase hundreds of times. The setup for gpg-agent varies based on operating system, but may be something like this:

Code Block
languagebash
eval $(gpg-agent --daemon --no-grab --write-env-file $HOME/.gpg-agent-info)
export GPG_TTY=$(tty)
export GPG_AGENT_INFO

Access to Apache Nexus repository

Configure access to the Apache Nexus repository, which enables final deployment of releases to the Maven Central Repository.

...

co https://dist.apache.org/repos/dist/release/flink flink-dist-release-repo
cd flink-dist-release-repo
(gpg --list-sigs <YOUR_KEY_ID> && gpg --armor --export <YOUR_KEY_ID>) >> KEYS
svn ci -m "[flink] Add <YOUR_NAME>'s public key"

Configure git to use this key when signing code by giving it your key ID, as follows:

Code Block
languagebash
git config --global user.signingkey 845E6689

You may drop the --global option if you’d prefer to use this key for the current repository only.

You may wish to start gpg-agent to unlock your GPG key only once using your passphrase. Otherwise, you may need to enter this passphrase hundreds of times. The setup for gpg-agent varies based on operating system, but may be something like this:

Code Block
languagebash
eval $(gpg-agent --daemon --no-grab --write-env-file $HOME/.gpg-agent-info)
export GPG_TTY=$(tty)
export GPG_AGENT_INFO

Access to Apache Nexus repository

Configure access to the Apache Nexus repository, which enables final deployment of releases to the Maven Central Repository.

  1. You log in with your Apache account.
  2. Confirm you have appropriate access by finding org.apache.flink under Staging Profiles.
  3. Navigate to your Profile (top right dropdown menu of the page).
  4. Choose User Token from the dropdown, then click Access User Token. Copy a snippet of the Maven XML configuration block.
  5. Insert this snippet twice into your global Maven settings.xml file, typically ${HOME}/.m2/settings.xml. The end result should look like this, where TOKEN_NAME and TOKEN_PASSWORDare your secret tokens:

    Code Block
    languagexml
    titlesettings.xml
    <settings>
       <servers>
         <server>
           <id>apache.releases.https</id>
           <username>TOKEN_NAME</username>
           <password>TOKEN_PASSWORD</password>
         </server>
         <server>
           <id>apache.snapshots.https</id>
           <username>TOKEN_NAME</username>
           <password>TOKEN_PASSWORD</password>
         </server>
       </servers>
     </settings>


Website development setup

Get ready for updating the Flink website by following the website development instructions.

Create a new version in JIRA

When contributors resolve an issue in JIRA, they are tagging it with a release that will contain their changes. With the release currently underway, new issues should be resolved against a subsequent future release. Therefore, you should create a release item for this subsequent release, as follows:

  1. In JIRA, navigate to the Flink > Administration > Versions.
  2. Add a new release: choose the next minor version number compared to the one currently underway, select today’s date as the Start Date, and choose Add.

Triage release-blocking issues in JIRA

There could be outstanding release-blocking issues, which should be triaged before proceeding to build a release candidate. We track them by assigning a specific Fix version field even before the issue resolved.

The list of release-blocking issues is available at the version status page. Triage each unresolved issue with one of the following resolutions:

  • If the issue has been resolved and JIRA was not updated, resolve it accordingly.
  • If the issue has not been resolved and it is acceptable to defer this until the next release, update the Fix Version field to the new version you just created. Please consider discussing this with stakeholders and the dev@ mailing list, as appropriate.
  • If the issue has not been resolved and it is not acceptable to release until it is fixed, the release cannot proceed. Instead, work with the Flink community to resolve the issue.

Review Release Notes in JIRA

JIRA automatically generates Release Notes based on the Fix Version field applied to issues. Release Notes are intended fo users (not Flink committers/contributors). You should ensure that Release Notes are informative and useful.

Open the release notes from the version status page by choosing the release underway and clicking Release Notes.

You should verify that the issues listed automatically by JIRA are appropriate to appear in the Release Notes. Specifically, issues should:

  • Be appropriately classified as BugNew FeatureImprovement, etc.
  • Represent noteworthy user-facing changes, such as new functionality, backward-incompatible API changes, or performance improvements.
  • Have occurred since the previous release; an issue that was introduced and fixed between releases should not appear in the Release Notes.
  • Have an issue title that makes sense when read on its own.

Adjust any of the above properties to the improve clarity and presentation of the Release Notes.

Ensure that the JIRA release notes are also included in the release notes of the documentation (see section "Review and update documentation").

Verify that a Release Build Works

Run mvn -Papache-release clean install to ensure that the build processes that are specific to that profile are in good shape.

Create a release branch

Release candidates are built from a release branch. As a final step in preparation for the release, you should create the release branch, push it to the code repository (you should probably do this once the whole process is done), and update version information on the original branch.

Set up a few environment variables to simplify Maven commands that follow. (We use bash Unix syntax in this guide.)

Code Block
languagebash
RELEASE_VERSION="2.0.0"
SHORT_RELEASE_VERSION="2.0"
CURRENT_SNAPSHOT_VERSION="$SHORT_RELEASE_VERSION-SNAPSHOT"
NEXT_SNAPSHOT_VERSION="2.1-SNAPSHOT"
SHORT_NEXT_SNAPSHOT_VERSION="2.1"
SUPPORTED_FLINK_VERSIONS="1.15,1.16,1.17"

If you are doing a new major/minor release (e.g. 2.0.0, 2.1.0), check out the version of the codebase from which you start the release. This may be HEAD of the master branch. Create a branch for the new version that we want to release before updating the master branch to the next development version:

Code Block
languagebash
$ git checkout master
$ RELEASE_VERSION=$SHORT_RELEASE_VERSION tools/releasing/create_release_branch.sh
$ git checkout master
$ OLD_VERSION=$CURRENT_SNAPSHOT_VERSION NEW_VERSION=$NEXT_SNAPSHOT_VERSION tools/releasing/update_branch_version.sh
$ git checkout release-$SHORT_RELEASE_VERSION

If you're creating a new bugfix release (e.g. 2.0.5), you will skip the above step and simply check out the the already existing branch for that version:

Code Block
languagebash
$ git checkout release-$SHORT_RELEASE_VERSION  

If this is a major release, the newly created branch needs to be pushed to the official repository.

Next, for major releases, some configuration for our documentation builds needs to be manually updated, in the docs/config.toml file:, as listed below.


Code Block
languagebash
baseURL = '//nightlies.apache.org/flink/flink-ml-docs-release-$SHORT_RELEASE_VERSION'
IsStable = true
Version = "$RELEASE_VERSION"
VersionTitle = "$SHORT_RELEASE_VERSION"
Branch = "release-$SHORT_RELEASE_VERSION"
MenuLinks = [
    ["Project Homepage", "//flink.apache.org"],
    ["JavaDocs", "//nightlies.apache.org/flink/flink-ml-docs-release-$SHORT_RELEASE_VERSION/api/java/"],
    ["PyDocs", "//nightlies.apache.org/flink/flink-ml-docs-release-$SHORT_RELEASE_VERSION/api/python/"],
  ]


After updating the docs configuration and pushing the new major release branch, as the last step you should also update the documentation build bot to also build the documentation for the new release branch. Check Managing Documentation on details on how to do that. You may also want to manually trigger a build to make the changes visible as soon as possible.

For major/minor releases add a link to the release documentation in docs/config.toml in the master branch.

Code Block
languagebash
$ git checkout master


Code Block
languagebash
PreviousDocs = [
    ["$SHORT_RELEASE_VERSION", "https://nightlies.apache.org/

Insert this snippet twice into your global Maven settings.xml file, typically ${HOME}/.m2/settings.xml. The end result should look like this, where TOKEN_NAME and TOKEN_PASSWORDare your secret tokens:

Code Block
languagexml
titlesettings.xml
<settings>
   <servers>
     <server>
       <id>apache.releases.https</id>
       <username>TOKEN_NAME</username>
       <password>TOKEN_PASSWORD</password>
     </server>
     <server>
       <id>apache.snapshots.https</id>
       <username>TOKEN_NAME</username>
       <password>TOKEN_PASSWORD</password>
     </server>
   </servers>
 </settings>

Website development setup

Get ready for updating the Flink website by following the website development instructions.

Create a new version in JIRA

When contributors resolve an issue in JIRA, they are tagging it with a release that will contain their changes. With the release currently underway, new issues should be resolved against a subsequent future release. Therefore, you should create a release item for this subsequent release, as follows:

  1. In JIRA, navigate to the Flink > Administration > Versions.
  2. Add a new release: choose the next minor version number compared to the one currently underway, select today’s date as the Start Date, and choose Add.

Triage release-blocking issues in JIRA

There could be outstanding release-blocking issues, which should be triaged before proceeding to build a release candidate. We track them by assigning a specific Fix version field even before the issue resolved.

The list of release-blocking issues is available at the version status page. Triage each unresolved issue with one of the following resolutions:

  • If the issue has been resolved and JIRA was not updated, resolve it accordingly.
  • If the issue has not been resolved and it is acceptable to defer this until the next release, update the Fix Version field to the new version you just created. Please consider discussing this with stakeholders and the dev@ mailing list, as appropriate.
  • If the issue has not been resolved and it is not acceptable to release until it is fixed, the release cannot proceed. Instead, work with the Flink community to resolve the issue.

Review Release Notes in JIRA

JIRA automatically generates Release Notes based on the Fix Version field applied to issues. Release Notes are intended fo users (not Flink committers/contributors). You should ensure that Release Notes are informative and useful.

Open the release notes from the version status page by choosing the release underway and clicking Release Notes.

You should verify that the issues listed automatically by JIRA are appropriate to appear in the Release Notes. Specifically, issues should:

  • Be appropriately classified as BugNew FeatureImprovement, etc.
  • Represent noteworthy user-facing changes, such as new functionality, backward-incompatible API changes, or performance improvements.
  • Have occurred since the previous release; an issue that was introduced and fixed between releases should not appear in the Release Notes.
  • Have an issue title that makes sense when read on its own.

Adjust any of the above properties to the improve clarity and presentation of the Release Notes.

Ensure that the JIRA release notes are also included in the release notes of the documentation (see section "Review and update documentation").

Verify that a Release Build Works

Run mvn -Papache-release clean install to ensure that the build processes that are specific to that profile are in good shape.

Create a release branch

Release candidates are built from a release branch. As a final step in preparation for the release, you should create the release branch, push it to the code repository (you should probably do this once the whole process is done), and update version information on the original branch.

Set up a few environment variables to simplify Maven commands that follow. (We use bash Unix syntax in this guide.)

Code Block
languagebash
RELEASE_VERSION="2.0.0"
SHORT_RELEASE_VERSION="2.0"
CURRENT_SNAPSHOT_VERSION="$SHORT_RELEASE_VERSION-SNAPSHOT"
NEXT_SNAPSHOT_VERSION="2.1-SNAPSHOT"
SHORT_NEXT_SNAPSHOT_VERSION="2.1"

If you are doing a new major/minor release (e.g. 2.0.0, 2.1.0), check out the version of the codebase from which you start the release. This may be HEAD of the master branch. Create a branch for the new version that we want to release before updating the master branch to the next development version:

Code Block
languagebash
$ git checkout master
$ RELEASE_VERSION=$SHORT_RELEASE_VERSION tools/releasing/create_release_branch.sh
$ git checkout master
$ OLD_VERSION=$CURRENT_SNAPSHOT_VERSION NEW_VERSION=$NEXT_SNAPSHOT_VERSION tools/releasing/update_branch_version.sh
$ git checkout release-$SHORT_RELEASE_VERSION

If you're creating a new bugfix release (e.g. 2.0.5), you will skip the above step and simply check out the the already existing branch for that version:

Code Block
languagebash
$ git checkout release-$SHORT_RELEASE_VERSION  

If this is a major release, the newly created branch needs to be pushed to the official repository.

Next, for major releases, some configuration for our documentation builds needs to be manually updated, in the docs/_config.yml file:, as listed below.

Code Block
languagebash
version: $RELEASE_VERSION
version_title: $SHORT_RELEASE_VERSION
github_branch: release-$SHORT_RELEASE_VERSION
baseurl: //ci.apache.org/projects/flink/flink-ml-docs-release-$SHORT_RELEASE_VERSION
javadocs_baseurl: //ci.apache.org/projects/flink/flink-ml-docs-release-$SHORT_RELEASE_VERSION
is_stable: true

...

"],
    ["2.0", "https://nightlies.apache.org/flink/flink-ml-docs-release-2.0"],
  ]


The rest of this guide assumes that commands are run in the root of a repository on the branch of the release version with the above environment variables set.

...

  1. Release Manager’s GPG key is published to dist.apache.org
  2. Release Manager’s GPG key is configured in git configuration
  3. Release Manager has org.apache.flink listed under Staging Profiles in Nexus
  4. Release Manager’s Nexus User Token is configured in settings.xml
  5. JIRA release item for the subsequent release has been created
  6. There are no release blocking JIRA issues
  7. Release Notes in JIRA have been audited and adjusted
  8. Release branch has been created and pushed if it is a major release.
  9. Originating branch has the version information updated to the new version
  10. (major/minor only) Jenkins deployment updated to create snapshot artifacts for release branch (see here)
  11. docs/_config.ymltoml has been updated appropriately.
  12. The new documentation for major releases is visible under https://ci.apache.org/projects/flink/flink-ml-docs-release-$SHORT_RELEASE_VERSION (after at least one doc build finishes).
  13. The new documentation for major releases do not contain "-SNAPSHOT" in its version title, and all links refer to the corresponding version docs instead of master.

...

Code Block
languagebash
RC_NUM="1"
TAG="release-${RELEASE_VERSION}-rc${RC_NUM}"

Now, create a candidate branch:

Code Block
languagebash
RELEASE_CANDIDATE=$RC_NUM tools/releasing/create_release_branch.sh
RELEASE_VERSION}-rc${RC_NUM}"

Tag and push Tag the release commit:

Code Block
git tag -s ${TAG} -m "${TAG}"
git push <remote> refs/tags/${TAG}

We now need to do several things:

...

Code Block
languagebash
$ OLD_VERSION=$CURRENT_SNAPSHOT_VERSION NEW_VERSION=$RELEASE_VERSION tools/releasing/update_branch_version.sh
$ RELEASE_VERSION=$RELEASE_VERSION tools/releasing/create_source_release.sh

Note: Please manually update the Flink version used in archetypeVersion in build-your-own-project.md and quick-start.md as appropriate.


Next, we build the Python artifacts:

...

Finally, we stage the maven artifacts:

Code Block
languagebash
$ SUPPORTED_FLINK_VERSIONS=$SUPPORTED_FLINK_VERSIONS$ tools/releasing/deploy_staging_jars.sh

...

  1. If you have not already, check out the Flink section of the dev repository on dist.apache.org via Subversion. In a fresh directory:

    Code Block
    languagebash
    svn checkout https://dist.apache.org/repos/dist/dev/flink --depth=immediates


  2. Make a directory for the new release:

    Code Block
    languagebash
    mkdir flink/flink-ml-${RELEASE_VERSION}-rc${RC_NUM}
    Copy all release distributions, hashes, and GPG signature:
    Code Block
    mv <flink-ml-dir>/release/* flink/flink-ml-${RELEASE_VERSION}-rc${RC_NUM}


  3. Add and commit all the files.

    Code Block
    languagebash
    cd flink 
    svn add flink-ml-${RELEASE_VERSION}-rc${RC_NUM}
    svn commit -m "Apache Flink ML, version ${RELEASE_VERSION}, release candidate ${RC_NUM}"
    Verify that files are present
    _VERSION}, release candidate ${RC_NUM}"


  4. Verify that files are present

Update apache/infrastructure-bb2

https://github.com/apache/infrastructure-bb2 is visible only to committers.

See previous changes of flink-ml.py to understand the changes needed to create website buildbot for the new Flink ML release branch. Please remove the last minor release branch after adding a new release branch.

After the change takes effect within one day, you should be able to find the corresponding buildbot at https://ci2.apache.org/#/builders.

...

The final step of building the candidate is to propose a website pull request.

Start by updating the variables for the latest released version released version in the top-level _level config.ymltoml, and list the new release in downloads.md, linking to the source code download and the Release Notes in JIRA. Also updating the version/date in release_archive.yml, and adding urls in flink_ml.yml. Also, add a new blog entry announcing the release in _ docs/content/posts.

Finally, propose a pull request with these changes. (Don’t merge before finalizing the release.)

...

  1. Maven artifacts deployed to the staging repository of repository.apache.org
  2. Source distribution deployed to the dev repository of dist.apache.org
  3. Website pull request proposed to list the release
  4. Check docs/_config.ymltoml to ensure that
    • the version constants refer to the new version
    • the baseurl does not point to flink-ml-docs-master  but flink-ml-docs-release-X.Y instead

...

Code Block
languagetext
$ svn checkout https://dist.apache.org/repos/dist/dev/flink/flink-ml-${RELEASE_VERSION}-rc${RC_NUM}
$ cd flink-ml-${RELEASE_VERSION}-rc${RC_NUM}
$ python -m twine upload --repository-url https://upload.pypi.org/legacy/ \
    apache-flink-ml-${RELEASE_VERSION}.tar.gz apache-flink-ml-${RELEASE_VERSION}.tar.gz.asc

Deploy artifacts to Maven Central Repository

Use the Apache Nexus repository to release the staged binary artifacts to the Maven Central repository. In the Staging Repositories section, find the relevant release candidate orgapacheflink-XXX entry and click Release. Drop all other release candidates that are not being released.

...

Code Block
$ svn move -m "Release Flink ML ${RELEASE_VERSION}" \
    https://dist.apache.org/repos/dist/dev/flink/flink-ml-${RELEASE_VERSION}-rc${RC_NUM} \
    https://dist.apache.org/repos/dist/release/flink/flink-ml-${RELEASE_VERSION}

Remove old release candidates from dist.apache.org

...

  1. If you have not already, check out the Flink section of the release repository on dist.apache.org via Subversion. In a fresh directory:

    Code Block
    languagebash
     svn checkout https://dist.apache.org/repos/dist/release/flink --depth=immediates
     cd flink


  2. Remove files for outdated releases and commit the changes.

    Code Block
    languagebash
     svn remove flink-ml-<version_to_remove>
     svn commit
  3. Verify that files are removed

Git tag

Create a new Git tag for the released version by copying the tag for the final release candidate, as follows:

git tag -s "release-${RELEASE_VERSION}" ${TAG}

Mark the version as released in JIRA

In JIRA, inside version management, hover over the current release and a settings menu will appear. Click Release, and select today’s date.

Update website to point to new stable release documentation (for major releases only)

In our website repository flink-web, for major releases we need to update the website to point to the new stable release.

  1.  svn remove flink-ml-<version_to_remove>
     svn commit


  2. Verify that files are removed

Git tag

Create a new Git tag for the released version by copying the tag for the final release candidate, as followsIn the _config.yml file under the root directory, update the following settings:

Code Block
languagetext
FLINK_ML_VERSION_STABLE: $RELEASE_VERSION
FLINK_ML_VERSION_STABLE_SHORT: $SHORT_RELEASE_VERSION
docs-ml-stable: "https://ci.apache.org/projects/flink/flink-ml-docs-release-$SHORT_RELEASE_VERSION"

Finally, rebuild the website and push.

Add download links for the new release to the website

In the _config.yml file under the root directory of flink-web, you will find a list of download links for previous releases.

Following the same format,

  • add a new entry to release_archive.flink_ml
  • for major releases, add a new entry to flink_ml_releases for the release binaries and sources
  • for minor releases, update the entry for the previous release in the series in flink_ml_releases
bash
git tag -s "release-${RELEASE_VERSION}" refs/tags/${TAG}^{} -m "Release Flink ML ${RELEASE_VERSION}"
git push <remote> refs/tags/release-${RELEASE_VERSION}

Mark the version as released in JIRA

In JIRA, inside version management, hover over the current release and a settings menu will appear. Click Release, and select today’s date.

1) Add a new entry for the new Flink ML release in the docs/data/release_archive.yml file.

2) Add download links for the new Flink ML release in the docs/data/flink_ml.yml file.

3) For major releases, update the following settings in the docs/config.toml file.

Code Block
languagetext
FLINK_ML_VERSION_STABLE: $RELEASE_VERSION
FlinkMLStableShortVersion: $SHORT_RELEASE_VERSION

4) For major releases, add the release announcement under docs/content/posts.

5) Rebuild the website and pushPlease pay notice to the ids assigned to the download entries. They should be unique and reflect their corresponding version number.

Checklist to proceed to the next step

  • Python artifacts released and indexed in the PyPI Repository
  • Maven artifacts released and indexed in the Maven Central Repository (usually takes about a day to show up)
  • Source & binary distributions available in the release repository of https://dist.apache.org/repos/dist/release/flink/
  • Dev repository https://dist.apache.org/repos/dist/dev/flink/ is empty
  • Release tagged in the source code repository
  • Release version finalized in JIRA. (Note: Not all committers have administrator access to JIRA. If you end up getting permissions errors ask on the mailing list for assistance)
  • Website contains links to new release binaries and sources in download page
  • For major releases, the front page references the correct new major release version and directs to the correct link

...

Announce the release on the announce@apache.org mailing list.

Please send the email using your apache.org mailbox and also make sure you are using plain text mode.


Code Block
languagetext
From: Release Manager
To: dev@flink.apache.org, user@flink.apache.org, user-zh@flink.apache.org, announce@apache.org
Subject: [ANNOUNCE] Apache Flink ML 1.2.3 released

The Apache Flink community is very happy to announce the release of Apache Flink ML 1.2.3.

Apache Flink ML provides API and libraryinfrastructure that simplifies implementing distributed ML algorithms., 
Andand it also provides a library of off-the-shelf ML algorithms.

Please check out the release blog post for an overview of the release:
https://flink.apache.org/news/2020/04/07/release-ml-2.0.0.html

The release is available for download at:
https://flink.apache.org/downloads.html

Maven artifacts for Flink ML can be found at:
https://search.maven.org/search?q=g:org.apache.flink%20ml

Python SDK for Flink ML published to the PyPI index can be found at:
https://pypi.org/project/apache-flink-ml/

The full release notes are available in Jira:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12315522&version=12346878

We would like to thank all contributors of the Apache Flink community who made this release possible!

Regards,
Release Manager

...