You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by je...@apache.org on 2021/09/29 20:13:56 UTC
[airflow] branch main updated: Update helm chart release docs
(#18612)
This is an automated email from the ASF dual-hosted git repository.
jedcunningham pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 339eb0a Update helm chart release docs (#18612)
339eb0a is described below
commit 339eb0ae41adb3a3b20459ab6ea4c7f6aef87360
Author: Jed Cunningham <66...@users.noreply.github.com>
AuthorDate: Wed Sep 29 14:13:37 2021 -0600
Update helm chart release docs (#18612)
---
dev/README_RELEASE_HELM_CHART.md | 88 +++++++++++++++++++++-----------
docs/exts/docs_build/docs_builder.py | 3 ++
docs/exts/docs_build/helm_chart_utils.py | 32 ++++++++++++
docs/publish_docs.py | 8 ++-
4 files changed, 99 insertions(+), 32 deletions(-)
diff --git a/dev/README_RELEASE_HELM_CHART.md b/dev/README_RELEASE_HELM_CHART.md
index 89f09a5..ecc81a8 100644
--- a/dev/README_RELEASE_HELM_CHART.md
+++ b/dev/README_RELEASE_HELM_CHART.md
@@ -22,6 +22,7 @@
- [Prepare the Apache Airflow Helm Chart Release Candidate](#prepare-the-apache-airflow-helm-chart-release-candidate)
- [Pre-requisites](#pre-requisites)
+ - [Build Changelog](#build-changelog)
- [Build RC artifacts](#build-rc-artifacts)
- [Prepare Vote email on the Apache Airflow release candidate](#prepare-vote-email-on-the-apache-airflow-release-candidate)
- [Verify the release candidate by PMCs](#verify-the-release-candidate-by-pmcs)
@@ -33,8 +34,8 @@
- [Publish the final release](#publish-the-final-release)
- [Summarize the voting for the release](#summarize-the-voting-for-the-release)
- [Publish release to SVN](#publish-release-to-svn)
+ - [Publish release tag](#publish-release-tag)
- [Publish documentation](#publish-documentation)
- - [Update `index.yaml` to Airflow Website](#update-indexyaml-to-airflow-website)
- [Notify developers of release](#notify-developers-of-release)
- [Update Announcements page](#update-announcements-page)
- [Remove old releases](#remove-old-releases)
@@ -50,6 +51,14 @@ details the steps for releasing Helm Chart.
- Helm version >= 3.5.4
+## Build Changelog
+
+Before creating the RC, you need to build and commit the changelog for the release. For example, to list the
+commits between the last release, `1.1.0`, and `main`:
+
+```shell
+git log --oneline helm-chart/1.1.0..main --pretty='format:- %s' -- chart/ docs/helm-chart/
+```
## Build RC artifacts
@@ -209,34 +218,37 @@ official Apache releases must not include the rcN suffix.
Subject:
-```
-[VOTE] Release Apache Airflow Helm Chart 1.0.1 based on 1.0.1rc1
+```shell
+cat <<EOF
+[VOTE] Release Apache Airflow Helm Chart ${VERSION_WITHOUT_RC} based on ${VERSION}
+EOF
```
Body:
-```
+```shell
+cat <<EOF
Hello Apache Airflow Community,
-This is a call for the vote to release Helm Chart version 1.0.1.
+This is a call for the vote to release Helm Chart version ${VERSION_WITHOUT_RC}.
The release candidate is available at:
-https://dist.apache.org/repos/dist/dev/airflow/helm-chart/1.0.1rc1/
+https://dist.apache.org/repos/dist/dev/airflow/helm-chart/$VERSION/
-airflow-chart-1.0.1-source.tar.gz - is the "main source release" that comes with INSTALL instructions.
-airflow-1.0.1.tgz - is the binary Helm Chart release.
+airflow-chart-${VERSION_WITHOUT_RC}-source.tar.gz - is the "main source release" that comes with INSTALL instructions.
+airflow-${VERSION_WITHOUT_RC}.tgz - is the binary Helm Chart release.
Public keys are available at: https://www.apache.org/dist/airflow/KEYS
For convenience "index.yaml" has been uploaded (though excluded from voting), so you can also run the below commands.
-helm repo add apache-airflow-dev https://dist.apache.org/repos/dist/dev/airflow/helm-chart/1.0.1rc1/
+helm repo add apache-airflow-dev https://dist.apache.org/repos/dist/dev/airflow/helm-chart/$VERSION/
helm repo update
helm install airflow apache-airflow-dev/airflow
-airflow-1.0.1.tgz.prov - is also uploaded for verifying Chart Integrity, though not strictly required for releasing the artifact based on ASF Guidelines.
+airflow-${VERSION_WITHOUT_RC}.tgz.prov - is also uploaded for verifying Chart Integrity, though not strictly required for releasing the artifact based on ASF Guidelines.
-$ helm verify airflow-1.0.1.tgz --keyring ~/.gnupg/secring.gpg
+$ helm verify airflow-${VERSION_WITHOUT_RC}.tgz --keyring ~/.gnupg/secring.gpg
Signed by: Kaxil Naik <ka...@apache.org>
Signed by: Kaxil Naik <ka...@gmail.com>
Using Key With Fingerprint: CDE15C6E4D3A8EC4ECF4BA4B6674E08AD7DE406F
@@ -257,18 +269,20 @@ encouraged to test the release and vote with "(non-binding)".
For license checks, the .rat-excludes files is included, so you can run the following to verify licenses (just update $PATH_TO_RAT):
-tar -xvf airflow-chart-1.0.1-source.tar.gz
-cd airflow-chart-1.0.1
+tar -xvf airflow-chart-${VERSION_WITHOUT_RC}-source.tar.gz
+cd airflow-chart-${VERSION_WITHOUT_RC}
java -jar $PATH_TO_RAT/apache-rat-0.13/apache-rat-0.13.jar chart -E .rat-excludes
-Please note that the version number excludes the `rcX` string, so it's now
-simply 1.0.1. This will allow us to rename the artifact without modifying
+Please note that the version number excludes the \`rcX\` string, so it's now
+simply ${VERSION_WITHOUT_RC}. This will allow us to rename the artifact without modifying
the artifact checksums when we actually release.
Thanks,
<your name>
+EOF
```
+Note, you need to update the `helm verify` output and the end of the voting period in the body.
# Verify the release candidate by PMCs
@@ -495,6 +509,17 @@ svn commit -m "Release Airflow Helm Chart Check ${VERSION} from ${RC}"
Verify that the packages appear in [Airflow Helm Chart](https://dist.apache.org/repos/dist/release/airflow/helm-chart/).
+## Publish release tag
+
+Create and push the release tag:
+
+```shell
+cd "${AIRFLOW_REPO_ROOT}"
+git checkout helm-chart/${RC}
+git tag -s helm-chart/${VERSION}
+git push origin helm-chart/${VERSION}
+```
+
## Publish documentation
In our cases, documentation for the released versions is published in a separate repository -
@@ -514,10 +539,23 @@ between the two repositories to be able to build the documentation.
```shell
cd "${AIRFLOW_REPO_ROOT}"
+ git checkout helm-chart/${VERSION}
./breeze build-docs -- --package-filter helm-chart --for-production
```
-- We upload `index.yaml` to the Airflow website to allow: `helm repo add https://airflow.apache.org`.
+- Update `index.yaml`
+
+ We upload `index.yaml` to the Airflow website to allow: `helm repo add https://airflow.apache.org`.
+
+ ```shell
+ cd "${AIRFLOW_SITE_DIRECTORY}"
+ curl https://dist.apache.org/repos/dist/dev/airflow/helm-chart/${RC}/index.yaml -o index.yaml
+ https://dist.apache.org/repos/dist/dev/airflow/helm-chart/${VERSION}
+ sed -i "s|https://dist.apache.org/repos/dist/dev/airflow/helm-chart/$RC|https://downloads.apache.org/airflow/helm-chart/$VERSION|" index.yaml
+
+ git commit -m "Add documentation for Apache Airflow Helm Chart ${VERSION}"
+ git push
+ ```
- Now you can preview the documentation.
@@ -528,26 +566,12 @@ between the two repositories to be able to build the documentation.
- Copy the documentation to the ``airflow-site`` repository.
```shell
- ./docs/publish_docs.py --package-filter apache-airflow --package-filter docker-stack
+ ./docs/publish_docs.py --package-filter helm-chart
cd "${AIRFLOW_SITE_DIRECTORY}"
git commit -m "Add documentation for Apache Airflow Helm Chart ${VERSION}"
git push
```
-## Update `index.yaml` to Airflow Website
-
-We upload `index.yaml` to the Airflow website to allow: `helm repo add https://airflow.apache.org`.
-
- ```shell
- cd "${AIRFLOW_SITE_DIRECTORY}"
- curl https://dist.apache.org/repos/dist/dev/airflow/helm-chart/${RC}/index.yaml -o index.yaml
- https://dist.apache.org/repos/dist/dev/airflow/helm-chart/${VERSION}
- sed -i "s|https://dist.apache.org/repos/dist/dev/airflow/helm-chart/$RC|https://downloads.apache.org/airflow/helm-chart/$VERSION|" index.yaml
-
- git commit -m "Add documentation for Apache Airflow Helm Chart ${VERSION}"
- git push
- ```
-
## Notify developers of release
- Notify users@airflow.apache.org (cc'ing dev@airflow.apache.org and announce@apache.org) that
@@ -574,6 +598,8 @@ The source release, as well as the "binary" Helm Chart release, are available:
📦 Official Sources: https://airflow.apache.org/helm-chart/installing-helm-chart-from-sources.html
📦 ArtifactHub: https://artifacthub.io/packages/helm/apache-airflow/airflow
📚 Docs: https://airflow.apache.org/docs/helm-chart/$VERSION/
+🚀 Quick Start Installation Guide: https://airflow.apache.org/docs/helm-chart/$VERSION/quick-start.html
+🛠️ Changelog: https://airflow.apache.org/docs/helm-chart/$VERSION/changelog.html
Thanks to all the contributors who made this possible.
diff --git a/docs/exts/docs_build/docs_builder.py b/docs/exts/docs_build/docs_builder.py
index de92880..7164ac6 100644
--- a/docs/exts/docs_build/docs_builder.py
+++ b/docs/exts/docs_build/docs_builder.py
@@ -34,6 +34,7 @@ from docs.exts.docs_build.code_utils import (
pretty_format_path,
)
from docs.exts.docs_build.errors import DocBuildError, parse_sphinx_warnings
+from docs.exts.docs_build.helm_chart_utils import chart_version
from docs.exts.docs_build.spelling_checks import SpellingError, parse_spelling_warnings
console = Console(force_terminal=True, color_system="standard", width=CONSOLE_WIDTH)
@@ -100,6 +101,8 @@ class AirflowDocsBuilder:
if self.package_name.startswith('apache-airflow-providers-'):
provider = next(p for p in ALL_PROVIDER_YAMLS if p['package-name'] == self.package_name)
return provider['versions'][0]
+ if self.package_name == 'helm-chart':
+ return chart_version()
return Exception(f"Unsupported package: {self.package_name}")
@property
diff --git a/docs/exts/docs_build/helm_chart_utils.py b/docs/exts/docs_build/helm_chart_utils.py
new file mode 100644
index 0000000..2debab2
--- /dev/null
+++ b/docs/exts/docs_build/helm_chart_utils.py
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import os
+
+import yaml
+
+CHART_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, "chart"))
+CHART_YAML_PATH = os.path.join(CHART_DIR, "Chart.yaml")
+
+
+def chart_yaml() -> dict:
+ with open(CHART_YAML_PATH) as f:
+ return yaml.safe_load(f)
+
+
+def chart_version() -> str:
+ return chart_yaml()["version"]
diff --git a/docs/publish_docs.py b/docs/publish_docs.py
index 92e5406..19e2281 100755
--- a/docs/publish_docs.py
+++ b/docs/publish_docs.py
@@ -49,7 +49,13 @@ ALL_PROVIDER_YAMLS = load_package_data()
def get_available_packages():
"""Get list of all available packages to build."""
provider_package_names = [provider['package-name'] for provider in ALL_PROVIDER_YAMLS]
- return ["apache-airflow", "docker-stack", *provider_package_names, "apache-airflow-providers"]
+ return [
+ "apache-airflow",
+ "docker-stack",
+ *provider_package_names,
+ "apache-airflow-providers",
+ "helm-chart",
+ ]
def _get_parser():