Copilot commented on code in PR #34: URL: https://github.com/apache/skywalking-mcp/pull/34#discussion_r2944765072
########## RELEASE.md: ########## @@ -0,0 +1,161 @@ +# How to Release Apache SkyWalking MCP + +This document describes the full release process for Apache SkyWalking MCP, following the [Apache Software Foundation release policy](https://www.apache.org/legal/release-policy.html). + +## Prerequisites + +- Apache committer account with SVN write access to `dist.apache.org` +- GPG key registered in the [Apache KEYS file](https://dist.apache.org/repos/dist/release/skywalking/KEYS) +- Tools installed: `git`, `gpg`, `shasum`, `svn`, `make` + +### Verify your GPG key is ready + +```bash +gpg --list-secret-keys --keyid-format LONG +``` + +If no key exists, generate one using your Apache email address: + +```bash +gpg --full-generate-key +gpg --keyserver keys.openpgp.org --send-keys <YOUR_KEY_ID> +``` + +Then append your public key to the [Apache KEYS file](https://dist.apache.org/repos/dist/release/skywalking/KEYS) via SVN. + +--- + +## Step 1 — Update CHANGES.md + +Add a section for the new version to `CHANGES.md` and commit to `main`. + +--- + +## Step 2 — Create and push a Git tag + +The tag must exist **before** building artifacts — `release.sh` derives the version from it. + +```bash +export VERSION=0.1.0-rc0 # no "v" prefix; used throughout all steps below +git tag v${VERSION} +git push origin v${VERSION} +``` + +--- + +## Step 3 — Build and sign the artifacts + +```bash +make release-assembly +``` + +This runs three steps in sequence: +1. `release-source` — creates `build/skywalking-mcp-${VERSION}-src.tgz` +2. `release-binary` — creates `build/skywalking-mcp-${VERSION}.tgz` +3. `release-sign` — creates `build/skywalking-mcp-${VERSION}.tgz.asc` and `.tgz.sha512` Review Comment: Step 3 claims `release-sign` only generates signatures/checksums for `skywalking-mcp-${VERSION}.tgz`, but `scripts/release.sh` now signs both the binary and `skywalking-mcp-${RELEASE_VERSION}-src.tgz`. Update this section to include the `.asc`/`.sha512` outputs for the source tarball as well. ########## RELEASE.md: ########## @@ -0,0 +1,161 @@ +# How to Release Apache SkyWalking MCP + +This document describes the full release process for Apache SkyWalking MCP, following the [Apache Software Foundation release policy](https://www.apache.org/legal/release-policy.html). + +## Prerequisites + +- Apache committer account with SVN write access to `dist.apache.org` +- GPG key registered in the [Apache KEYS file](https://dist.apache.org/repos/dist/release/skywalking/KEYS) +- Tools installed: `git`, `gpg`, `shasum`, `svn`, `make` + +### Verify your GPG key is ready + +```bash +gpg --list-secret-keys --keyid-format LONG +``` + +If no key exists, generate one using your Apache email address: + +```bash +gpg --full-generate-key +gpg --keyserver keys.openpgp.org --send-keys <YOUR_KEY_ID> +``` + +Then append your public key to the [Apache KEYS file](https://dist.apache.org/repos/dist/release/skywalking/KEYS) via SVN. + +--- + +## Step 1 — Update CHANGES.md + +Add a section for the new version to `CHANGES.md` and commit to `main`. + +--- + +## Step 2 — Create and push a Git tag + +The tag must exist **before** building artifacts — `release.sh` derives the version from it. + +```bash +export VERSION=0.1.0-rc0 # no "v" prefix; used throughout all steps below +git tag v${VERSION} +git push origin v${VERSION} +``` + +--- + +## Step 3 — Build and sign the artifacts + +```bash +make release-assembly +``` + +This runs three steps in sequence: +1. `release-source` — creates `build/skywalking-mcp-${VERSION}-src.tgz` +2. `release-binary` — creates `build/skywalking-mcp-${VERSION}.tgz` +3. `release-sign` — creates `build/skywalking-mcp-${VERSION}.tgz.asc` and `.tgz.sha512` + +--- + +## Step 4 — Upload to Apache dist/dev and send vote email + +```bash +VERSION=${VERSION} make release-push-candidate +``` + +This script: +1. SVN-checks out `https://dist.apache.org/repos/dist/dev/skywalking/` +2. Copies the tarballs, signature, and checksum into `skywalking/mcp/${VERSION}/` +3. Commits to SVN +4. Prints a vote email template to stdout + +Copy the printed email and send it to `[email protected]`. + +--- + +## Step 5 — Community vote + +The vote must remain open for **at least 72 hours**. It requires: +- At least **3 PMC member +1 votes** +- No binding **-1 votes** + +Refer to the [SkyWalking vote check guide](https://github.com/apache/skywalking/blob/master/docs/en/guides/How-to-release.md#vote-check) for how to verify a release candidate. + +--- + +## Step 6 — Promote the release (after vote passes) + +Move the artifacts from `dist/dev` to `dist/release`: + +```bash +svn mv \ + https://dist.apache.org/repos/dist/dev/skywalking/mcp/${VERSION} \ + https://dist.apache.org/repos/dist/release/skywalking/mcp/${VERSION} \ + -m "Release Apache SkyWalking MCP ${VERSION}" +``` + +Remove the previous release from `dist/release` to keep only the latest: + +```bash +svn rm \ + https://dist.apache.org/repos/dist/release/skywalking/mcp/<PREVIOUS_VERSION> \ + -m "Remove old Apache SkyWalking MCP release" +``` + +--- + +## Step 7 — Create the GitHub Release + +Go to **GitHub → Releases → Create a release**, select tag `v${VERSION}`, and publish it. + +This automatically triggers two CI workflows: +- **publish-docker** — pushes `apache/skywalking-mcp:v${VERSION}` to Docker Hub +- **publish-binaries** — builds 4 platform binaries (linux/darwin × amd64/arm64) and attaches them as release assets + +--- + +## Step 8 — Announce the release + +Send an announcement email to `[email protected]` and `[email protected]`: + +``` +Subject: [ANNOUNCE] Apache SkyWalking MCP {VERSION} Released + +Hi the SkyWalking Community: + +This is a call for vote to release Apache SkyWalking MCP version $VERSION. + +Release notes: + + * https://github.com/apache/skywalking-mcp/blob/v$VERSION/CHANGES.md + +Release Candidate: + + * https://dist.apache.org/repos/dist/dev/skywalking/mcp/$VERSION + * sha512 checksums + - $(cat ${PRODUCT_NAME}.tgz.sha512) + +Release Tag : + + * (Git Tag) $TAG_NAME + +Release Commit Hash : + + * https://github.com/apache/skywalking-mcp/tree/${RELEASE_COMMIT} + +Keys to verify the Release Candidate : + + * https://dist.apache.org/repos/dist/release/skywalking/KEYS + +Guide to build the release from source : + + * https://github.com/apache/skywalking-mcp/blob/v$VERSION/README.md + +Voting will start now and will remain open for at least 72 hours, all PMC members are required to give their votes. + +[ ] +1 Release this package. +[ ] +0 No opinion. +[ ] -1 Do not release this package because.... + +Thanks. + Review Comment: The Step 8 “Announce the release” email template is still a VOTE template (subject/body calls for vote, includes voting checkboxes, links to vote-check guide). For an announcement, this should be rewritten to describe the completed release and remove voting language/options. ########## scripts/release.sh: ########## @@ -130,6 +130,8 @@ sign(){ pushd "${BUILDDIR}" >/dev/null trap 'popd >/dev/null' EXIT + gpg --batch --yes --armor --detach-sig "skywalking-mcp-${RELEASE_VERSION}-src.tgz" + shasum -a 512 "skywalking-mcp-${RELEASE_VERSION}-src.tgz" > "skywalking-mcp-${RELEASE_VERSION}-src.tgz.sha512" Review Comment: The source artifact name is already tracked via `SOURCE_FILE_NAME`/`SOURCE_FILE`; consider reusing that here (or deriving from a single variable) rather than repeating the literal `skywalking-mcp-${RELEASE_VERSION}-src.tgz`, to prevent future name drift between packaging and signing steps. ########## scripts/push-release.sh: ########## @@ -33,19 +33,29 @@ SCRIPTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) ROOTDIR=${SCRIPTDIR}/.. BUILDDIR=${ROOTDIR}/build +if ! git -C "${ROOTDIR}" rev-parse "${TAG_NAME}" >/dev/null 2>&1; then + echo "Error: Git tag '${TAG_NAME}' not found. Create and push the tag first:" >&2 + echo " git tag ${TAG_NAME} && git push origin ${TAG_NAME}" >&2 + exit 1 +fi +RELEASE_COMMIT=$(git -C "${ROOTDIR}" rev-list -n 1 "${TAG_NAME}") + pushd ${BUILDDIR} trap 'popd' EXIT rm -rf skywalking svn co https://dist.apache.org/repos/dist/dev/skywalking/ mkdir -p skywalking/mcp/"$VERSION" -cp ${PRODUCT_NAME}-*.tgz skywalking/mcp/"$VERSION" -cp ${PRODUCT_NAME}-*.tgz.asc skywalking/mcp/"$VERSION" -cp ${PRODUCT_NAME}-*.tgz.sha512 skywalking/mcp/"$VERSION" +cp ${PRODUCT_NAME}*.tgz skywalking/mcp/"$VERSION" +cp ${PRODUCT_NAME}*.tgz.asc skywalking/mcp/"$VERSION" +cp ${PRODUCT_NAME}*.tgz.sha512 skywalking/mcp/"$VERSION" +cp ${PRODUCT_NAME}-src*.tgz skywalking/mcp/"$VERSION" Review Comment: Trailing whitespace at end of the `cp ${PRODUCT_NAME}-src*.tgz ...` line. ########## RELEASE.md: ########## @@ -0,0 +1,161 @@ +# How to Release Apache SkyWalking MCP + +This document describes the full release process for Apache SkyWalking MCP, following the [Apache Software Foundation release policy](https://www.apache.org/legal/release-policy.html). + +## Prerequisites + +- Apache committer account with SVN write access to `dist.apache.org` +- GPG key registered in the [Apache KEYS file](https://dist.apache.org/repos/dist/release/skywalking/KEYS) +- Tools installed: `git`, `gpg`, `shasum`, `svn`, `make` + +### Verify your GPG key is ready + +```bash +gpg --list-secret-keys --keyid-format LONG +``` + +If no key exists, generate one using your Apache email address: + +```bash +gpg --full-generate-key +gpg --keyserver keys.openpgp.org --send-keys <YOUR_KEY_ID> +``` + +Then append your public key to the [Apache KEYS file](https://dist.apache.org/repos/dist/release/skywalking/KEYS) via SVN. + +--- + +## Step 1 — Update CHANGES.md + +Add a section for the new version to `CHANGES.md` and commit to `main`. + +--- + +## Step 2 — Create and push a Git tag + +The tag must exist **before** building artifacts — `release.sh` derives the version from it. + +```bash +export VERSION=0.1.0-rc0 # no "v" prefix; used throughout all steps below +git tag v${VERSION} +git push origin v${VERSION} +``` Review Comment: Step 2 says `release.sh` “derives the version” from the tag, but `scripts/release.sh` resolves `RELEASE_VERSION` by selecting the latest tag in the repo (or via `RELEASE_VERSION` env override), not from the `VERSION` env var. To prevent building artifacts with an unexpected version, document that you should either check out the tagged commit (or ensure the intended tag is the latest), or explicitly set `RELEASE_VERSION` when running `make release-assembly`. ########## scripts/push-release.sh: ########## @@ -33,19 +33,29 @@ SCRIPTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) ROOTDIR=${SCRIPTDIR}/.. BUILDDIR=${ROOTDIR}/build +if ! git -C "${ROOTDIR}" rev-parse "${TAG_NAME}" >/dev/null 2>&1; then + echo "Error: Git tag '${TAG_NAME}' not found. Create and push the tag first:" >&2 + echo " git tag ${TAG_NAME} && git push origin ${TAG_NAME}" >&2 + exit 1 +fi +RELEASE_COMMIT=$(git -C "${ROOTDIR}" rev-list -n 1 "${TAG_NAME}") + pushd ${BUILDDIR} trap 'popd' EXIT rm -rf skywalking svn co https://dist.apache.org/repos/dist/dev/skywalking/ mkdir -p skywalking/mcp/"$VERSION" -cp ${PRODUCT_NAME}-*.tgz skywalking/mcp/"$VERSION" -cp ${PRODUCT_NAME}-*.tgz.asc skywalking/mcp/"$VERSION" -cp ${PRODUCT_NAME}-*.tgz.sha512 skywalking/mcp/"$VERSION" +cp ${PRODUCT_NAME}*.tgz skywalking/mcp/"$VERSION" +cp ${PRODUCT_NAME}*.tgz.asc skywalking/mcp/"$VERSION" +cp ${PRODUCT_NAME}*.tgz.sha512 skywalking/mcp/"$VERSION" +cp ${PRODUCT_NAME}-src*.tgz skywalking/mcp/"$VERSION" +cp ${PRODUCT_NAME}-src*.tgz.asc skywalking/mcp/"$VERSION" +cp ${PRODUCT_NAME}-src*.tgz.sha512 skywalking/mcp/"$VERSION" Review Comment: `cp ${PRODUCT_NAME}*.tgz` (and the corresponding `.asc`/`.sha512` globs) already match both the binary tarball and the `-src.tgz` artifacts, so the subsequent `cp ${PRODUCT_NAME}-src*...` lines are redundant and make it harder to see exactly what gets published. Prefer copying explicit filenames (binary + source) once each to avoid accidental extra matches. ########## scripts/push-release.sh: ########## @@ -33,19 +33,29 @@ SCRIPTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) ROOTDIR=${SCRIPTDIR}/.. BUILDDIR=${ROOTDIR}/build +if ! git -C "${ROOTDIR}" rev-parse "${TAG_NAME}" >/dev/null 2>&1; then + echo "Error: Git tag '${TAG_NAME}' not found. Create and push the tag first:" >&2 + echo " git tag ${TAG_NAME} && git push origin ${TAG_NAME}" >&2 + exit 1 +fi +RELEASE_COMMIT=$(git -C "${ROOTDIR}" rev-list -n 1 "${TAG_NAME}") Review Comment: The new tag existence check uses `git rev-parse "${TAG_NAME}"`, which can resolve non-tag refs (e.g., a branch with the same name). To avoid false positives, verify the tag ref explicitly (e.g., `refs/tags/${TAG_NAME}` / `git show-ref --tags --verify`). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
