Skip to content

Commit f3e0554

Browse files
author
llm-d-infra-sync
committed
Sync gh-aw workflows from llm-d-infra (a566d16)
Updated workflows: - upstream-monitor.md + upstream-monitor.lock.yml - link-checker.md + link-checker.lock.yml - typo-checker.md + typo-checker.lock.yml Source: llm-d/llm-d-infra@a566d16 Signed-off-by: llm-d-infra-sync <llm-d-infra-sync@users.noreply.github.com>
1 parent e89c2df commit f3e0554

7 files changed

Lines changed: 1426 additions & 1082 deletions

File tree

.github/aw/actions-lock.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"entries": {
3+
"actions/github-script@v8": {
4+
"repo": "actions/github-script",
5+
"version": "v8",
6+
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
7+
},
8+
"github/gh-aw/actions/setup@v0.53.4": {
9+
"repo": "github/gh-aw/actions/setup",
10+
"version": "v0.53.4",
11+
"sha": "b2d8af7543ec40f72bb3b8fea5148c2d3ee401c7"
12+
}
13+
}
14+
}

.github/workflows/link-checker.lock.yml

Lines changed: 458 additions & 339 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/link-checker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Get the list of changed markdown files in this PR:
5050
gh pr diff ${{ github.event.pull_request.number }} --name-only | grep '\.md$'
5151
```
5252

53-
If no markdown files changed, exit cleanly with a message: "No markdown files changed in this PR."
53+
If no markdown files changed, exit immediately — do not post any comment.
5454

5555
#### Step 2: Extract and Check Links
5656

@@ -105,7 +105,7 @@ If ALL broken links are external and returned 5xx or timeout (i.e., all "possibl
105105

106106
If there are definitely broken links (404, internal file missing), add the `broken-links` label.
107107

108-
If all links are OK, do not post a comment.
108+
If all links are OK, exit immediately — do not post any comment. The CI status communicates success.
109109

110110
### Domain-Specific Knowledge
111111

.github/workflows/typo-checker.lock.yml

Lines changed: 444 additions & 337 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/typo-checker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Filter to relevant file types (skip binary files, lock files, generated files):
4747
- Include: `*.md`, `*.yml`, `*.yaml`, `*.go`, `*.py`, `*.sh`, `*.txt`, `*.json`, `*.toml`
4848
- Exclude: `*.lock.yml`, `*.lock`, `*_generated*`, `vendor/`, `node_modules/`, `*.pb.go`
4949

50-
If no relevant files changed, exit cleanly.
50+
If no relevant files changed, exit immediately — do not post any comment.
5151

5252
#### Step 2: Get Changed Content
5353

@@ -125,7 +125,7 @@ This checker recognizes llm-d domain terminology. If a valid term was incorrectl
125125
</details>
126126
```
127127

128-
If no typos are found, do not post a comment.
128+
If no typos are found, exit immediately — do not post any comment. The CI status communicates success.
129129

130130
### Important Rules
131131

.github/workflows/upstream-monitor.lock.yml

Lines changed: 441 additions & 343 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 65 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
description: |
33
Monitors upstream dependencies for new releases and breaking changes.
4-
Runs daily to check tracked upstream projects. Creates GitHub issues
5-
when breaking changes are detected that affect this repository's code,
6-
configuration, or CI pipelines.
4+
Runs daily to check tracked upstream projects. A shell pre-check script
5+
detects version changes deterministically; the agent only runs when
6+
changes are found, dramatically reducing token consumption on quiet days.
77
88
on:
99
schedule:
@@ -30,7 +30,7 @@ tools:
3030
web-fetch:
3131
bash: [ ":*" ]
3232

33-
timeout-minutes: 30
33+
timeout-minutes: 20
3434
---
3535

3636
# Upstream Dependency Monitor
@@ -43,94 +43,100 @@ Your name is ${{ github.workflow }}. You are an **Upstream Dependency Monitor**
4343

4444
Detect upstream dependency releases that may break builds, deployments, or CI pipelines in this repository — before contributors hit the wall.
4545

46-
### Tracked Dependencies
46+
### Efficiency Rules (READ FIRST)
4747

48-
Read the file `docs/upstream-versions.md` to get the current version pins and file locations. That file is the **single source of truth** for what we track.
48+
You MUST follow these rules to minimize token usage:
4949

50-
If `docs/upstream-versions.md` does not exist or is empty, exit cleanly — there are no tracked dependencies yet.
50+
1. **Run the pre-check script as your very first action** — it handles all version checking deterministically
51+
2. **If no changes detected, stop immediately** — do not explore further
52+
3. **Never manually check dependency versions** — the script already did this
53+
4. **Batch all grep operations** into single commands using `\|` alternation
54+
5. **Limit all command output** with `| head -20` to avoid flooding context
55+
6. **Keep issue bodies concise** — bullet points, not paragraphs
5156

52-
### Your Workflow
57+
### Step 1: Run Pre-Check Script (MANDATORY FIRST STEP)
5358

54-
#### Step 1: Load Current Pins
59+
Download and run the deterministic pre-check script that checks all tracked dependencies for new releases.
5560

56-
Read `docs/upstream-versions.md` to understand:
57-
- Which version/SHA is currently pinned for each dependency
58-
- Which files contain those pins (Dockerfile, go.mod, helmfile, workflow YAML, etc.)
59-
- The upstream repository for each dependency
61+
> **Note**: The script is sourced from the org-owned `llm-d/llm-d-infra` repo's `main` branch.
62+
> Branch protection and required reviews guard against unauthorized changes.
63+
> Pinning to a commit SHA is impractical here because the script is updated in the same repo
64+
> and would require coordinated SHA updates across all consuming repos on every change.
6065
61-
#### Step 2: Check for New Releases
66+
```bash
67+
curl -sfL https://raw.githubusercontent.com/llm-d/llm-d-infra/main/scripts/check-upstream-releases.sh | bash || true
68+
```
6269

63-
For each tracked dependency:
70+
Then read the results:
6471

65-
1. Use the GitHub API via bash to check for new releases:
66-
```bash
67-
gh api repos/{owner}/{repo}/releases/latest --jq '.tag_name'
68-
```
72+
```bash
73+
cat /tmp/upstream-check-results.json
74+
```
6975

70-
2. For commit-SHA-pinned deps, check if the pinned commit is behind the latest tag:
71-
```bash
72-
gh api repos/{owner}/{repo}/compare/{pinned_sha}...HEAD --jq '.ahead_by'
73-
```
76+
**Decision point based on the JSON output:**
7477

75-
3. For PyPI packages, check the latest version:
76-
```bash
77-
curl -s https://pypi.org/pypi/{package}/json | jq -r '.info.version'
78-
```
78+
- If `"changed_count": 0` → Stop immediately. All dependencies are up to date. No further action needed.
79+
- If `"error"` is present at the top level → Stop and report the error. The script could not run properly.
80+
- If `"changed_count"` > 0 → Continue to Step 2 with **only** the dependencies listed in `"changes"`.
81+
82+
### Step 2: Check for Duplicate Issues
7983

80-
4. Compare with the version in `docs/upstream-versions.md`
84+
Before creating any issues, check if they already exist for the changed dependencies:
8185

82-
#### Step 3: Analyze Breaking Changes
86+
```bash
87+
gh issue list --state open --search 'label:"upstream-breaking-change" OR label:"upstream-update"' --json title,number --jq '.[].title'
88+
```
8389

84-
When a new release is detected, analyze it for breaking changes:
90+
If an open issue already covers a dependency's version bump (same dependency name and target version in the title), skip that dependency entirely.
8591

86-
1. **Fetch the changelog/release notes** using web-fetch on the release page
87-
2. **Check the diff between pinned version and latest** for:
88-
- Renamed CLI arguments, flags, or environment variables
89-
- Changed API signatures, function names, or class names
90-
- Modified configuration parameter names or formats
91-
- Helm chart `values.yaml` schema changes
92-
- Removed or renamed exported symbols
93-
- Protocol or wire format changes
94-
- Minimum version requirement bumps (Go, Python, Node, etc.)
92+
### Step 3: Analyze Breaking Changes (Changed Dependencies Only)
9593

96-
3. **Cross-reference against this repository's usage** by grepping:
94+
For each changed dependency from the JSON that does not already have an open issue:
95+
96+
1. **Fetch the release notes** using web-fetch on the `release_url` from the JSON output
97+
2. **Scan for breaking changes** — look for keywords: "BREAKING", "removed", "renamed", "deprecated", major version bumps
98+
3. **If potentially breaking, check impact on this repo:**
9799
```bash
98-
grep -r "old_name_or_flag" . --include="*.go" --include="*.py" --include="*.yaml" --include="*.yml" --include="*.md" --include="Dockerfile*" --include="*.toml"
100+
grep -rn "PATTERN1\|PATTERN2\|PATTERN3" . --include="*.go" --include="*.py" --include="*.yaml" --include="*.yml" --include="*.sh" --include="Dockerfile*" --include="*.toml" | head -20
99101
```
100-
101-
4. **Classify the impact**:
102+
4. **Classify the impact:**
102103
- **CRITICAL**: Breaks builds or deployments immediately
103104
- **HIGH**: Breaks specific configurations or workflows
104105
- **MEDIUM**: May affect optional features or future upgrades
105106
- **LOW**: Informational — new version available, no breaking changes detected
106107

107-
#### Step 4: Report Findings
108+
### Step 4: Create Issues
109+
110+
Create GitHub issues for changed dependencies using the `create_issue` safe output.
108111

109112
**For breaking changes (CRITICAL/HIGH):**
110-
Create a GitHub issue with:
111113
- Title: `[Upstream Breaking Change] {project} {old_version} → {new_version}`
112-
- Body: what changed, which files are affected (with paths and line numbers), suggested fixes, links to upstream release notes
113114
- Labels: `upstream-breaking-change`, `critical` or `high`
114115

115-
**For non-breaking new releases (MEDIUM/LOW):**
116-
Create a GitHub issue with:
116+
**For non-breaking updates (MEDIUM/LOW):**
117117
- Title: `[Upstream Update] {project} {old_version} → {new_version}`
118118
- Labels: `upstream-update`, `medium` or `low`
119119

120-
**If no new releases detected:** Exit cleanly, no issues created.
120+
**Issue body should include (keep concise):**
121+
- Current pin vs new version
122+
- File locations that need updating (from the pre-check JSON)
123+
- Breaking changes summary (2-3 bullet points max)
124+
- Link to upstream release notes
125+
- Suggested action
126+
127+
If multiple dependencies changed, combine them into a single issue titled:
128+
`[Upstream Updates] {count} dependencies have new releases`
121129

122130
### Important Rules
123131

124-
1. **Never create duplicate issues.** Search existing open issues first:
125-
```bash
126-
gh issue list --label upstream-breaking-change --state open --search "{project}"
127-
gh issue list --label upstream-update --state open --search "{project}"
128-
```
129-
2. **Be specific about what breaks.** Map changes to specific files in the repo.
132+
1. **Never create duplicate issues.** Always check existing open issues first.
133+
2. **Be specific about what breaks.** Include file paths and line numbers.
130134
3. **Always include the upstream release URL** in the issue body.
131-
4. **Watch for transitive breaks** — e.g., a Go dependency bump that requires a newer Go version.
135+
4. **Watch for transitive breaks** — e.g., a dependency bump that requires a newer Go or Python version.
132136

133137
### Exit Conditions
134-
- Exit if `docs/upstream-versions.md` does not exist or is empty
135-
- Exit if no upstream projects have new releases since last check
136-
- Exit if GitHub API rate limits are exceeded (log a warning)
138+
139+
- Exit immediately if the pre-check script reports 0 changes
140+
- Exit if `docs/upstream-versions.md` does not exist (script will report this as an error)
141+
- Exit if the pre-check script encounters a rate limit error
142+
- Exit if all changed dependencies already have open issues

0 commit comments

Comments
 (0)