Skip to content

Commit 4e27ecd

Browse files
authored
Merge pull request #4386 from DataDog/tonycthsu/improve-cache-clean-summary
Improve cache clean summary and trigger event
2 parents eac4961 + 55c03ab commit 4e27ecd

File tree

8 files changed

+38
-22
lines changed

8 files changed

+38
-22
lines changed

.github/workflows/build-gem.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ on:
1010
default: true
1111
push:
1212
branches:
13-
- "**"
13+
- master
14+
pull_request:
15+
branches:
16+
- master
1417

1518
env:
1619
GEM_HOST: 'https://rubygems.pkg.github.com/DataDog'

.github/workflows/cache-cleanup.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
2222
echo "[DEBUG] Fetching cache list..."
2323
# Get full cache details
24-
CACHE_LIST=$(gh cache list --ref $BRANCH --limit 100 --json key,sizeInBytes,createdAt,id)
24+
CACHE_LIST=$(gh cache list --ref $BRANCH --limit 100 --json key,sizeInBytes,id)
2525
2626
if [ -z "$CACHE_LIST" ] || [ "$CACHE_LIST" = "[]" ]; then
2727
echo "[DEBUG] No caches found"
@@ -30,11 +30,11 @@ jobs:
3030
fi
3131
3232
# Create table header
33-
echo "| Cache ID | Cache Key | Size | Created At | Status |" >> $GITHUB_STEP_SUMMARY
34-
echo "|----------|-----------|------|------------|--------|" >> $GITHUB_STEP_SUMMARY
33+
echo "| Cache ID | Cache Key | Size |" >> $GITHUB_STEP_SUMMARY
34+
echo "|----------|-----------|------|" >> $GITHUB_STEP_SUMMARY
3535
3636
# Extract IDs and process deletions
37-
echo "$CACHE_LIST" | jq -r '.[] | [.id, .key, .sizeInBytes, .createdAt] | @tsv' | while IFS=$'\t' read -r id key size created; do
37+
echo "$CACHE_LIST" | jq -r '.[] | [.id, .key, .sizeInBytes] | @tsv' | while IFS=$'\t' read -r id key size; do
3838
# Convert size to human readable format
3939
if [ $size -ge 1048576 ]; then
4040
readable_size=$(echo "scale=2; $size/1048576" | bc)"MB"
@@ -43,16 +43,11 @@ jobs:
4343
fi
4444
4545
echo "[DELETE] Processing cache ID: $id"
46-
if gh cache delete $id > /dev/null 2>&1; then
47-
status="✅ Deleted"
48-
echo "[SUCCESS] Cache $id deleted"
49-
else
50-
status="❌ Failed"
51-
echo "[ERROR] Failed to delete cache $id"
52-
fi
46+
gh cache delete $id
47+
echo "[INFO] Processed cache $id"
5348
5449
# Add row to summary table
55-
echo "| \`$id\` | \`$key\` | $readable_size | $created | $status |" >> $GITHUB_STEP_SUMMARY
50+
echo "| \`$id\` | \`$key\` | $readable_size |" >> $GITHUB_STEP_SUMMARY
5651
done
5752
5853
# Add completion timestamp

.github/workflows/check.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Static Analysis
22
on:
33
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
49

510
concurrency:
611
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/generate-supported-versions.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: "Generate Supported Versions"
22

33
on:
44
workflow_dispatch:
5-
65

76
concurrency:
87
group: ${{ github.workflow }}
@@ -20,7 +19,6 @@ jobs:
2019
- name: Set up Ruby
2120
uses: ruby/setup-ruby@8388f20e6a9c43cd241131b678469a9f89579f37 # v1.216.0
2221
with:
23-
bundler-cache: true # runs bundle install
2422
ruby-version: "3.3"
2523

2624
- name: Update latest
@@ -45,6 +43,6 @@ jobs:
4543
as defined from the `gemfile.lock` gem declarations.
4644
4745
Workflow run: [Generate Supported Versions](https://github.com/DataDog/dd-trace-rb/actions/workflows/generate-supported-versions.yml)
48-
46+
4947
This should be tied to tracer releases, or triggered manually.
5048

.github/workflows/nix.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ name: Test Nix
33
on:
44
push:
55
branches:
6-
- "**"
6+
- master
7+
pull_request:
8+
branches:
9+
- master
710

811
jobs:
912
test:

.github/workflows/test-macos.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Test macOS
22
on:
33
push:
44
branches:
5-
- "**"
5+
- master
66
pull_request:
7-
# The branches below must be a subset of the branches above
8-
branches: [ master ]
7+
branches:
8+
- master
99
jobs:
1010
test-macos:
1111
strategy:

.github/workflows/test-memory-leaks.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Test for memory leaks
2-
on: [push]
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
39
jobs:
410
test-memcheck:
511
runs-on: ubuntu-24.04

.github/workflows/test-yjit.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Test YJIT
2-
on: [push]
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
39
jobs:
410
test-yjit:
511
strategy:

0 commit comments

Comments
 (0)