You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "hanahmily (via GitHub)" <gi...@apache.org> on 2025/10/23 01:41:27 UTC

[PR] Refactor CI Workflows to Use Centralized Preparation Step [skywalking-banyandb]

hanahmily opened a new pull request, #822:
URL: https://github.com/apache/skywalking-banyandb/pull/822

   * Consolidate preparation steps across multiple CI workflows by utilizing a shared `prepare.yml` file.
   * Update jobs in `ci.yml`, `e2e.yml`, `flaky-test.yml`, `publish-docker.yml`, `slow-test.yml`, and `test.yml` to streamline setup processes and improve maintainability.
   * Remove redundant steps such as code checkout and tool installations, enhancing workflow efficiency.
   


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


Re: [PR] Refactor CI Workflows to Use Centralized Preparation Step [skywalking-banyandb]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #822:
URL: https://github.com/apache/skywalking-banyandb/pull/822#discussion_r2453715601


##########
.github/workflows/e2e.yml:
##########
@@ -53,36 +75,24 @@ jobs:
     env:
       TAG: ${{ github.sha }}
     steps:
-      - name: Check out code into the Go module directory
-        uses: actions/checkout@v4
+      - name: Setup build environment
+        uses: ./.github/actions/setup-build-env
         with:
-          fetch-tags: true
-      - name: Download build artifacts
+          download-artifacts: 'true'
+          setup-docker: 'false'
+      - name: Download docker image artifact
         uses: actions/download-artifact@v4
         with:
-          name: build-artifacts
-      - uses: actions/setup-node@v3
-        with:
-          node-version: 20.12
-          cache: 'npm'
-          cache-dependency-path: ui/package-lock.json
-      - name: Install Go
-        uses: actions/setup-go@v5
-        with:
-          go-version-file: 'go.mod'
-          cache: true
-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v1
-      - name: Build binary
-        run: make release
-      - name: Build docker image
+          name: banyandb-docker-image
+          path: /tmp
+      - name: Load docker image
         run: |
-          make -C test/docker build | make -C test/docker build
+          docker load --input /tmp/banyandb-testing-image.tar.gz

Review Comment:
   The docker image artifact download and load steps will fail for non-schedule events since the `DockerImage` job (which creates the artifact) only runs on schedule events. The previous implementation built the image inline, which worked for all event types. Either make the `DockerImage` job run for all events or restore the inline build for non-schedule events.



##########
.github/workflows/e2e.yml:
##########
@@ -112,7 +122,7 @@ jobs:
     if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking-banyandb') || (github.event_name != 'schedule')
     runs-on: ubuntu-latest
     timeout-minutes: 90
-    needs: [StoragePlugins]
+    needs: [prepare, StoragePlugins]

Review Comment:
   The `Required` job depends on `prepare`, but `prepare` only runs on schedule events (`github.event_name == 'schedule'`). This will cause the `Required` job to be skipped for non-schedule events since a needed job didn't run. Remove `prepare` from the needs list as this job should only depend on `StoragePlugins`.
   ```suggestion
       needs: [StoragePlugins]
   ```



##########
.github/workflows/e2e.yml:
##########
@@ -30,11 +30,33 @@ concurrency:
   cancel-in-progress: true
 
 jobs:
+  prepare:
+    if: github.event_name == 'schedule' && github.repository == 'apache/skywalking-banyandb'
+    uses: ./.github/workflows/prepare.yml
+
+  DockerImage:
+    if: github.event_name == 'schedule' && github.repository == 'apache/skywalking-banyandb'
+    name: Build Docker image
+    runs-on: ubuntu-latest
+    timeout-minutes: 45
+    needs: [prepare]
+    steps:
+      - name: Setup build environment
+        uses: ./.github/actions/setup-build-env
+        with:
+          download-artifacts: 'true'
+          setup-docker: 'true'
+      - name: Build and upload docker image
+        uses: ./.github/actions/build-docker-image
+        with:
+          tag: ${{ github.sha }}
+
   StoragePlugins:
     if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking-banyandb') || (github.event_name != 'schedule')
     name: Storage E2E
     runs-on: ubuntu-latest
     timeout-minutes: 90
+    needs: [prepare, DockerImage]

Review Comment:
   The `StoragePlugins` job has a conditional that allows it to run on non-schedule events (`github.event_name != 'schedule'`), but it depends on `prepare` and `DockerImage` jobs which only run on schedule events. This will cause the job to fail when triggered by non-schedule events. Consider making the dependencies conditional or adjusting the job's conditional logic.



-- 
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: notifications-unsubscribe@skywalking.apache.org

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


Re: [PR] Refactor CI Workflows to Use Centralized Preparation Step [skywalking-banyandb]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #822:
URL: https://github.com/apache/skywalking-banyandb/pull/822


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


Re: [PR] Refactor CI Workflows to Use Centralized Preparation Step [skywalking-banyandb]

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

   ## [Codecov](https://app.codecov.io/gh/apache/skywalking-banyandb/pull/822?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 34.68%. Comparing base ([`3530dd9`](https://app.codecov.io/gh/apache/skywalking-banyandb/commit/3530dd9b5cefaa4fef60eec91ecbfbdfcaf243c5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`f30c946`](https://app.codecov.io/gh/apache/skywalking-banyandb/commit/f30c946ef24f7da6eb315c4cb8f870246f9bc122?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 7 commits behind head on main.
   > :exclamation:  There is a different number of reports uploaded between BASE (3530dd9) and HEAD (f30c946). Click for more details.
   > 
   > <details><summary>HEAD has 1 upload less than BASE</summary>
   >
   >| Flag | BASE (3530dd9) | HEAD (f30c946) |
   >|------|------|------|
   >||1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff             @@
   ##             main     #822       +/-   ##
   ===========================================
   - Coverage   45.97%   34.68%   -11.30%     
   ===========================================
     Files         328       91      -237     
     Lines       55505    10334    -45171     
   ===========================================
   - Hits        25520     3584    -21936     
   + Misses      27909     6457    -21452     
   + Partials     2076      293     -1783     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/skywalking-banyandb/pull/822/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [pkg](https://app.codecov.io/gh/apache/skywalking-banyandb/pull/822/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.68% <ø> (?)` | |
   
   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.
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/skywalking-banyandb/pull/822?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@skywalking.apache.org

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