Skip to content

Commit

Permalink
Changing the shard name to set to artifact name as it is conflicting,…
Browse files Browse the repository at this point in the history
… needs to be verified on ci
  • Loading branch information
Rd4dev committed Aug 11, 2024
1 parent 50a2a91 commit df7361b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,16 @@ jobs:
run: |
# See https://stackoverflow.com/a/29903172 for cut logic. This is needed to remove the
# user-friendly shard prefix from the matrix value.
CHANGED_FILES_BUCKET_BASE64=$(echo "$CHANGED_FILESS_BUCKET_BASE64_ENCODED_SHARD" | cut -d ";" -f 2)
CHANGED_FILES_BUCKET_BASE64=$(echo "$CHANGED_FILES_BUCKET_BASE64_ENCODED_SHARD" | cut -d "-" -f 2)
SHARD_NAME=$(echo "$CHANGED_FILES_BUCKET_BASE64_ENCODED_SHARD" | cut -d "-" -f 1)
bazel run //scripts:retrieve_changed_files -- $(pwd) $CHANGED_FILES_BUCKET_BASE64 $(pwd)/file_bucket_name $(pwd)/changed_files $(pwd)/bazel_test_targets
FILE_CATEGORY=$(cat ./file_bucket_name)
CHANGED_FILES=$(cat ./changed_files)
BAZEL_TEST_TARGETS=$(cat ./bazel_test_targets)
echo "File category: $FILE_CATEGORY"
echo "Changed Files: $CHANGED_FILES"
echo "Bazel test targets: $BAZEL_TEST_TARGETS"
echo "SHARD_NAME=$SHARD_NAME" >> $GITHUB_ENV
echo "FILE_CACHING_BUCKET=$FILE_CATEGORY" >> $GITHUB_ENV
echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_ENV
echo "BAZEL_TEST_TARGETS=$BAZEL_TEST_TARGETS" >> $GITHUB_ENV
Expand Down Expand Up @@ -244,7 +246,10 @@ jobs:
- name: Upload Coverage Report
uses: actions/upload-artifact@v4
env:
SHARD_NAME : ${{ env.SHARD_NAME }}
with:
name: coverage-report-$SHARD_NAME
path: coverage_reports

collect-coverage-reports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class ComputeChangedFiles(

File(pathToOutputFile).printWriter().use { writer ->
encodedFileBucketEntries.forEachIndexed { index, (encoded, bucket) ->
writer.println("${bucket.cacheBucketName}-shard$index;$encoded")
writer.println("${bucket.cacheBucketName}_shard$index-$encoded")
}
}
}
Expand Down

0 comments on commit df7361b

Please sign in to comment.