Skip to content

fix(infra): skip Cosmos offer reads on serverless accounts - #906

Merged
omegent-app[bot] merged 1 commit into
mainfrom
fix/cosmos-serverless-create
Sep 24, 2026
Merged

omegent-app[bot] merged 1 commit into
mainfrom
fix/cosmos-serverless-create

Conversation

@omegent-app

@omegent-app omegent-app Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Why

Scanner EasyLife demo Dies on API startup: createContainerIfNotExists calls db.readOffer() when creating a missing container with autoscale. Serverless Cosmos rejects offer read/replace with 400.

What

If autoscale is configured and the container is missing, keep applying maxThroughput on provisioned databases without shared throughput. When readOffer (or the create) returns the serverless 400, create the container without throughput settings.

How

isServerlessOfferError matches Cosmos 400 "not supported for serverless". The existing shared-offer / autoscale path is unchanged.

Remarks

Fixes MACS-SCANNER-API-PD (scanner runtime). Scanner consumes this after the next @effect-app/infra beta.

opened by Sentry in chat thread Discord · Discord · T3


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

createContainerIfNotExists still applies autoscale on provisioned databases.
A 400 "offers is not supported for serverless" falls back to create without
throughput so missing containers can be created on serverless accounts.

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
@omegent-app
omegent-app Bot marked this pull request as ready for review September 24, 2026 06:44
@pkg-pr-new

pkg-pr-new Bot commented Sep 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

@effect-app/cli

npm i https://pkg.pr.new/effect-app/libs/@effect-app/cli@906

effect-app

npm i https://pkg.pr.new/effect-app/libs/effect-app@906

@effect-app/eslint-codegen-model

npm i https://pkg.pr.new/effect-app/libs/@effect-app/eslint-codegen-model@906

@effect-app/eslint-shared-config

npm i https://pkg.pr.new/effect-app/libs/@effect-app/eslint-shared-config@906

@effect-app/infra

npm i https://pkg.pr.new/effect-app/libs/@effect-app/infra@906

@effect-app/vue

npm i https://pkg.pr.new/effect-app/libs/@effect-app/vue@906

@effect-app/vue-components

npm i https://pkg.pr.new/effect-app/libs/@effect-app/vue-components@906

commit: 6f18da8

@omegent-app
omegent-app Bot merged commit 65835a6 into main Sep 24, 2026
6 checks passed
@omegent-app
omegent-app Bot deleted the fix/cosmos-serverless-create branch September 24, 2026 07:20
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.

0 participants