Copilot commented on code in PR #6840:
URL: https://github.com/apache/texera/pull/6840#discussion_r3641475108


##########
.github/workflows/build.yml:
##########
@@ -649,30 +656,18 @@ jobs:
         # --junit-xml feeds the Test Analytics upload below.
         run: |
           cd amber && pytest -m integration --junit-xml=junit-integration.xml 
-sv
-      - name: Stage amber-integration test results for deferred Codecov upload
-        # Deferred to codecov-upload.yml (workflow_run) so fork PRs get an
-        # authenticated upload — see #6685. Results-only flag (no jacoco). 
Staged
-        # on the ubuntu leg only: the integration specs run on both ubuntu and
-        # macOS, so staging both would clash on the `codecov-amber-integration`
-        # artifact name (upload-artifact@v4 rejects duplicates); the ubuntu 
run is
-        # representative for Test Analytics. Skipped on backport builds.
-        if: matrix.os == 'ubuntu-latest' && inputs.backport_target_branch == 
'' && !cancelled()
-        shell: bash
-        env:
-          CC_COVERAGE: ""
-          CC_RESULTS: "*/target/test-reports/*.xml amber/junit-integration.xml"
-          CC_PR: ${{ github.event.pull_request.number }}
-          CC_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
-          CC_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name 
}}
-        run: bash .github/scripts/stage-codecov.sh
-      - name: Upload amber-integration Codecov artifact
-        if: matrix.os == 'ubuntu-latest' && inputs.backport_target_branch == 
'' && !cancelled()
-        uses: actions/upload-artifact@v4
+      - name: Upload amber integration test results to Codecov
+        # Two separate uploads because the ScalaTest and pytest runs each
+        # produce their own JUnit-XMLs and Codecov keys uploads by flag.
+        # `!cancelled()` so test failures still upload.
+        if: ${{ !cancelled() }}

Review Comment:
   The comment says "Two separate uploads" but this workflow does a single 
Codecov upload step that includes both the ScalaTest and pytest JUnit XMLs in 
one `files:` list. Update the comment to match the actual behavior (or split 
into two steps if that was the intent).



##########
.github/workflows/build.yml:
##########
@@ -137,36 +137,44 @@ jobs:
         run: ./bin/licensing/check_binary_deps.py ${{ inputs.mode == 'PR' && 
'--ignore-transitive-version' || '' }} npm frontend/dist/3rdpartylicenses.json
       - name: Run frontend unit tests
         run: yarn --cwd frontend run test:ci
+      - name: Upload frontend coverage to Codecov
+        if: matrix.os == 'ubuntu-latest' && always()
+        uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f 
# v7.0.0
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }}
+          files: ./frontend/coverage/**/lcov.info
+          flags: frontend
+          fail_ci_if_error: false

Review Comment:
   Codecov uploads will also run for the backport matrix runs 
(inputs.backport_target_branch != ''), but those runs rewrite the checkout to a 
synthetic local commit via prepare-backport-checkout.sh. Uploading 
coverage/results from a non-GitHub SHA can confuse Codecov PR/commit 
association and pollute coverage history. Consider skipping Codecov uploads 
when backport_target_branch is set (as the previous deferred upload logic did).



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