You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "tisonkun (via GitHub)" <gi...@apache.org> on 2023/08/11 15:21:37 UTC

[GitHub] [pulsar] tisonkun opened a new pull request, #20981: [feat][build] Use git-archive to generate source release

tisonkun opened a new pull request, #20981:
URL: https://github.com/apache/pulsar/pull/20981

   Avoid pull in unexpected files.
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
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


[GitHub] [pulsar] tisonkun commented on a diff in pull request #20981: [feat][build] Use git-archive to generate source release

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #20981:
URL: https://github.com/apache/pulsar/pull/20981#discussion_r1291508387


##########
src/stage-release.sh:
##########
@@ -26,13 +26,17 @@ if [ $# -eq 0 ]; then
 fi
 
 DEST_PATH=$1
+DEST_PATH="$(cd "$DEST_PATH" && pwd)"
 
 pushd $(dirname "$0")
 PULSAR_PATH=$(git rev-parse --show-toplevel)
 VERSION=`./get-project-version.py`
 popd
 
-cp $PULSAR_PATH/target/apache-pulsar-$VERSION-src.tar.gz $DEST_PATH
+pushd "$(dirname "$0")/.."

Review Comment:
   RM will still use `$PULSAR_PATH/src/stage-release.sh .` so it's an internal impl change which doesn't cause any external visible change.



-- 
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


[GitHub] [pulsar] tisonkun commented on pull request #20981: [feat][build] Use git-archive to generate source release

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on PR #20981:
URL: https://github.com/apache/pulsar/pull/20981#issuecomment-1676390731

   Merging...


-- 
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


[GitHub] [pulsar] tisonkun commented on a diff in pull request #20981: [feat][build] Use git-archive to generate source release

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #20981:
URL: https://github.com/apache/pulsar/pull/20981#discussion_r1291511374


##########
src/stage-release.sh:
##########
@@ -26,13 +26,17 @@ if [ $# -eq 0 ]; then
 fi
 
 DEST_PATH=$1
+DEST_PATH="$(cd "$DEST_PATH" && pwd)"
 
 pushd $(dirname "$0")
 PULSAR_PATH=$(git rev-parse --show-toplevel)
 VERSION=`./get-project-version.py`
 popd
 
-cp $PULSAR_PATH/target/apache-pulsar-$VERSION-src.tar.gz $DEST_PATH
+pushd "$(dirname "$0")/.."
+git archive --format=tar.gz --output="$DEST_PATH/apache-pulsar-$VERSION-src.tar.gz" --prefix="apache-pulsar-$VERSION-src/" HEAD

Review Comment:
   > HEAD
   
   Perhaps use "v$VERSION", but I use `HEAD` for testing and as long as the release tag is stable and we release on the tag, it doesn't cause any difference.



-- 
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


[GitHub] [pulsar] codecov-commenter commented on pull request #20981: [feat][build] Use git-archive to generate source release

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #20981:
URL: https://github.com/apache/pulsar/pull/20981#issuecomment-1675155778

   ## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/20981?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#20981](https://app.codecov.io/gh/apache/pulsar/pull/20981?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (45431cf) into [master](https://app.codecov.io/gh/apache/pulsar/commit/98628845aa94b416b0c3711b5a15819ade549c57?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (9862884) will **increase** coverage by `39.67%`.
   > Report is 1 commits behind head on master.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/pulsar/pull/20981/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/pulsar/pull/20981?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@              Coverage Diff              @@
   ##             master   #20981       +/-   ##
   =============================================
   + Coverage     33.53%   73.20%   +39.67%     
   - Complexity    12174    32269    +20095     
   =============================================
     Files          1621     1875      +254     
     Lines        126919   139406    +12487     
     Branches      13851    15329     +1478     
   =============================================
   + Hits          42561   102051    +59490     
   + Misses        78745    29292    -49453     
   - Partials       5613     8063     +2450     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | inttests | `24.14% <ø> (-0.13%)` | :arrow_down: |
   | systests | `25.22% <ø> (?)` | |
   | unittests | `72.46% <ø> (+40.41%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   [see 1523 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/20981/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
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


[GitHub] [pulsar] tisonkun commented on a diff in pull request #20981: [feat][build] Use git-archive to generate source release

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #20981:
URL: https://github.com/apache/pulsar/pull/20981#discussion_r1291509494


##########
src/assembly-source-package.xml:
##########
@@ -1,110 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
-
-    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.
-
--->
-<!-- copied by https://github.com/apache/maven-resources/blob/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-shared.xml
-     that was the original default configuration for ASF projects
-     -->
-<assembly>
-  <id>source-release</id>
-  <formats>
-    <format>tar.gz</format>
-  </formats>
-  <fileSets>
-    <!-- main project directory structure -->
-    <fileSet>
-      <directory>.</directory>
-      <outputDirectory></outputDirectory>
-      <useDefaultExcludes>true</useDefaultExcludes>
-      <excludes>
-        <!-- need special permissions -->
-        <exclude>src/*.sh</exclude>
-        <exclude>src/*.py</exclude>
-        <exclude>docker/pulsar/scripts/*.sh</exclude>
-        <exclude>docker/pulsar/scripts/*.py</exclude>
-
-        <!-- Pulsar standalone -->
-        <exclude>data/**</exclude>
-        <exclude>logs/**</exclude>
-
-        <!-- build output -->
-        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>

Review Comment:
   During 2.10.5 release, we notice that these exclusions can still miss some artifacts. So instead of a handmade whitelist or blacklist, we simply release what's in the VCS with `git-archive`.



-- 
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


[GitHub] [pulsar] tisonkun merged pull request #20981: [feat][build] Use git-archive to generate source release

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun merged PR #20981:
URL: https://github.com/apache/pulsar/pull/20981


-- 
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