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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to