This is an automated email from the ASF dual-hosted git repository.
wenjin272 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents.git
The following commit(s) were added to refs/heads/main by this push:
new a1f05b5f8 [hotfix][docs] Centralize stable release versions in setup
examples (#1321)
a1f05b5f8 is described below
commit a1f05b5f89e4d411b03e7a02d3cfaad5b8f15f3a
Author: Wenjin Xie <[email protected]>
AuthorDate: Fri Oct 23 15:10:27 2026 +0800
[hotfix][docs] Centralize stable release versions in setup examples (#1321)
Generated-by: Codex CLI 0.153.4 (GPT-6)
Co-authored-by: Codex <[email protected]>
---
docs/config.toml | 13 ++++++++-----
docs/content/docs/get-started/setup.md | 25 +++++++++++++------------
docs/layouts/shortcodes/stable_version.html | 22 ++++++++++++++++++++++
3 files changed, 43 insertions(+), 17 deletions(-)
diff --git a/docs/config.toml b/docs/config.toml
index 1ccf0a5e9..364c3081d 100644
--- a/docs/config.toml
+++ b/docs/config.toml
@@ -29,13 +29,16 @@ pygmentsUseClasses = true
# Flag to indicate whether an outdated warning should be shown.
ShowOutDatedWarning = false
- # This is the version referenced in the docs. Please only use these variables
- # to reference a specific Flink Agents version, because this is the only
place where
- # we change the version for the complete docs when forking of a release
branch
- # etc.
- # The full version string as referenced in Maven (e.g. 1.2.1)
+ # Keep Flink Agents versions centralized here and use shortcodes in the docs.
+ # Source/artifact version for this branch, also used by the page version
label.
+ # Updated by the release/version-update scripts; exposed by the version
shortcode.
Version = "0.4-SNAPSHOT"
+ # Published release used by installation instructions and Maven examples.
+ # Update after publication, independently of the branch's development
version.
+ # Exposed by the stable_version shortcode.
+ StableVersion = "0.3.1"
+
# For stable releases, leave the bugfix version out (e.g. 1.2). For snapshot
# release this should be the same as the regular version
VersionTitle = "0.4-SNAPSHOT"
diff --git a/docs/content/docs/get-started/setup.md
b/docs/content/docs/get-started/setup.md
index bf9b82cb1..317f79557 100644
--- a/docs/content/docs/get-started/setup.md
+++ b/docs/content/docs/get-started/setup.md
@@ -88,10 +88,11 @@ The `install.sh` script downloads Apache Flink and copies
the Flink Agents distr
into `$FLINK_HOME/lib`. When you enable PyFlink, it also creates a Python
virtual environment
and installs `flink-agents` and `apache-flink` into it.
-Run the one-liner from the directory where you want the virtual environment
created:
+Run the following command from the directory where you want the virtual
environment created:
```shell
-curl -fsSL
https://raw.githubusercontent.com/apache/flink-agents/main/tools/install.sh |
bash
+curl -fsSL
https://raw.githubusercontent.com/apache/flink-agents/main/tools/install.sh |
bash -s -- \
+ --flink-agents-version {{< stable_version >}}
```
The script asks whether to install Flink and whether to enable PyFlink. Answer
**Yes** to
@@ -101,7 +102,7 @@ PyFlink for a PyFlink job, and **No** for a Java-only
setup. To run it without p
```shell
curl -fsSL
https://raw.githubusercontent.com/apache/flink-agents/main/tools/install.sh |
bash -s -- \
- --non-interactive --install-flink --flink-version <flink-version>
--flink-agents-version <flink-agents-version>
+ --non-interactive --install-flink --flink-version <flink-version>
--flink-agents-version {{< stable_version >}}
```
Run the script with `--dry-run` to print the plan without changing anything,
and with
@@ -171,11 +172,11 @@ Choose one of the following installation methods:
#### From Official Release
-Install Flink Agents using pip:
+Install the stable Flink Agents {{< stable_version >}} release using pip:
```shell
# Install Flink Agents and Flink Python package
-pip install flink-agents apache-flink==${FLINK_VERSION}
+pip install flink-agents=={{< stable_version >}} apache-flink==${FLINK_VERSION}
```
{{< hint warning >}}
@@ -185,7 +186,7 @@ pip install flink-agents apache-flink==${FLINK_VERSION}
echo "setuptools<82" > /tmp/constraint.txt
PIP_CONSTRAINT=/tmp/constraint.txt \
PIP_BUILD_CONSTRAINT=/tmp/constraint.txt \
- pip install flink-agents apache-flink==${FLINK_VERSION}
+ pip install flink-agents=={{< stable_version >}}
apache-flink==${FLINK_VERSION}
```
Set both variables for compatibility with older pip versions. Since pip 26.2,
@@ -307,11 +308,11 @@ directory:
{{< tabs "Install Flink Agents Java Library" >}}
{{< tab "From Official Release" >}}
-Download the published JAR from Maven Central into Flink's `lib` directory.
-Set `FLINK_AGENTS_VERSION` to the release you want (e.g. `0.3.0`):
+Download the stable Flink Agents {{< stable_version >}} JAR from Maven Central
into
+Flink's `lib` directory:
```shell
-export FLINK_AGENTS_VERSION=<version>
+export FLINK_AGENTS_VERSION="{{< stable_version >}}"
export FLINK_MAJOR_MINOR=${FLINK_VERSION%.*}
curl -fL \
@@ -326,8 +327,8 @@ After building from source, copy the self-contained
distribution JAR
(without the `-thin` suffix) to Flink's `lib` directory:
```shell
-# Set the Flink Agents version (from the version you built, e.g. 0.4-SNAPSHOT)
-export FLINK_AGENTS_VERSION=<version>
+# Use the artifacts built from the source version matching these docs.
+export FLINK_AGENTS_VERSION="{{< version >}}"
cp
dist/flink-${FLINK_VERSION%.*}/target/flink-agents-dist-flink-${FLINK_VERSION%.*}-${FLINK_AGENTS_VERSION}.jar
$FLINK_HOME/lib/
```
@@ -369,7 +370,7 @@ For execution in IDE, enable the feature `add dependencies
with provided scope t
```xml
<properties>
<flink.version>2.2.1</flink.version>
- <flink-agents.version>0.3.0</flink-agents.version>
+ <flink-agents.version>{{< stable_version >}}</flink-agents.version>
</properties>
<dependencies>
diff --git a/docs/layouts/shortcodes/stable_version.html
b/docs/layouts/shortcodes/stable_version.html
new file mode 100644
index 000000000..fe7ead6de
--- /dev/null
+++ b/docs/layouts/shortcodes/stable_version.html
@@ -0,0 +1,22 @@
+{{/*
+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.
+*/}}{{/*
+ Shortcode that interpolates the published release used by installation
examples.
+
+ Parameters: None
+*/}}{{- $.Site.Params.StableVersion -}}