Skip to content

Fix site specification SDK package#3091

Open
TorstenDittmann wants to merge 5 commits into
mainfrom
fix-site-build-runtime-spec-limits
Open

Fix site specification SDK package#3091
TorstenDittmann wants to merge 5 commits into
mainfrom
fix-site-build-runtime-spec-limits

Conversation

@TorstenDittmann

@TorstenDittmann TorstenDittmann commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What

  • Updates @appwrite.io/console to the SDK artifact from 16caf4e
  • Calls listSpecifications({ type: "builds" }) for build specification options
  • Calls listSpecifications({ type: "runtimes" }) for runtime specification options
  • Keeps build and runtime specification fallbacks separate for sites and functions
  • Removes reliance on enabledForBuilds; enabled now applies to the requested specification type

Testing

  • bun run check
  • bun run lint

@appwrite

appwrite Bot commented Jun 22, 2026

Copy link
Copy Markdown

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Custom domains work with both CNAME for subdomains and NS records for apex domains

@greptile-apps

greptile-apps Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the @appwrite.io/console SDK to commit 16caf4e and migrates all listSpecifications() calls to pass an explicit type parameter ("builds" or "runtimes"), splitting the previously shared spec list into two separate lists so build and runtime dropdowns are populated independently.

  • SDK bump + API call split: Both the functions layout and the sites settings page now issue two parallel listSpecifications calls (one per type) instead of one, and thread the results through as buildSpecificationsList / runtimeSpecificationsList to all child components and forms.
  • Component prop rename: UpdateResourceLimits and UpdateBuildSettings replace the single specs prop with buildSpecs + runtimeSpecs, and each dropdown is now driven by its own filtered option list.
  • Fallback logic tightened for sites: +page.ts for sites adds a buildEnabledSpecs.length && guard before overwriting the current spec with a fallback, preventing the spec from being silently cleared when the enabled list is empty.

Confidence Score: 4/5

Safe to merge after addressing the missing empty-list guard in the functions page load.

The sites path received a defensive guard that prevents the current spec from being cleared when the enabled list is empty, but the equivalent functions path was not updated the same way. In self-hosted mode the layout always resolves to an empty spec list, so on every function settings page load fn.buildSpecification and fn.runtimeSpecification are overwritten to undefined.

src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/+page.ts — the fallback guard is missing for both build and runtime specifications.

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/+page.ts Splits spec lookup into build/runtime lists correctly, but the fallback guard added to the sites equivalent is missing, so fn.buildSpecification and fn.runtimeSpecification are silently set to undefined whenever either enabled-spec list is empty (e.g., self-hosted mode)
src/routes/(console)/project-[region]-[project]/functions/+layout.ts Correctly splits the single listSpecifications() call into separate build/runtime calls and returns both lists under distinct keys
src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/+page.ts Migrates to separate build/runtime listSpecifications() calls and adds the length guard before overwriting site spec defaults — logic is correct
src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/updateBuildSettings.svelte Splits specs prop into buildSpecs/runtimeSpecs, adds length guard on framework change, and uses the ?? site.buildSpecification fallback on submit to avoid clearing the spec when no enabled options exist
src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/updateResourceLimits.svelte Correctly renames specs to buildSpecs/runtimeSpecs and generates separate option lists; disabled state uses total option count rather than enabled option count, inconsistent with the sites version
src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/updateResourceLimits.svelte Renames specs to buildSpecs/runtimeSpecs, correctly sets disabled based on enabled-spec count for each dropdown independently
src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/+page.svelte Passes the renamed buildSpecs and runtimeSpecs props to UpdateResourceLimits correctly
src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/+page.svelte Forwards the renamed buildSpecificationsList/runtimeSpecificationsList to both UpdateBuildSettings and UpdateResourceLimits correctly

Reviews (4): Last reviewed commit: "fix: pass specification type to SDK" | Re-trigger Greptile

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.

1 participant