You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by "acelyc111 (via GitHub)" <gi...@apache.org> on 2023/12/19 07:41:33 UTC

[PR] Reduce duplicate code [incubator-pegasus]

acelyc111 opened a new pull request, #1791:
URL: https://github.com/apache/incubator-pegasus/pull/1791

   ### What problem does this PR solve? <!--add issue link with summary if exists-->
   
   
   ### What is changed and how does it work?
   
   
   ### Checklist <!--REMOVE the items that are not applicable-->
   
   ##### Tests <!-- At least one of them must be included. -->
   
   - Unit test
   - Integration test
   - Manual test (add detailed scripts or steps below)
   - No code
   
   ##### Code changes
   
   - Has exported function/method change
   - Has exported variable/fields change
   - Has interface methods change
   - Has persistent data change
   
   ##### Side effects
   
   - Possible performance regression
   - Increased code complexity
   - Breaking backward compatibility
   
   ##### Related changes
   
   - Need to cherry-pick to the release branch
   - Need to update the documentation
   - Need to be included in the release note
   


-- 
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: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org


Re: [PR] chore(CI): Improve github actions [incubator-pegasus]

Posted by "empiredan (via GitHub)" <gi...@apache.org>.
empiredan commented on code in PR #1791:
URL: https://github.com/apache/incubator-pegasus/pull/1791#discussion_r1433885366


##########
.github/actions/download_artifact/action.yaml:
##########
@@ -0,0 +1,36 @@
+# 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.
+
+name: Download artifact
+runs:
+  using: composite
+  steps:
+    - name: Unpack prebuilt third-parties
+      run: |
+        unzip /root/thirdparties-bin.zip -d ./thirdparty
+        rm -f /root/thirdparties-bin.zip
+      shell: bash
+    - name: Download Artifact
+      uses: actions/download-artifact@v3
+      with:
+        name: ${{ env.ARTIFACT_NAME }}_artifact_${{ github.sha }}
+        path: .
+    - name: Tar files

Review Comment:
   ```suggestion
       - name: Unpack tarball
   ```



##########
.github/actions/download_artifact/action.yaml:
##########
@@ -0,0 +1,36 @@
+# 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.
+
+name: Download artifact
+runs:
+  using: composite
+  steps:
+    - name: Unpack prebuilt third-parties
+      run: |
+        unzip /root/thirdparties-bin.zip -d ./thirdparty
+        rm -f /root/thirdparties-bin.zip
+      shell: bash
+    - name: Download Artifact

Review Comment:
   ```suggestion
       - name: Download tarball
   ```



##########
.github/actions/upload_artifact/action.yaml:
##########
@@ -0,0 +1,38 @@
+# 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.
+
+name: Upload artifact
+runs:
+  using: composite
+  steps:
+    - name: Tar files
+      run: |
+        mv thirdparty/hadoop-bin ./
+        mv thirdparty/zookeeper-bin ./
+        rm -rf thirdparty
+        # The following operations are tricky, these directories and files don't exist if not build with '--test'.
+        # When build binaries for client tests, it's not needed to add '--test'.
+        mkdir -p build/latest/bin
+        mkdir -p build/latest/src/server/test
+        touch build/latest/src/server/test/config.ini
+        tar -zcvhf ${ARTIFACT_NAME}_builder.tar build/latest/output build/latest/bin build/latest/src/server/test/config.ini hadoop-bin zookeeper-bin
+      shell: bash
+    - name: Upload Artifact

Review Comment:
   ```suggestion
       - name: Upload tarball
   ```



-- 
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: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org


Re: [PR] chore(CI): Improve github actions [incubator-pegasus]

Posted by "acelyc111 (via GitHub)" <gi...@apache.org>.
acelyc111 merged PR #1791:
URL: https://github.com/apache/incubator-pegasus/pull/1791


-- 
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: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org


Re: [PR] chore(CI): Improve github actions [incubator-pegasus]

Posted by "acelyc111 (via GitHub)" <gi...@apache.org>.
acelyc111 commented on PR #1791:
URL: https://github.com/apache/incubator-pegasus/pull/1791#issuecomment-1864406393

   The go-client CI is failed which is a known issue, we can fix it in another patch.


-- 
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: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org