Skip to content

feat(console): build preview Console SDKs from the pinned release's spec - #14441

Merged
ChiragAgg5k merged 4 commits into
mainfrom
feat/console-preview-sdk-flow
Oct 14, 2026
Merged

ChiragAgg5k merged 4 commits into
mainfrom
feat/console-preview-sdk-flow

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

What

A PR can now ship an API change and the Console UI for it together, built against a Console SDK that has the change.

  • bun run sdk:preview (in apps/console) generates this branch's console spec and lays it over the spec.json the pinned @appwrite.io/console ships (feat(sdks): ship the generated spec inside the Console web SDK #14435, first released in 19.0.0). It then generates and builds the Console web SDK and installs it into node_modules. --no-install only builds it. bun install --force restores the pinned SDK.
  • SDK Preview workflow: a new console job runs on PRs that change both apps/console and the API (app/, src/, packages/, composer.lock), and on manual runs with platform: console. It publishes the same build to pkg.pr.new and comments the URL. The job needs only PHP with swoole, with no Docker stack.
  • The Console pins that pkg.pr.new URL until a Console SDK release carries the change. lint-sdk-pins already allows pkg.pr.new and still blocks pkg.vc Cloud-branch builds. Its note now explains why.
  • apps/console/AGENTS.md documents the flow.

Contributor flow

  1. Change the API and the Console in one branch.
  2. bun run sdk:preview gives an SDK with the new endpoint locally. bun run check and bun run dev work against it.
  3. Push. The SDK Preview job publishes the build and comments a https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@<pr> URL, which follows the latest push.
  4. Pin the build for a specific commit, https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@<sha>, in apps/console/package.json so Console CI builds against it.
  5. When Cloud releases a Console SDK with the change, pin that version.

Verification

Run locally against the pinned @appwrite.io/[email protected] (#14449):

  • sdk:preview builds the SDK in about 30s.
  • With the preview SDK installed, bun run lint:types reports the same 1,824 known errors as main, none new. bun install --force restores the pinned SDK.
  • Merged with the community PR feat(auth): add configurable OAuth trust-provider-email account-linking policy #13680 (OAuth trusted email providers) and a Console card that uses it, against 19.0.0:
    • Against 19.0.0: 4 errors (updateOauthTrustProviderEmailPolicy and ProjectPolicyId.Oauthtrustprovideremail missing).
    • Against the preview: 0 new errors.
  • Spec generation runs on the host with only the swoole extension loaded (php -n -d extension=swoole.so).
  • Prettier, lint:sdk-pins and actionlint are clean, apart from the existing parallel: step that actionlint flags.
  • On CI, the job builds the SDK, publishes it to pkg.pr.new and comments the install URL. Both the @14441 and @151a7be URLs serve the build.
  • Publishing passes --no-compact. @appwrite.io/console lists appwrite/sdk-for-console as its npm repository, so compact pkg.pr.new/@appwrite.io/console@<sha> URLs return 404. The per-SDK preview job gets the same flag.

Closes #14443

@github-actions

Copy link
Copy Markdown

Security rules

No new WARNING or ERROR findings from security rules.

19 existing findings tracked in .semgrep/baseline.json
  • php.appwrite.guest-write-without-abuse-limit (12)
  • php.appwrite.secret-compare-timing (5)
  • php.appwrite.weak-secret-env-default (2)

Posted by Checks / Rules. Re-runs update this comment in place. Rule details and baseline: .semgrep/README.md.

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → feat/console-preview-sdk-flow (after).

Metric Before After Change
🚀 Requests/sec 219.52 221.06 ⚪ +0.7%
⏱️ Latency P50 78.93 ms 79.09 ms ⚪ +0.2%
⏱️ Latency P95 184.96 ms 182.76 ms ⚪ -1.2%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 79.09 182.76 13,680 221.06 -2.2
Account 144.11 258.52 720 12.14 -13.05
TablesDB 75.83 129.09 7,440 121.72 -6.89
Storage 74.58 158.4 3,600 61.19 -13.5
Functions 118.77 234.79 1,920 33.34 +15.13

Top API waits (after)

API request Max wait (ms)
functions.variables.update 401.68
account.prefs.update 393.49
functions.create 368.24
account.name.update 366.84
functions.delete 366.17

@appwrite.io/console is generated from the Cloud spec, so a PR that adds an endpoint and the Console UI for it cannot type-check until Cloud releases the next SDK. Since 19.0.0 the package ships the spec it was built from, so `bun run sdk:preview` lays this branch's console spec over it and builds an SDK that keeps every Cloud API and gains the branch's changes. The SDK Preview workflow publishes that build to pkg.pr.new on PRs that change both the Console and the API, for the Console to pin until a release carries the change.
@ChiragAgg5k
ChiragAgg5k force-pushed the feat/console-preview-sdk-flow branch from 59c5d5d to 257e7a2 Compare October 14, 2026 11:32
@pkg-pr-new

pkg-pr-new Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@14441

commit: ec26f76

@ChiragAgg5k
ChiragAgg5k marked this pull request as ready for review October 14, 2026 12:15
@luxor-code-review

luxor-code-review Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review complete. 🟡 2 medium

💬 Inline comments (2)

  • 🟡 paths filter omits packages/** and composer.lock counted as API changes — sdk-preview.yml:8
  • 🟡 Grant pull-requests: write to the console preview job — sdk-preview.yml:106

This PR wires an automated Console SDK preview into CI: a new workflow builds the console app, merges an OpenAPI overlay produced from the changed repo onto the pinned base spec, and publishes the result to pkg-pr.new with an update comment on the PR. Supporting changes add a sdk-preview script entry and a lint rule change to the console tooling, and document the new flow in apps/console/AGENTS.md.

Files Change
.github/workflows/sdk-preview.yml New workflow that detects Console + API changes, builds the preview spec, and publishes the Console SDK preview via pkg-pr.new
apps/console/scripts/sdk-preview.ts Console-side script that merges the branch OpenAPI overlay into the base spec and runs the SDK generator
apps/console/scripts/lint-sdk-pins.ts Allows pkg.pr.new pins for console packages in the pin lint rule
apps/console/package.json Adds the sdk-preview script entry
apps/console/AGENTS.md Documents the SDK preview workflow and usage

Reviewed commit: ec26f76

@ghost

ghost commented Oct 14, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

Adds a local command to generate a preview Console SDK by overlaying this branch’s console spec on the pinned SDK’s spec. Extends the SDK Preview workflow to build and publish that SDK for qualifying PRs or manual runs, and documents how contributors can use and pin the preview.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 5
File Change
.github/workflows/sdk-preview.yml Adds PR change detection and a Console SDK preview build/publish job, plus the non-compact publishing option.
apps/console/AGENTS.md Documents the local preview SDK and contributor pinning flow.
apps/console/package.json Adds the sdk:preview command.
apps/console/scripts/lint-sdk-pins.ts Explains why pkg.pr.new SDK pins are permitted while pkg.vc pins remain blocked.
apps/console/scripts/sdk-preview.ts Generates the branch spec, merges it with the pinned SDK spec, builds the preview SDK, and optionally installs it.

Reviewed ec26f76 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Tier A · Looks good to merge. Summary

Comment thread apps/console/scripts/sdk-preview.ts Resolved

@luxor-code-review luxor-code-review Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds a GitHub workflow job that builds and publishes a pkg-pr.new preview of the Console SDK from merged specs, plus a lint rule and console script/tooling updates to support it.

Key findings

  • 🟡 paths filter omits packages/** and composer.lock counted as API changes — sdk-preview.yml:8
  • 🟡 Grant pull-requests: write to the console preview job — sdk-preview.yml:106

Comment thread .github/workflows/sdk-preview.yml Resolved
Comment thread .github/workflows/sdk-preview.yml Resolved
@ChiragAgg5k
ChiragAgg5k merged commit 15ebe78 into main Oct 14, 2026
55 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the feat/console-preview-sdk-flow branch October 14, 2026 12:45
abnegate added a commit that referenced this pull request Oct 14, 2026
Brings in the 23 commits main gained since the last sync: the MQTT subscribe
gate that refuses a user topic whose row name is not the reserved filter and
addresses topics by id so lookups hit the primary key (#14460), the console
preview SDK flow (#14441) and the SDK docs audit (#14482).

MqttServerTest conflicted where the branch had added the reconnect regression
tests (blocked user, deleted session) next to main's rewrite of the
subscription tests. Both are kept: the branch's reconnect tests, then main's
membership-gated subscription tests addressed by topic id.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build preview Console SDKs from the pinned release's spec

1 participant