From c6ac7939517d6d3a6986f97906c513337ffa1429 Mon Sep 17 00:00:00 2001 From: tison Date: Wed, 22 Feb 2023 20:13:50 +0800 Subject: [PATCH 01/18] reorder sidebars Signed-off-by: tison --- sidebarsDevelopment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sidebarsDevelopment.js b/sidebarsDevelopment.js index 99fb7f3d93f8..c6f6fd1bed82 100644 --- a/sidebarsDevelopment.js +++ b/sidebarsDevelopment.js @@ -48,6 +48,7 @@ const sidebars = { type: "category", label: "Releases", items: [ + 'version-policy', { type: "category", label: 'Release process', @@ -58,7 +59,6 @@ const sidebars = { ] }, 'validate-release-candidate', - 'version-policy', ] }, { From d8b26d0c07a331c2f41b16e2c4c6355d79dec9de Mon Sep 17 00:00:00 2001 From: tison Date: Wed, 22 Feb 2023 20:16:24 +0800 Subject: [PATCH 02/18] version-policy -> release-policy Signed-off-by: tison --- contribute/{version-policy.md => release-policy.md} | 4 ++-- contribute/release-process.md | 2 +- sidebarsDevelopment.js | 2 +- static/.htaccess | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) rename contribute/{version-policy.md => release-policy.md} (98%) diff --git a/contribute/version-policy.md b/contribute/release-policy.md similarity index 98% rename from contribute/version-policy.md rename to contribute/release-policy.md index 945ed500d8aa..8a5b05ff4c8e 100644 --- a/contribute/version-policy.md +++ b/contribute/release-policy.md @@ -1,6 +1,6 @@ --- -id: version-policy -title: Version policy +id: release-policy +title: Release policy --- The Pulsar project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). Existing releases can expect diff --git a/contribute/release-process.md b/contribute/release-process.md index be1635add9b3..ec50c6a4d669 100644 --- a/contribute/release-process.md +++ b/contribute/release-process.md @@ -71,7 +71,7 @@ If you created a new branch, update the [CI - OWASP Dependency Check](https://gi Note that you should also stop the workflow for previous Pulsar versions that are EOL. -Also, if you created a new branch, please update the "Supported Versions" table on the [version policy](version-policy.md) page. This table is for support timelines based on when minor releases take place. +Also, if you created a new branch, please update the "Supported Versions" table on the [release policy](release-policy.md) page. This table is for support timelines based on when minor releases take place. ### Update project version and tag diff --git a/sidebarsDevelopment.js b/sidebarsDevelopment.js index c6f6fd1bed82..2deef63ac30a 100644 --- a/sidebarsDevelopment.js +++ b/sidebarsDevelopment.js @@ -48,7 +48,7 @@ const sidebars = { type: "category", label: "Releases", items: [ - 'version-policy', + 'release-policy', { type: "category", label: 'Release process', diff --git a/static/.htaccess b/static/.htaccess index 065dce262fa3..272ee5410851 100755 --- a/static/.htaccess +++ b/static/.htaccess @@ -21,7 +21,8 @@ RewriteRule "^docs/(.*)$" "/docs/2.11.x/$1" [R=301,DPI,L] RewriteRule "^docs/(.+/)?develop-binary-protocol/?$" "/docs/$1developing-binary-protocol" [R=301,DPI,L] RewriteRule "^docs/(.+/)?administration-dashboard/?$" "/docs/$1administration-pulsar-manager" [R=301,DPI,L] RewriteRule "^docs/(.+/)?security-tls-keystore/?$" "/docs/$1security-tls-authentication" [R=301,DPI,L] -RewriteRule "^docs/(.+/)?security-policy-and-supported-versions/?$" "/contribute/version-policy" [R=301,DPI,L] +RewriteRule "^docs/(.+/)?security-policy-and-supported-versions/?$" "/contribute/release-policy" [R=301,DPI,L] +RewriteRule "^contribute/version-policy/?$" "/contribute/release-policy" [R=301,DPI,L] RewriteRule "^coding-guide/?$" "/contribute/develop-coding-conventions" [R=301,DPI,L] RewriteRule "^contributing/?$" "/contribute" [R=301,DPI,L] From 31fd9e675a35e41bccc655f319908f06c3d2e320 Mon Sep 17 00:00:00 2001 From: tison Date: Wed, 22 Feb 2023 21:48:24 +0800 Subject: [PATCH 03/18] Merge PIP-175 release policy Signed-off-by: tison --- contribute/release-policy.md | 105 +++++++++++++++++++++++++---------- release-notes/pulsar.mdx | 2 + 2 files changed, 78 insertions(+), 29 deletions(-) diff --git a/contribute/release-policy.md b/contribute/release-policy.md index 8a5b05ff4c8e..e6fc09ec42f8 100644 --- a/contribute/release-policy.md +++ b/contribute/release-policy.md @@ -3,44 +3,91 @@ id: release-policy title: Release policy --- -The Pulsar project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). Existing releases can expect -patches for bugs and security vulnerabilities. New features will target minor releases. +## Release semantics -When upgrading an existing cluster, it is important to upgrade components linearly through each minor version. For -example, when upgrading from 2.8.x to 2.10.x, it is important to upgrade to 2.9.x before going to 2.10.x. +The Pulsar project follows a variant of [Semantic Versioning](http://semver.org/spec/v2.0.0.html). Existing releases can expect patches for bugs and security vulnerabilities. New features will target minor releases. The difference is that a major version bump will not carry any special meaning in terms of "big features" included in the release or breaking API changes. Instead, it would simply signal a new long-term support (LTS) release. + +For example, + +* 2.10.0 is a feature release; +* 2.10.1 is a patch release; +* 2.11.0 is a feature release; +* 3.0.0 is the first LTS release; +* 3.1.0 is a feature release; +* 3.2.0 is a feature release; +* 3.2.1 is a patch release; +* 4.0.0 is a LTS release. + +## Compatibility between releases + +When upgrading an existing cluster, it is important to upgrade components linearly. + +Before 3.0, upgrade should be done linearly through each minor version. For example, when upgrading from 2.8 to 2.10, it is important to upgrade to 2.9 before going to 2.10. + +Starting from 3.0, additionally, live upgrade/downgrade between one LTS and the next one is guaranteed. For example, + +* 3.0 -> 4.0 -> 3.0 is OK; +* 3.2 -> 4.0 -> 3.2 is OK; +* 3.2 -> 4.4 -> 3.2 is OK; +* 3.2 -> 5.0 is _not_ OK. + +## Release frequency and support expectation + +| | Release frequency | Active Support | Security Support | +|-----------------|-------------------|----------------|------------------| +| LTS release | Every 18 months | 24 months | 36 months | +| Feature release | Every 3 months | 6 months | 6 months | +| Patch release | When it is ready | N/A | N/A | + +This can be translated into: + +* The last 2 LTS releases and the last 2 feature releases are supported. +* Security patches are provided for the past 3 LTS releases and 2 feature releases + +Therefore, users can choose between stay in an LTS release until they are ready to jump into the next LTS, or try the latest releases which contains required features. ## Supported Versions -Feature release branches will be maintained with security-fix and bug-fix releases for at least 12 months after the -initial release. For example, branch 2.5.x is no longer considered maintained as of January 2021, 12 months after -the release of 2.5.0 in January 2020. No more 2.5.x releases should be expected at this point, even to fix security -vulnerabilities. +| Version | Released | Active Support | Security Support | Latest | +|---------|---------------|-----------------|------------------|--------| +| 2.10 | April 2022 | April 2023 | April 2023 | 2.10.3 | +| 2.9 | November 2021 | November 2022 | November 2022 | 2.9.4 | +| 2.8 | June 2021 | June 2022 | June 2022 | 2.8.4 | +| 2.7 | November 2020 | November 2021 | November 2021 | 2.7.5 | +| 2.6 | June 2020 | June 2021 | June 2021 | 2.6.4 | +| 2.5 | January 2020 | January 2021 | January 2021 | 2.5.2 | +| 2.4 | July 2019 | July 2020 | July 2020 | 2.4.2 | + +## Roadmap for release plans + +The next release of Pulsar is 3.0.0, and it has the planned timeline as: + +* 2023-04-11 - RC-1 +* 2023-04-18 - RC-2 +* 2023-04-25 - RC-3 +* 2023-05-02 - Announce 3.0 Release + +## Release cycles + +Generally, one committer shall volunteer as the release manager (RM) for a specific release. + +For feature releases and LTS releases, the last 3 weeks of the release cycle will be marked as a code-freeze period. The RN will branch off from master, and the RM is responsible for selecting the changes that will be cherry-picked in the release branch. + +From the code-freeze point, to minimize the risk of delaying the release, only bug fixes involving a regression of behavior compared to a previous release should be allowed. Occasional exceptions will be possible after higher scrutiny of the change. -Note that a minor version can be maintained past its 12-month initial support period. For example, version 2.7 is still -actively maintained. +At the moment of the code freeze, the RM will also prepare a release candidate (RC) following the [release process](release-process.md). Committers, contributors, and users will [test this RC](validate-release-candidate.md) to detect issues as early as possible. -Security fixes will be given priority when it comes to back porting fixes to older versions that are within the -supported time window. It is challenging to decide which bug fixes to back port to old versions. As such, the latest -versions will have the most bug fixes. +A formal vote by the PMC will not be required at this stage (though any disagreement should be sent out ASAP). -When 3.0.0 is released, the community will decide how to continue supporting 2.x. The last minor release within 2.x may -be maintained for longer as an "LTS" release, but it has not been officially decided. +After 1 week, if there are any changes, the RM will provide a new RC release that the community will test again. -The following table shows version support timelines and will be updated with each release. +After 1 more week, if there are any changes, a third RC will be prepared, and this will be submitted to vote to the PMC. Otherwise, the vote will be held on an earlier RC if no issues are found. -| Version | Supported | Initial Release | At Least Until | -|:-------:|:------------------:|:---------------:|:--------------:| -| 2.10.x | :white_check_mark: | April 2022 | April 2023 | -| 2.9.x | :white_check_mark: | November 2021 | November 2022 | -| 2.8.x | :white_check_mark: | June 2021 | June 2022 | -| 2.7.x | :white_check_mark: | November 2020 | November 2021 | -| 2.6.x | :x: | June 2020 | June 2021 | -| 2.5.x | :x: | January 2020 | January 2021 | -| 2.4.x | :x: | July 2019 | July 2020 | -| < 2.3.x | :x: | - | - | +The last 1 week will be used for the voting process and for updating Pulsar website and the blog post announcing the release, which should (hopefully) happen on the scheduled day. -If there is ambiguity about which versions of Pulsar are actively supported, please ask on the [users@pulsar.apache.org](mailto:users@pulsar.apache.org) mailing list. +For patch releases, the process is the same while there is no code-freeze period and strict timeline. Basically, patch release is out "when it is ready". -## Release Frequency +## Related PIPs -With the acceptance of [PIP-47 - A Time-Based Release Plan](https://github.com/apache/pulsar/wiki/PIP-47%3A-Time-Based-Release-Plan), the Pulsar community aims to complete 4 minor releases each year. Patch releases are completed based on demand as well as need, in the event of security fixes. +* [PIP-47: A Time-Based Release Plan](https://github.com/apache/pulsar/wiki/PIP-47%3A-Time-Based-Release-Plan) +* [PIP-175: Extend time based release process](https://github.com/apache/pulsar/issues/15966) diff --git a/release-notes/pulsar.mdx b/release-notes/pulsar.mdx index 97c39e997b68..b75ccb26f943 100644 --- a/release-notes/pulsar.mdx +++ b/release-notes/pulsar.mdx @@ -10,6 +10,8 @@ import pulsar from "../data/release-pulsar" ## Release notes +Read more about Pulsar's [release policy](pathname:///contribute/release-policy). + ## Previous versions From d53c4716c096fe1251fee54e3c2a0bebbc4c3cfe Mon Sep 17 00:00:00 2001 From: tison Date: Wed, 22 Feb 2023 21:57:23 +0800 Subject: [PATCH 04/18] Add 2.11 Signed-off-by: tison --- contribute/release-policy.md | 1 + 1 file changed, 1 insertion(+) diff --git a/contribute/release-policy.md b/contribute/release-policy.md index e6fc09ec42f8..0366f675e52c 100644 --- a/contribute/release-policy.md +++ b/contribute/release-policy.md @@ -50,6 +50,7 @@ Therefore, users can choose between stay in an LTS release until they are ready | Version | Released | Active Support | Security Support | Latest | |---------|---------------|-----------------|------------------|--------| +| 2.11 | January 2023 | January 2024 | January 2024 | 2.11.0 | | 2.10 | April 2022 | April 2023 | April 2023 | 2.10.3 | | 2.9 | November 2021 | November 2022 | November 2022 | 2.9.4 | | 2.8 | June 2021 | June 2022 | June 2022 | 2.8.4 | From d79aa5842f9cfc26f02c2930ccb26ff2b4108b8f Mon Sep 17 00:00:00 2001 From: tison Date: Wed, 22 Feb 2023 22:06:58 +0800 Subject: [PATCH 05/18] fix whitespace Signed-off-by: tison --- contribute/release-policy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contribute/release-policy.md b/contribute/release-policy.md index 0366f675e52c..8b4d25061849 100644 --- a/contribute/release-policy.md +++ b/contribute/release-policy.md @@ -48,7 +48,7 @@ Therefore, users can choose between stay in an LTS release until they are ready ## Supported Versions -| Version | Released | Active Support | Security Support | Latest | +| Version | Released | Active Support | Security Support | Latest | |---------|---------------|-----------------|------------------|--------| | 2.11 | January 2023 | January 2024 | January 2024 | 2.11.0 | | 2.10 | April 2022 | April 2023 | April 2023 | 2.10.3 | From bab729e46152ad2913e20416df0f2c434b95db81 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 23 Feb 2023 18:06:40 +0800 Subject: [PATCH 06/18] data-driven SupportedVersionsTable Signed-off-by: tison --- contribute/release-policy.md | 6 ++ package.json | 2 + src/components/SupportedVersionsTable.tsx | 115 ++++++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 src/components/SupportedVersionsTable.tsx diff --git a/contribute/release-policy.md b/contribute/release-policy.md index 8b4d25061849..e51e867f14a2 100644 --- a/contribute/release-policy.md +++ b/contribute/release-policy.md @@ -48,6 +48,12 @@ Therefore, users can choose between stay in an LTS release until they are ready ## Supported Versions +````mdx-code-block +import SupportedVersionsTable from "@site/src/components/SupportedVersionsTable"; + + +```` + | Version | Released | Active Support | Security Support | Latest | |---------|---------------|-----------------|------------------|--------| | 2.11 | January 2023 | January 2024 | January 2024 | 2.11.0 | diff --git a/package.json b/package.json index b99f3ff956fd..f0c0178ac25a 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "react-svg": "^14.1.13", "remark-linkify-regex": "^1.0.0", "replace-in-file": "^6.3.2", + "semver": "^7.3.8", "sine-waves": "^0.3.0", "url-loader": "^4.1.1" }, @@ -69,6 +70,7 @@ "@docusaurus/types": "2.2.0", "@tsconfig/docusaurus": "^1.0.6", "@types/lodash": "^4.14.188", + "@types/semver": "^7.3.13", "autoprefixer": "^10.4.0", "highlight.js": "^9.7.0", "marked": "^0.3.6", diff --git a/src/components/SupportedVersionsTable.tsx b/src/components/SupportedVersionsTable.tsx new file mode 100644 index 000000000000..dc45bc7b21d5 --- /dev/null +++ b/src/components/SupportedVersionsTable.tsx @@ -0,0 +1,115 @@ +import lodash from 'lodash' +import React from 'react' +import semver from "semver/preload" +import {Table, TableBody, TableCell, TableHead, TableRow} from "@mui/material" + +import releases from '@site/data/release-pulsar' + +type SimpleReleaseData = { + version: semver.SemVer, + released: Date, + releaseNoteLink: string, +}; + +type SupportedVersionData = { + version: semver.SemVer, + released: Date, + activeSupport: Date, + securitySupport: Date, + latest: semver.SemVer, + latestReleased: Date, + latestReleaseNoteLink: string, +}; + +function resolveActiveSupport(version: semver.SemVer, released: Date): Date { + let result = new Date(released) + if (version.compareMain('3.0.0') < 0) { + // before 3.0 - active support for 12 months + result.setMonth(released.getMonth() + 12) + } else if (version.minor > 0) { + // regular release - active support for 6 months + result.setMonth(released.getMonth() + 6) + } else { + // LTS release - active support for 24 months + result.setMonth(released.getMonth() + 24) + } + return result +} + +function resolveSecuritySupport(version: semver.SemVer, released: Date): Date { + let result = new Date(released) + if (version.compareMain('3.0.0') < 0) { + // before 3.0 - security support for 12 months + result.setMonth(released.getMonth() + 12) + } else if (version.minor > 0) { + // regular release - security support for 6 months + result.setMonth(released.getMonth() + 6) + } else { + // LTS release - security support for 36 months + result.setMonth(released.getMonth() + 36) + } + return result +} + +function isSameFeatureRelease(v1: semver.SemVer, v2: semver.SemVer): boolean { + return v1.major == v2.major && v1.minor == v2.minor +} + +export default function SupportedVersionsTable(): JSX.Element { + let releaseList: SimpleReleaseData[] = releases.map(r => ({ + version: semver.coerce(r.tagName), + released: new Date(r.publishedAt), + releaseNoteLink: r.releaseNotes, + })) + releaseList.sort((o1, o2) => semver.rcompare(o1.version, o2.version)) + + let supportedVersionList: SupportedVersionData[] = [] + for (const release of releaseList) { + const version = release.version + const released = release.released + const last = lodash.last(supportedVersionList) + if (last && isSameFeatureRelease(last.version, release.version)) { + // early patch release - the support period is counted from the first patch release + last.released = release.released + last.activeSupport = resolveActiveSupport(last.version, last.released) + last.securitySupport = resolveSecuritySupport(last.version, last.released) + continue + } + supportedVersionList.push({ + version: version, + released: released, + activeSupport: resolveActiveSupport(version, released), + securitySupport: resolveSecuritySupport(version, released), + latest: version, + latestReleased: released, + latestReleaseNoteLink: release.releaseNoteLink, + }) + } + + return <> + + + + Version + Released + Active Support + Security Support + Latest + + + + { + supportedVersionList.map(r => <> + + {r.version.major}.{r.version.minor} + {r.released.toDateString()} + {r.activeSupport.toDateString()} + {r.securitySupport.toDateString()} + {r.latest.version} + + ) + } + +
+ +} From a0cc046082afec44488721b8701ad7f6e036fdc2 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 23 Feb 2023 18:56:15 +0800 Subject: [PATCH 07/18] add render Signed-off-by: tison --- package.json | 1 + src/components/SupportedVersionsTable.tsx | 49 ++++++++++++++++++++--- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f0c0178ac25a..e8e94cb85cb1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "lodash": "^4.17.21", "md-2-json": "^2.0.0", "mkdirp": "^1.0.4", + "moment": "^2.29.4", "node-static": "^0.7.11", "npm": "^8.1.3", "prism-react-renderer": "^1.2.1", diff --git a/src/components/SupportedVersionsTable.tsx b/src/components/SupportedVersionsTable.tsx index dc45bc7b21d5..a8f5f52df0e4 100644 --- a/src/components/SupportedVersionsTable.tsx +++ b/src/components/SupportedVersionsTable.tsx @@ -4,6 +4,9 @@ import semver from "semver/preload" import {Table, TableBody, TableCell, TableHead, TableRow} from "@mui/material" import releases from '@site/data/release-pulsar' +import Link from "@docusaurus/Link"; +import useBaseUrl from "@docusaurus/useBaseUrl"; +import moment from "moment"; type SimpleReleaseData = { version: semver.SemVer, @@ -55,6 +58,42 @@ function isSameFeatureRelease(v1: semver.SemVer, v2: semver.SemVer): boolean { return v1.major == v2.major && v1.minor == v2.minor } +function renderVersionCell(version: semver.SemVer): JSX.Element { + if (version.compareMain('3.0.0') < 0) { + return {version.major}.{version.minor} + } else if (version.minor != 0) { + return {version.major}.{version.minor} + } else { + return {version.major}.{version.minor} (LTS) + } +} + +function renderReleasedCell(released: Date): JSX.Element { + return <> + ({released.toDateString()}) + + +} + +function renderSupportCell(support: Date): JSX.Element { + return <> + ({support.toDateString()}) + + +} + +function renderLatestVersionCell(d: SupportedVersionData): JSX.Element { + return + <> + + {d.latest.version} + +
+ ({d.latestReleased.toDateString()}) + +
+} + export default function SupportedVersionsTable(): JSX.Element { let releaseList: SimpleReleaseData[] = releases.map(r => ({ version: semver.coerce(r.tagName), @@ -101,11 +140,11 @@ export default function SupportedVersionsTable(): JSX.Element { { supportedVersionList.map(r => <> - {r.version.major}.{r.version.minor} - {r.released.toDateString()} - {r.activeSupport.toDateString()} - {r.securitySupport.toDateString()} - {r.latest.version} + {renderVersionCell(r.version)} + {renderReleasedCell(r.released)} + {renderSupportCell(r.activeSupport)} + {renderSupportCell(r.securitySupport)} + {renderLatestVersionCell(r)} ) } From 1fa651b4f5b381db3994438ff312b53c53082cb6 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 23 Feb 2023 19:18:25 +0800 Subject: [PATCH 08/18] better datetime render Signed-off-by: tison --- src/components/SupportedVersionsTable.tsx | 76 ++++++++++++----------- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/src/components/SupportedVersionsTable.tsx b/src/components/SupportedVersionsTable.tsx index a8f5f52df0e4..c391ec3e3ae1 100644 --- a/src/components/SupportedVersionsTable.tsx +++ b/src/components/SupportedVersionsTable.tsx @@ -10,48 +10,46 @@ import moment from "moment"; type SimpleReleaseData = { version: semver.SemVer, - released: Date, + released: moment.Moment, releaseNoteLink: string, }; type SupportedVersionData = { version: semver.SemVer, - released: Date, - activeSupport: Date, - securitySupport: Date, + released: moment.Moment, + activeSupport: moment.Moment, + securitySupport: moment.Moment, latest: semver.SemVer, - latestReleased: Date, + latestReleased: moment.Moment, latestReleaseNoteLink: string, }; -function resolveActiveSupport(version: semver.SemVer, released: Date): Date { - let result = new Date(released) +function resolveActiveSupport(version: semver.SemVer, released: moment.Moment): moment.Moment { + const support = moment(released) if (version.compareMain('3.0.0') < 0) { // before 3.0 - active support for 12 months - result.setMonth(released.getMonth() + 12) + return support.add(12, 'months') } else if (version.minor > 0) { // regular release - active support for 6 months - result.setMonth(released.getMonth() + 6) + return support.add(6, 'months') } else { // LTS release - active support for 24 months - result.setMonth(released.getMonth() + 24) + return support.add(24, 'months') } - return result } -function resolveSecuritySupport(version: semver.SemVer, released: Date): Date { - let result = new Date(released) +function resolveSecuritySupport(version: semver.SemVer, released: moment.Moment): moment.Moment { + const support = moment(released) if (version.compareMain('3.0.0') < 0) { // before 3.0 - security support for 12 months - result.setMonth(released.getMonth() + 12) + return support.add(12, 'months') } else if (version.minor > 0) { // regular release - security support for 6 months - result.setMonth(released.getMonth() + 6) + return support.add(6, 'months') } else { // LTS release - security support for 36 months - result.setMonth(released.getMonth() + 36) + return support.add(36, 'months') } - return result } function isSameFeatureRelease(v1: semver.SemVer, v2: semver.SemVer): boolean { @@ -68,40 +66,48 @@ function renderVersionCell(version: semver.SemVer): JSX.Element { } } -function renderReleasedCell(released: Date): JSX.Element { +function renderReleasedCell(released: moment.Moment): JSX.Element { return <> - ({released.toDateString()}) - - + {released.fromNow()} +
+ ({released.format('DD MMM YYYY')}) + } -function renderSupportCell(support: Date): JSX.Element { +function renderSupportCell(support: moment.Moment): JSX.Element { return <> - ({support.toDateString()}) - - + {support.isBefore(moment()) ? "Ended" : "End"} {support.fromNow()} +
+ ({support.format('DD MMM YYYY')}) + } function renderLatestVersionCell(d: SupportedVersionData): JSX.Element { - return - <> - - {d.latest.version} - -
- ({d.latestReleased.toDateString()}) - -
+ const now = moment() + if (d.activeSupport.isBefore(now) && d.securitySupport.isBefore(now)) { + // no longer supported + return + {d.latest.version} + + } + + return <> + {d.latest.version} +
+ ({d.latestReleased.format('DD MMM YYYY')}) +
} export default function SupportedVersionsTable(): JSX.Element { let releaseList: SimpleReleaseData[] = releases.map(r => ({ version: semver.coerce(r.tagName), - released: new Date(r.publishedAt), + released: moment(r.publishedAt), releaseNoteLink: r.releaseNotes, })) releaseList.sort((o1, o2) => semver.rcompare(o1.version, o2.version)) + console.log(`releaseList=${JSON.stringify(releaseList)}`) + let supportedVersionList: SupportedVersionData[] = [] for (const release of releaseList) { const version = release.version From c733681c37dbc5f06d4b0a1c53df9ac990cd6592 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 23 Feb 2023 19:23:53 +0800 Subject: [PATCH 09/18] colored support Signed-off-by: tison --- src/components/SupportedVersionsTable.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/SupportedVersionsTable.tsx b/src/components/SupportedVersionsTable.tsx index c391ec3e3ae1..981efe1768ad 100644 --- a/src/components/SupportedVersionsTable.tsx +++ b/src/components/SupportedVersionsTable.tsx @@ -75,8 +75,11 @@ function renderReleasedCell(released: moment.Moment): JSX.Element { } function renderSupportCell(support: moment.Moment): JSX.Element { - return <> - {support.isBefore(moment()) ? "Ended" : "End"} {support.fromNow()} + const now = moment() + return <> + {support.isBefore(now) ? "Ended" : "End"} {support.fromNow()}
({support.format('DD MMM YYYY')})
From 3b927072c21758348e2a92eec381ee4d23090fec Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 23 Feb 2023 19:24:17 +0800 Subject: [PATCH 10/18] drop manual table Signed-off-by: tison --- contribute/release-policy.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/contribute/release-policy.md b/contribute/release-policy.md index e51e867f14a2..620b096087e3 100644 --- a/contribute/release-policy.md +++ b/contribute/release-policy.md @@ -54,17 +54,6 @@ import SupportedVersionsTable from "@site/src/components/SupportedVersionsTable" ```` -| Version | Released | Active Support | Security Support | Latest | -|---------|---------------|-----------------|------------------|--------| -| 2.11 | January 2023 | January 2024 | January 2024 | 2.11.0 | -| 2.10 | April 2022 | April 2023 | April 2023 | 2.10.3 | -| 2.9 | November 2021 | November 2022 | November 2022 | 2.9.4 | -| 2.8 | June 2021 | June 2022 | June 2022 | 2.8.4 | -| 2.7 | November 2020 | November 2021 | November 2021 | 2.7.5 | -| 2.6 | June 2020 | June 2021 | June 2021 | 2.6.4 | -| 2.5 | January 2020 | January 2021 | January 2021 | 2.5.2 | -| 2.4 | July 2019 | July 2020 | July 2020 | 2.4.2 | - ## Roadmap for release plans The next release of Pulsar is 3.0.0, and it has the planned timeline as: From a688e4ed38aed5cc8dc42b66d37df5a7b832683f Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 23 Feb 2023 19:26:14 +0800 Subject: [PATCH 11/18] light color Signed-off-by: tison --- src/components/SupportedVersionsTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SupportedVersionsTable.tsx b/src/components/SupportedVersionsTable.tsx index 981efe1768ad..cbf26ff33b1d 100644 --- a/src/components/SupportedVersionsTable.tsx +++ b/src/components/SupportedVersionsTable.tsx @@ -77,7 +77,7 @@ function renderReleasedCell(released: moment.Moment): JSX.Element { function renderSupportCell(support: moment.Moment): JSX.Element { const now = moment() return <> {support.isBefore(now) ? "Ended" : "End"} {support.fromNow()}
From c10b605710368773e30296d3ad41da5b65bdf395 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 23 Feb 2023 21:07:21 +0800 Subject: [PATCH 12/18] background to dot and color Signed-off-by: tison --- src/components/SupportedVersionsTable.tsx | 37 +++++++++++++++-------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/src/components/SupportedVersionsTable.tsx b/src/components/SupportedVersionsTable.tsx index cbf26ff33b1d..93c8906fc69e 100644 --- a/src/components/SupportedVersionsTable.tsx +++ b/src/components/SupportedVersionsTable.tsx @@ -1,12 +1,13 @@ import lodash from 'lodash' import React from 'react' import semver from "semver/preload" -import {Table, TableBody, TableCell, TableHead, TableRow} from "@mui/material" +import {Stack, Table, TableBody, TableCell, TableHead, TableRow} from "@mui/material" import releases from '@site/data/release-pulsar' import Link from "@docusaurus/Link"; import useBaseUrl from "@docusaurus/useBaseUrl"; import moment from "moment"; +import {styled} from "@mui/system"; type SimpleReleaseData = { version: semver.SemVer, @@ -71,18 +72,31 @@ function renderReleasedCell(released: moment.Moment): JSX.Element { {released.fromNow()}
({released.format('DD MMM YYYY')}) -
+ +
} +const Dot = styled('div')({ + width: 15, + height: 15, + borderRadius: '50%', +}); + function renderSupportCell(support: moment.Moment): JSX.Element { const now = moment() - return <> - {support.isBefore(now) ? "Ended" : "End"} {support.fromNow()} -
- ({support.format('DD MMM YYYY')}) -
+ return <> + +
+ +
+
+ {support.isBefore(now) ? "Ended" : "End"} {support.fromNow()} +
+ ({support.format('DD MMM YYYY')}) +
+
+ +
} function renderLatestVersionCell(d: SupportedVersionData): JSX.Element { @@ -98,7 +112,8 @@ function renderLatestVersionCell(d: SupportedVersionData): JSX.Element { {d.latest.version}
({d.latestReleased.format('DD MMM YYYY')}) - + + } export default function SupportedVersionsTable(): JSX.Element { @@ -109,8 +124,6 @@ export default function SupportedVersionsTable(): JSX.Element { })) releaseList.sort((o1, o2) => semver.rcompare(o1.version, o2.version)) - console.log(`releaseList=${JSON.stringify(releaseList)}`) - let supportedVersionList: SupportedVersionData[] = [] for (const release of releaseList) { const version = release.version From d4717ac701b62a3f86424608b55918d865de3736 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 23 Feb 2023 21:19:40 +0800 Subject: [PATCH 13/18] bold Signed-off-by: tison --- src/components/SupportedVersionsTable.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/SupportedVersionsTable.tsx b/src/components/SupportedVersionsTable.tsx index 93c8906fc69e..8de09d136b07 100644 --- a/src/components/SupportedVersionsTable.tsx +++ b/src/components/SupportedVersionsTable.tsx @@ -147,15 +147,17 @@ export default function SupportedVersionsTable(): JSX.Element { }) } + const TableHeaderCell = styled(TableCell)({fontWeight: "bold"}) + return <> - Version - Released - Active Support - Security Support - Latest + Version + Released + Active Support + Security Support + Latest From 3613ed52d6835479472a7281b70e949fc06f58f7 Mon Sep 17 00:00:00 2001 From: tison Date: Mon, 27 Feb 2023 15:15:45 +0800 Subject: [PATCH 14/18] write release cycle in steps Signed-off-by: tison --- contribute/release-policy.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/contribute/release-policy.md b/contribute/release-policy.md index 620b096087e3..851b3558dd1d 100644 --- a/contribute/release-policy.md +++ b/contribute/release-policy.md @@ -67,19 +67,14 @@ The next release of Pulsar is 3.0.0, and it has the planned timeline as: Generally, one committer shall volunteer as the release manager (RM) for a specific release. -For feature releases and LTS releases, the last 3 weeks of the release cycle will be marked as a code-freeze period. The RN will branch off from master, and the RM is responsible for selecting the changes that will be cherry-picked in the release branch. +For feature releases and LTS releases, the last 3 weeks of the release cycle will be marked as a code-freeze period. The RM will branch off from master, and the RM is also responsible for selecting the changes that will be cherry-picked in the release branch. From the code-freeze point, to minimize the risk of delaying the release, only bug fixes involving a regression of behavior compared to a previous release should be allowed. Occasional exceptions will be possible after higher scrutiny of the change. -At the moment of the code freeze, the RM will also prepare a release candidate (RC) following the [release process](release-process.md). Committers, contributors, and users will [test this RC](validate-release-candidate.md) to detect issues as early as possible. - -A formal vote by the PMC will not be required at this stage (though any disagreement should be sent out ASAP). - -After 1 week, if there are any changes, the RM will provide a new RC release that the community will test again. - -After 1 more week, if there are any changes, a third RC will be prepared, and this will be submitted to vote to the PMC. Otherwise, the vote will be held on an earlier RC if no issues are found. - -The last 1 week will be used for the voting process and for updating Pulsar website and the blog post announcing the release, which should (hopefully) happen on the scheduled day. +1. At the moment of the code freeze, the RM will start preparing a release candidate (RC) following the [release process](release-process.md). Committers, contributors, and users will [test this RC](validate-release-candidate.md) to detect issues as early as possible. (A formal vote by the PMC will not be required at this stage, though any disagreement should be sent out ASAP). +2. After 1 week, if there are any changes, the RM will provide a new RC release that the community will test again. +3. After 1 more week, if there are any changes, a third RC will be prepared, and this will be submitted to vote to the PMC. Otherwise, the vote will be held on an earlier RC if no issues are found. +4. The last 1 week will be used for the voting process and for updating Pulsar website and the blog post announcing the release, which should (hopefully) happen on the scheduled day. For patch releases, the process is the same while there is no code-freeze period and strict timeline. Basically, patch release is out "when it is ready". From 88734f1d8af2b6a9d913452d996dc124a6a3de7e Mon Sep 17 00:00:00 2001 From: tison Date: Mon, 27 Feb 2023 15:17:23 +0800 Subject: [PATCH 15/18] support version table is now data-driven Signed-off-by: tison --- contribute/release-process.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/contribute/release-process.md b/contribute/release-process.md index ec50c6a4d669..77566fada2bf 100644 --- a/contribute/release-process.md +++ b/contribute/release-process.md @@ -71,8 +71,6 @@ If you created a new branch, update the [CI - OWASP Dependency Check](https://gi Note that you should also stop the workflow for previous Pulsar versions that are EOL. -Also, if you created a new branch, please update the "Supported Versions" table on the [release policy](release-policy.md) page. This table is for support timelines based on when minor releases take place. - ### Update project version and tag During the release process, you are going to initially create "candidate" tags, that after verification and approval will get promoted to the "real" final tag. From fc4a92c78b26dff376b3fd27fefd1ec0d29527e1 Mon Sep 17 00:00:00 2001 From: tison Date: Tue, 28 Feb 2023 12:47:33 +0800 Subject: [PATCH 16/18] Addres comments Signed-off-by: tison --- contribute/release-policy.md | 27 ++++++++++++++++----------- contribute/release-process.md | 28 ++++++++++++++-------------- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/contribute/release-policy.md b/contribute/release-policy.md index 851b3558dd1d..81426fe8cfd7 100644 --- a/contribute/release-policy.md +++ b/contribute/release-policy.md @@ -5,7 +5,9 @@ title: Release policy ## Release semantics -The Pulsar project follows a variant of [Semantic Versioning](http://semver.org/spec/v2.0.0.html). Existing releases can expect patches for bugs and security vulnerabilities. New features will target minor releases. The difference is that a major version bump will not carry any special meaning in terms of "big features" included in the release or breaking API changes. Instead, it would simply signal a new long-term support (LTS) release. +The Pulsar project follows a variant of Semantic Versioning (semver), which mapping `z.minor.patch` to `LTS.feature.patch`. + +Concretely, existing releases can expect patches for bugs and security vulnerabilities. New features will target to feature releases. A "major" version bump will not carry any special meaning in terms of "big features" included in the release or breaking API changes. Instead, it would simply signal a new long-term support (LTS) release. For example, @@ -13,6 +15,7 @@ For example, * 2.10.1 is a patch release; * 2.11.0 is a feature release; * 3.0.0 is the first LTS release; +* 3.0.1 is a patch release of the LTS release; * 3.1.0 is a feature release; * 3.2.0 is a feature release; * 3.2.1 is a patch release; @@ -22,7 +25,7 @@ For example, When upgrading an existing cluster, it is important to upgrade components linearly. -Before 3.0, upgrade should be done linearly through each minor version. For example, when upgrading from 2.8 to 2.10, it is important to upgrade to 2.9 before going to 2.10. +Before 3.0, upgrade should be done linearly through each feature version. For example, when upgrading from 2.8 to 2.10, it is important to upgrade to 2.9 before going to 2.10. Starting from 3.0, additionally, live upgrade/downgrade between one LTS and the next one is guaranteed. For example, @@ -54,15 +57,6 @@ import SupportedVersionsTable from "@site/src/components/SupportedVersionsTable" ```` -## Roadmap for release plans - -The next release of Pulsar is 3.0.0, and it has the planned timeline as: - -* 2023-04-11 - RC-1 -* 2023-04-18 - RC-2 -* 2023-04-25 - RC-3 -* 2023-05-02 - Announce 3.0 Release - ## Release cycles Generally, one committer shall volunteer as the release manager (RM) for a specific release. @@ -78,6 +72,17 @@ From the code-freeze point, to minimize the risk of delaying the release, only b For patch releases, the process is the same while there is no code-freeze period and strict timeline. Basically, patch release is out "when it is ready". +:::note + +For example, the next release of Pulsar is 3.0.0, and it has the planned timeline as: + +* 2023-04-11 - RC-1 +* 2023-04-18 - RC-2 +* 2023-04-25 - RC-3 +* 2023-05-02 - Announce 3.0 Release + +::: + ## Related PIPs * [PIP-47: A Time-Based Release Plan](https://github.com/apache/pulsar/wiki/PIP-47%3A-Time-Based-Release-Plan) diff --git a/contribute/release-process.md b/contribute/release-process.md index 77566fada2bf..7b576e64362a 100644 --- a/contribute/release-process.md +++ b/contribute/release-process.md @@ -5,18 +5,18 @@ title: Release process This page contains instructions for Pulsar committers on how to perform a release. -The term major/minor releases used throughout this document is defined as follows: +The term feature/patch releases used throughout this document is defined as follows: -* Major releases refer to feature releases, such as 2.10.0, 2.11.0, and so on. -* Minor releases refer to bug-fix releases, such as 2.10.1, 2.10.2, and so on. +* Feature releases contain 2.10.0, 2.11.0, 3.0.0, and so on. +* Patch releases refer to bug-fix releases, such as 2.10.1, 2.10.2, and so on. ## Preparation Open a discussion on dev@pulsar.apache.org to notify others that you volunteer to be the release manager of a specific release. If there are no disagreements, you can start the release process. -For major releases, you should create a new branch named `branch-X.Y` once all PRs with the X.Y.0 milestone are merged. If some PRs with the X.Y.0 milestone are still working in progress and might take much time to complete, you can move them to the next milestone if they are not important. In this case, you'd better notify the author in the PR. +For feature releases, you should create a new branch named `branch-X.Y` once all PRs with the X.Y.0 milestone are merged. If some PRs with the X.Y.0 milestone are still working in progress and might take much time to complete, you can move them to the next milestone if they are not important. In this case, you'd better notify the author in the PR. -For minor releases, if there are no disagreements, you should cherry-pick all merged PRs labeled with `release/X.Y.Z` into `branch-X.Y`. After these PRs are cherry-picked, you should add the `cherry-picked/branch-X.Y` labels. +For patch releases, if there are no disagreements, you should cherry-pick all merged PRs labeled with `release/X.Y.Z` into `branch-X.Y`. After these PRs are cherry-picked, you should add the `cherry-picked/branch-X.Y` labels. Sometimes some PRs cannot be cherry-picked cleanly, you might need to create a separate PR and move the `release/X.Y.Z` label from the original PR to it. In this case, you can ask the author to help create the new PR. @@ -46,7 +46,7 @@ Also, you need to **clean up the bookkeeper's local compiled** to make sure the We are going to create a branch from `master` to `branch-v2.X` where the tag will be generated and where new fixes will be applied as part of the maintenance for the release. -The branch needs only to be created for major releases, and not for minor releases like `2.3.1`. For minor releases, go to the next step. +The branch needs only to be created for feature releases, and not for patch releases like `2.3.1`. For patch releases, go to the next step. For example, when you create the `v2.3.0` release, the branch `branch-2.3` will be created; but for `v2.3.1`, we keep using the old `branch-2.3`. @@ -101,7 +101,7 @@ git push origin branch-2.X git push origin v2.X.0-candidate-1 ``` -For minor releases, the tag is like `2.3.1`. +For patch releases, the tag is like `2.3.1`. ### Build release artifacts @@ -347,7 +347,7 @@ If you don't have the permission, you can ask someone with access to apachepulsa :::caution -This step can be skipped if the major version number is not the latest. +This step is for the latest release only. ::: @@ -450,7 +450,7 @@ Read more on the manual of [pytools](https://github.com/apache/pulsar-site/tree/ :::caution -This step is for major releases only, unless you're sure that significant Javadoc fixes are made against the minor release. +This step is for feature releases only, unless you're sure that significant Javadoc fixes are made against the patch release. ::: @@ -474,7 +474,7 @@ Read more on the manual of [pytools](https://github.com/apache/pulsar-site/tree/ :::caution -This step is for major releases only, unless you're sure that significant reference fixes are made against the minor release. +This step is for feature releases only, unless you're sure that significant reference fixes are made against the patch release. ::: @@ -495,7 +495,7 @@ Read more on the manual of [pytools](https://github.com/apache/pulsar-site/tree/ :::caution -This step is for major releases only, unless you're sure that significant doc fixes are made against the minor release. +This step is for feature releases only, unless you're sure that significant doc fixes are made against the patch release. ::: @@ -515,7 +515,7 @@ Read more on the manual of [pytools](https://github.com/apache/pulsar-site/tree/ :::caution -This step is for major releases only, unless you're sure that significant doc fixes are made against the minor release. +This step is for feature releases only, unless you're sure that significant doc fixes are made against the patch release. ::: @@ -551,7 +551,7 @@ For every release, you should add a `` entry to the correspondi :::caution -The following steps are for major releases only. +The following steps are for feature releases only. ::: @@ -629,7 +629,7 @@ svn rm https://dist.apache.org/repos/dist/release/pulsar/pulsar-2.Y.0 :::caution -This step is for major releases only. +This step is for feature releases only. ::: From b710d314548831e97efba35f558cc5f42bbd589b Mon Sep 17 00:00:00 2001 From: tison Date: Tue, 28 Feb 2023 16:56:58 +0800 Subject: [PATCH 17/18] Update contribute/release-policy.md Co-authored-by: Jun Ma <60642177+momo-jun@users.noreply.github.com> --- contribute/release-policy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contribute/release-policy.md b/contribute/release-policy.md index 81426fe8cfd7..102f1a9ad7ca 100644 --- a/contribute/release-policy.md +++ b/contribute/release-policy.md @@ -19,7 +19,7 @@ For example, * 3.1.0 is a feature release; * 3.2.0 is a feature release; * 3.2.1 is a patch release; -* 4.0.0 is a LTS release. +* 4.0.0 is an LTS release. ## Compatibility between releases From 2fd9676ab8c828e5c95c5bad918756da54b95fda Mon Sep 17 00:00:00 2001 From: tison Date: Tue, 28 Feb 2023 17:03:03 +0800 Subject: [PATCH 18/18] Update contribute/release-policy.md --- contribute/release-policy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contribute/release-policy.md b/contribute/release-policy.md index 102f1a9ad7ca..f33d2aa146cf 100644 --- a/contribute/release-policy.md +++ b/contribute/release-policy.md @@ -5,7 +5,7 @@ title: Release policy ## Release semantics -The Pulsar project follows a variant of Semantic Versioning (semver), which mapping `z.minor.patch` to `LTS.feature.patch`. +The Pulsar project follows a variant of Semantic Versioning (semver), which replacing `major.minor.patch` with `LTS.feature.patch`. Concretely, existing releases can expect patches for bugs and security vulnerabilities. New features will target to feature releases. A "major" version bump will not carry any special meaning in terms of "big features" included in the release or breaking API changes. Instead, it would simply signal a new long-term support (LTS) release.