You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "RobertIndie (via GitHub)" <gi...@apache.org> on 2025/05/20 08:06:41 UTC
[PR] Fix the staging release process [pulsar-client-go]
RobertIndie opened a new pull request, #1373:
URL: https://github.com/apache/pulsar-client-go/pull/1373
### Motivation
The "Build and inspect an artifact." step in the [release process](https://github.com/apache/pulsar-client-go/blob/master/docs/release-process.md) would also include the `.git` folder.
https://lists.apache.org/thread/pndqy7lfb8nrsgjh0wfq1bsrs1g7ds3y
### Modifications
- Added a new script for staging the release artifact: `stag-release.sh`
- Updated the release process to exclude the `.git` folder from the release artifact
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): (yes / no)
- The public API: (yes / no)
- The schema: (yes / no / don't know)
- The default values of configurations: (yes / no)
- The wire protocol: (yes / no)
### Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / GoDocs / not documented)
- If a feature is not applicable for documentation, explain why?
- If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix the staging release process [pulsar-client-go]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #1373:
URL: https://github.com/apache/pulsar-client-go/pull/1373#discussion_r2099911801
##########
scripts/stage-release.sh:
##########
@@ -0,0 +1,43 @@
+#!/bin/bash
+# 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.
+
+set -euo pipefail -x
Review Comment:
[nitpick] Consider removing the '-x' flag if not needed in production to avoid exposing sensitive command outputs. Alternatively, ensure the debug output is acceptable for the intended environment.
```suggestion
set -euo pipefail
```
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix the staging release process [pulsar-client-go]
Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie merged PR #1373:
URL: https://github.com/apache/pulsar-client-go/pull/1373
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix the staging release process [pulsar-client-go]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #1373:
URL: https://github.com/apache/pulsar-client-go/pull/1373#discussion_r2099888232
##########
scripts/stage-release.sh:
##########
@@ -0,0 +1,43 @@
+#!/bin/bash
+# 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.
+
+set -e -x
+
+if [ $# -ne 2 ]; then
+ echo "Usage: $0 <version> <destination_directory>"
+ exit 1
+fi
+
+VERSION=$1
+
+DEST_PATH=$2
+DEST_PATH="$(cd "$DEST_PATH" && pwd)"
+
+pushd "$(dirname "$0")"
+REPO_PATH=$(git rev-parse --show-toplevel)
+popd
+
+pushd "$REPO_PATH"
+git archive --format=tar.gz --output="$DEST_PATH/apache-pulsar-client-go-$VERSION-src.tar.gz" HEAD
+popd
+
+# Sign all files
+cd $DEST_PATH
Review Comment:
Quote the DEST_PATH variable to handle directories with spaces: `cd "$DEST_PATH"`.
```suggestion
cd "$DEST_PATH"
```
##########
scripts/stage-release.sh:
##########
@@ -0,0 +1,43 @@
+#!/bin/bash
+# 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.
+
+set -e -x
Review Comment:
[nitpick] Consider using `set -euo pipefail -x` for stricter error handling and to catch unset variables.
```suggestion
set -euo pipefail -x
```
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix the staging release process [pulsar-client-go]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #1373:
URL: https://github.com/apache/pulsar-client-go/pull/1373#discussion_r2097407040
##########
scripts/stage-release.sh:
##########
@@ -0,0 +1,47 @@
+#!/bin/bash
+# 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.
+
+set -e -x
+
+if [ $# -eq 0 ]; then
+ echo "Required argument with destination directory"
+ exit 1
+fi
+
+if [ -z "$VERSION" ]; then
+ echo "VERSION is not defined. Please set the VERSION environment variable."
+ exit 1
+fi
+
+
+DEST_PATH=$1
+DEST_PATH="$(cd "$DEST_PATH" && pwd)"
+
+pushd $(dirname "$0")
Review Comment:
Quote the result of the dirname substitution to handle paths with spaces: pushd "$(dirname \"$0\")".
```suggestion
pushd "$(dirname "$0")"
```
##########
scripts/stage-release.sh:
##########
@@ -0,0 +1,47 @@
+#!/bin/bash
+# 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.
+
+set -e -x
+
+if [ $# -eq 0 ]; then
+ echo "Required argument with destination directory"
Review Comment:
[nitpick] Improve the usage message by including the script name and expected syntax, for example: echo "Usage: $0 <destination_directory>".
```suggestion
echo "Usage: $0 <destination_directory>"
```
##########
scripts/stage-release.sh:
##########
@@ -0,0 +1,47 @@
+#!/bin/bash
+# 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.
+
+set -e -x
+
+if [ $# -eq 0 ]; then
+ echo "Required argument with destination directory"
+ exit 1
+fi
+
+if [ -z "$VERSION" ]; then
+ echo "VERSION is not defined. Please set the VERSION environment variable."
+ exit 1
+fi
+
+
+DEST_PATH=$1
+DEST_PATH="$(cd "$DEST_PATH" && pwd)"
+
+pushd $(dirname "$0")
+REPO_PATH=$(git rev-parse --show-toplevel)
+popd
+
+pushd $REPO_PATH
Review Comment:
Quote the variable expansion to safely handle repository paths with spaces: pushd "$REPO_PATH".
```suggestion
pushd "$REPO_PATH"
```
##########
docs/release-process.md:
##########
@@ -51,19 +51,10 @@ git push origin v0.X.0-candidate-1
3. Build and inspect an artifact.
-Generate a release candidate package.
+Stage and sigh the release artifacts.
Review Comment:
Fix typo: replace "sigh" with "sign" for clarity.
```suggestion
Stage and sign the release artifacts.
```
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org