-
Notifications
You must be signed in to change notification settings - Fork 0
chore: resync the production spec and document the two generators #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1aea80e
6042dc9
6b7f458
e3a98f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| '@runpod/typescript-api-sdk': minor | ||
| --- | ||
|
|
||
| Resync the vendored production spec and regenerate the types. Adds cursor | ||
| pagination on the list endpoints (`cursor` and `limit` query parameters, and a | ||
| `pagination` block carrying `nextCursor` and `hasNextPage` on the response) and | ||
| the account-secrets paths. Both are additive upstream, so existing calls keep | ||
| their current types. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,25 @@ jobs: | |
| - run: pnpm test | ||
| - run: pnpm test:package | ||
| - run: pnpm test:examples | ||
| # The update PR carries its own version bump and changelog, so merging it | ||
| # releases. Main's pending changesets are consumed into the same version. | ||
| - name: Version the spec update | ||
| env: | ||
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
| run: | | ||
| if git diff --quiet -- spec/openapi.yaml src/generated/schema.ts; then | ||
| echo 'No spec change; nothing to version.' | ||
| exit 0 | ||
| fi | ||
| cat > .changeset/production-spec-update.md <<EOF | ||
| --- | ||
| '@runpod/typescript-api-sdk': minor | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking, design note. This replaces "classify the bump explicitly" with a fixed The escape hatch already exists: land a |
||
| --- | ||
|
|
||
| Refresh the vendored production spec as of $(date -u +%Y-%m-%d) and | ||
| regenerate the types. Validation run: $RUN_URL | ||
| EOF | ||
| pnpm changeset:version | ||
| # Run even with no diff so the action can close a superseded update PR. | ||
| - name: Create or update the spec review PR | ||
| id: update-pr | ||
|
|
@@ -53,6 +72,10 @@ jobs: | |
| add-paths: | | ||
| spec/openapi.yaml | ||
| src/generated/schema.ts | ||
| .changeset | ||
| package.json | ||
| CHANGELOG.md | ||
| pnpm-lock.yaml | ||
| commit-message: 'chore(spec): refresh production API contract' | ||
| title: 'chore(spec): review production API contract update' | ||
| body: | | ||
|
|
@@ -67,11 +90,12 @@ jobs: | |
| Check those results before merging. | ||
|
|
||
| Review removed or changed operations, request/response types, and compatibility. | ||
| Classify the eventual version bump explicitly; a spec diff is not necessarily a patch. | ||
| This PR bumps the version as a minor release and writes the changelog. | ||
| **Merging it publishes that version to npm** and creates the tag and GitHub release. | ||
| This branch is regenerated from the default branch: put durable fixes there, | ||
| rather than editing the bot branch. | ||
|
|
||
| No automatic merge, version bump, tag, GitHub release, or npm publication. | ||
| No automatic merge. | ||
| - name: Run the full runtime matrix on the generated branch | ||
| if: steps.update-pr.outputs.pull-request-number != '' && steps.update-pr.outputs.pull-request-operation != 'closed' | ||
| env: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the one I'd fix before relying on the new flow.
version.ymlonly runs theeligibilityandpublishjobs whenhas_changesets == 'false'. That holds ifmainhad nothing pending when this branch was last regenerated. But the branch is only refreshed once a day, so there's a window of up to 24 hours where a changeset merges tomainafter the 09:23 UTC run and before someone merges the spec PR.In that case the merge commit has
package.jsonat 0.2.0, a## 0.2.0changelog entry, and one unconsumed changeset.changesets/actionreportshasChangesets: true,eligibilityis skipped, nothing publishes, and a new Version SDK PR opens at 0.3.0. So 0.2.0 exists in the changelog but never reaches npm, and the PR body's "merging it publishes" is wrong for that merge with no signal beyond a skipped job. (The existingchangeset-release/mainflow doesn't have this problem in practice because the action re-pushes that branch on every push tomain.)Suggested fix: drop the
has_changesets == 'false'condition on theeligibilityjob inversion.yml.release.mjs planalready requires a merged PR from a release branch whose merge commit is exactly this SHA, so evaluating it on every push tomainis safe, and in the race case it publishes 0.2.0 while the version job opens the 0.3.0 PR in parallel. Happy for that to be a follow-up if you'd rather keep this PR to what it is.