Skip to content

Commit e4ca92c

Browse files
authored
Merge pull request #331 from apollographql/release/0.7.5
release: v0.7.5
2 parents 2de84bf + 4e1115a commit e4ca92c

30 files changed

+1730
-61
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
* @apollographql/graph-tooling
2-
docs @apollographql/docs @apollographql/graph-tooling
1+
* @apollographql/ai-runtime
2+
docs @apollographql/docs @apollographql/ai-runtime

.github/workflows/canary-release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ on:
55
# https://github.com/orgs/community/discussions/25615
66
tags-ignore:
77
- "**"
8+
paths-ignore:
9+
- '.github/**'
10+
- '.cargo/**'
11+
- '.direnv/**'
12+
- '.vscode/**'
13+
- 'docs/**'
14+
- 'Cargo.*'
15+
- 'crates/**/Cargo.*'
16+
- '*.md'
817
branches:
918
- develop
1019
workflow_dispatch:
@@ -30,8 +39,13 @@ jobs:
3039
DATE=$(date -u +%Y%m%dT%H%M%SZ)
3140
echo "version=canary-${DATE}-${SHORT_SHA}" >> "$GITHUB_OUTPUT"
3241
33-
release_container:
42+
release_canary_container:
3443
needs: compute_canary_version
44+
permissions:
45+
contents: read
46+
packages: write
47+
attestations: write
48+
id-token: write
3549
uses: ./.github/workflows/release-container.yml
3650
with:
3751
version: ${{ needs.compute_canary_version.outputs.version }}

.github/workflows/prep-release.yml

Lines changed: 91 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,96 @@ jobs:
161161
sys.exit(1)
162162
PY
163163

164-
- name: Push changes to release branch
165-
id: push_changes
164+
- name: Commit version bumps
165+
id: commit_version_bumps
166166
run: |
167-
set -e
167+
set -euo pipefail
168168
git add -A || true
169-
git commit -m "Bumping to version ${{ steps.bump.outputs.new_version }}" || true
170-
git push origin HEAD
169+
git commit -m "chore(release): bumping to version ${{ steps.bump.outputs.new_version }}" || echo "No version bump changes to commit"
170+
171+
- name: Update changelog via xtask
172+
run: cargo xtask changeset changelog ${{ steps.bump.outputs.new_version }}
173+
174+
- name: Extract changelog section
175+
id: changelog
176+
shell: bash
177+
env:
178+
NEW: ${{ steps.bump.outputs.new_version }}
179+
OLD: ${{ steps.meta.outputs.current_version }}
180+
run: |
181+
set -euo pipefail
182+
# Write the extracted section to a file and also expose it as a multiline output "body"
183+
python3 - <<'PY' > CHANGELOG_SECTION.md
184+
try:
185+
import os, re, sys, pathlib
186+
new = os.environ["NEW"]
187+
old = os.environ["OLD"]
188+
189+
p = pathlib.Path("CHANGELOG.md")
190+
if not p.exists():
191+
raise FileNotFoundError("CHANGELOG.md not found at repo root")
192+
text = p.read_text(encoding="utf-8")
193+
194+
# Find header for the new version
195+
start = re.search(rf'(?m)^# \[{re.escape(new)}\]', text)
196+
if not start:
197+
print(f"::error::Could not find changelog entry for {new}", file=sys.stderr)
198+
sys.exit(1)
199+
200+
# Prefer the *specific* previous version header if present; otherwise, next '# ['; else, EOF
201+
segment = text[start.start():]
202+
end_old = re.search(rf'(?m)^# \[{re.escape(old)}\]', segment)
203+
if end_old:
204+
segment = segment[:end_old.start()]
205+
else:
206+
nxt = re.search(r'(?m)^# \[', segment[len('# [' + new + ']'):])
207+
if nxt:
208+
# adjust to absolute end
209+
segment = segment[: (len('# [' + new + ']') + nxt.start())]
210+
211+
segment = segment.rstrip() + "\n"
212+
print(segment)
213+
except Exception:
214+
import traceback
215+
traceback.print_exc()
216+
sys.exit(1)
217+
PY
218+
219+
{
220+
echo 'body<<EOF'
221+
cat CHANGELOG_SECTION.md
222+
echo 'EOF'
223+
} >> "$GITHUB_OUTPUT"
224+
225+
- name: Commit and push changelog updates
226+
shell: bash
227+
run: |
228+
set -euo pipefail
229+
git add -A || true
230+
git commit -m "chore(release): changelog for ${{ steps.bump.outputs.new_version }}" || echo "No changelog updates to commit"
231+
git push origin HEAD
232+
233+
- name: Open/Update draft PR to main
234+
env:
235+
HEAD: ${{ github.ref_name }}
236+
TITLE: Releasing ${{ steps.bump.outputs.new_version }}
237+
shell: bash
238+
run: |
239+
set -euo pipefail
240+
# Try to create; if it already exists, update it
241+
if ! gh pr create \
242+
--base main \
243+
--head "$HEAD" \
244+
--title "$TITLE" \
245+
--draft \
246+
--body-file CHANGELOG_SECTION.md \
247+
--label release
248+
then
249+
num=$(gh pr list --head "$HEAD" --base main --state open --json number -q '.[0].number' || true)
250+
if [[ -n "$num" ]]; then
251+
gh pr edit "$num" --title "$TITLE" --body-file CHANGELOG_SECTION.md --add-label release
252+
else
253+
echo "::error::Failed to create or find PR from $HEAD to main"
254+
exit 1
255+
fi
256+
fi

.github/workflows/release-container.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ jobs:
103103
shell: bash
104104
run: |
105105
docker manifest push $FQDN:$VERSION
106-
107-
# Only push the latest tag if this isn't a release candidate (ends with
108-
# `rc.#`.
109-
if [[ ! "$VERSION" =~ -rc\.[0-9]+$ ]]; then
106+
107+
# push :latest only if version DOES NOT start with canary OR end with -rc.<digits>
108+
if [[ ! "$VERSION" =~ (^canary|-rc\.[0-9]+$) ]]; then
110109
docker manifest push $FQDN:latest
111110
fi

.github/workflows/sync-develop.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,14 @@ jobs:
115115
--title "${{ steps.meta.outputs.sync_title }}" \
116116
--body "${{ steps.meta.outputs.sync_body }} (created via gh CLI)" \
117117
--label back-merge \
118+
--label skip-changeset \
118119
--label automation
119120
120-
# Emit outputs for later steps
121-
gh pr view --base "${BASE_BRANCH}" --head "${{ steps.meta.outputs.sync_branch }}" \
122-
--json number,url | jq -r '"pr_number=\(.number)\npr_url=\(.url)"' >> "$GITHUB_OUTPUT"
121+
# Fetch the newly created PR number, then its URL so that we display in a PR comment
122+
num=$(gh pr list --base "${BASE_BRANCH}" --head "${{ steps.meta.outputs.sync_branch }}" --state open --json number --jq '.[0].number')
123+
url=$(gh pr view "$num" --json url --jq .url)
124+
echo "pr_number=$num" >> "$GITHUB_OUTPUT"
125+
echo "pr_url=$url" >> "$GITHUB_OUTPUT"
123126
124127
# If the merge hit conflicts, open a DIRECT PR: HEAD_BRANCH -> BASE_BRANCH so conflicts can be resolved prior to merge
125128
- name: Open conflict PR
@@ -155,10 +158,14 @@ jobs:
155158
--body "${{ steps.meta.outputs.conflict_body }}" \
156159
--label back-merge \
157160
--label automation \
161+
--label skip-changeset \
158162
--label conflicts
159163
160-
gh pr view --base "${BASE_BRANCH}" --head "${{ steps.meta.outputs.conflict_branch }}" \
161-
--json number,url | jq -r '"pr_number=\(.number)\npr_url=\(.url)"' >> "$GITHUB_OUTPUT"
164+
# Fetch the newly created conflict PR number, then its URL so that we display in a PR comment
165+
num=$(gh pr list --base "${BASE_BRANCH}" --head "${{ steps.meta.outputs.conflict_branch }}" --state open --json number --jq '.[0].number')
166+
url=$(gh pr view "$num" --json url --jq .url)
167+
echo "pr_number=$num" >> "$GITHUB_OUTPUT"
168+
echo "pr_url=$url" >> "$GITHUB_OUTPUT"
162169
163170
# Comment back on the ORIGINAL merged PR with a link to the sync PR
164171
- name: Comment on source PR with sync PR link
@@ -169,22 +176,22 @@ jobs:
169176
const owner = context.repo.owner;
170177
const repo = context.repo.repo;
171178
const issue_number = Number(process.env.SOURCE_PR);
172-
179+
173180
const hadConflicts = '${{ steps.prep.outputs.merge_status }}' !== '0';
174181
const syncUrl = '${{ steps.sync_pr.outputs.pr_url || steps.conflict_pr.outputs.pr_url }}';
175182
const head = process.env.HEAD_BRANCH;
176183
const base = process.env.BASE_BRANCH;
177-
184+
178185
const status = hadConflicts ? 'conflicts ❗' : 'clean ✅';
179186
const note = hadConflicts
180187
? 'Opened from a copy of main so conflicts can be resolved safely.'
181188
: 'Opened from a sync branch created off develop.';
182-
189+
183190
const body = [
184191
`Opened sync PR **${head} → ${base}**: ${syncUrl}`,
185192
``,
186193
`Merge status: **${status}**`,
187194
note
188195
].join('\n');
189-
196+
190197
await github.rest.issues.createComment({ owner, repo, issue_number, body });

.github/workflows/verify-changeset.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Verify Changeset
22
on:
33
pull_request:
4+
branches-ignore:
5+
- main
6+
- release/**
7+
- conflict/*
8+
- sync/*
49
paths-ignore:
510
- '.github/**'
611
- '.cargo/**'
@@ -14,7 +19,7 @@ on:
1419

1520
jobs:
1621
verify-changeset:
17-
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changeset') }}
22+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changeset') && !startsWith(github.head_ref, 'sync/') && !startsWith(github.head_ref, 'conflict/') }}
1823
name: Verify
1924
runs-on: ubuntu-24.04
2025
permissions:

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,44 @@ All notable changes to this project will be documented in this file.
44

55
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
# [0.7.5] - 2025-09-03
8+
9+
## 🐛 Fixes
10+
11+
### fix: Validate ExecutableDocument in validate tool - @swcollard PR #329
12+
13+
Contains fixes for https://github.com/apollographql/apollo-mcp-server/issues/327
14+
15+
The validate tool was parsing the operation passed in to it against the schema but it wasn't performing the validate function on the ExecutableDocument returned by the Parser. This led to cases where missing required arguments were not caught by the Tool.
16+
17+
This change also updates the input schema to the execute tool to make it more clear to the LLM that it needs to provide a valid JSON object
18+
19+
## 🛠 Maintenance
20+
21+
### test: adding a basic manual e2e test for mcp server - @alocay PR #320
22+
23+
Adding some basic e2e tests using [mcp-server-tester](https://github.com/steviec/mcp-server-tester). Currently, the tool does not always exit (ctrl+c is sometimes needed) so this should be run manually.
24+
25+
### How to run tests?
26+
Added a script `run_tests.sh` (may need to run `chmod +x` to run it) to run tests. Basic usage found via `./run_tests.sh -h`. The script does the following:
27+
28+
1. Builds test/config yaml paths and verifies the files exist.
29+
2. Checks if release `apollo-mcp-server` binary exists. If not, it builds the binary via `cargo build --release`.
30+
3. Reads in the template file (used by `mcp-server-tester`) and replaces all `<test-dir>` placeholders with the test directory value. Generates this test server config file and places it in a temp location.
31+
4. Invokes the `mcp-server-tester` via `npx`.
32+
5. On script exit the generated config is cleaned up.
33+
34+
### Example run:
35+
To run the tests for `local-operations` simply run `./run_tests.sh local-operations`
36+
37+
### Update snapshot format - @DaleSeo PR #313
38+
39+
Updates all inline snapshots in the codebase to ensure they are consistent with the latest insta format.
40+
41+
### Hardcoded version strings in tests - @DaleSeo PR #305
42+
43+
The GraphQL tests have hardcoded version strings that we need to update manually each time we release a new version. Since this isn't included in the release checklist, it's easy to miss it and only notice the test failures later.
44+
745
# [0.7.4] - 2025-08-27
846

947
## 🐛 Fixes

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ members = [
88

99
[workspace.package]
1010
authors = ["Apollo <[email protected]>"]
11-
version = "0.7.4"
11+
version = "0.7.5"
1212

1313
[workspace.dependencies]
1414
apollo-compiler = "1.27.0"

0 commit comments

Comments
 (0)