Skip to content

Pass runConfig from apphosting.yaml during local builds - #10973

Open
falahat wants to merge 1 commit into
mainfrom
fix-local-build-runconfig
Open

Pass runConfig from apphosting.yaml during local builds#10973
falahat wants to merge 1 commit into
mainfrom
fix-local-build-runconfig

Conversation

@falahat

@falahat falahat commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Description

#10956

For local builds, we were not correctly passing the CPU/Memory Overrides

Scenarios Tested

Sample Commands

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for runConfig in App Hosting configurations, allowing settings like CPU, memory, concurrency, and instance limits to be parsed from apphosting.yaml, merged, and passed through local builds to rollout orchestration. Feedback on the changes suggests removing the index signature [key: string]: unknown; from ApiRunConfig to enforce strict typing in accordance with the style guide, and explicitly copying known fields in toApiRunConfig instead of using object rest spread to avoid sending unsupported fields to the GCP API.

Comment thread src/gcp/apphosting.ts
Comment on lines +138 to +145
export interface ApiRunConfig {
cpu?: number;
memoryMib?: number;
concurrency?: number;
minInstances?: number;
maxInstances?: number;
[key: string]: unknown;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The index signature [key: string]: unknown; weakens type safety by allowing arbitrary properties to be added to ApiRunConfig without compiler errors. Since all valid fields are already explicitly defined, we should remove the index signature to enforce strict typing and adhere to the repository style guide.

export interface ApiRunConfig {
  cpu?: number;
  memoryMib?: number;
  concurrency?: number;
  minInstances?: number;
  maxInstances?: number;
}
References
  1. Never use any or unknown as an escape hatch. Define proper interfaces/types or use type guards. (link)

Comment thread src/apphosting/yaml.ts
Comment thread src/deploy/apphosting/prepare.spec.ts Outdated
@falahat
falahat force-pushed the fix-local-build-runconfig branch from f97bde9 to 0a6c7a5 Compare August 24, 2026 16: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.

2 participants