Skip to content

adapt to new effective config api fields#10312

Open
falahat wants to merge 3 commits intomainfrom
zip_deploy_effective_config
Open

adapt to new effective config api fields#10312
falahat wants to merge 3 commits intomainfrom
zip_deploy_effective_config

Conversation

@falahat
Copy link
Copy Markdown
Contributor

@falahat falahat commented Apr 10, 2026

Description

Updates the Local Build API calls to use the new "Effective Config" fields. Basically, we just want to call the correct API fields now.

Scenarios Tested

  • Deploy a local build app, verify env vars, auto-init, etc all work
  • Deploy a source deploy app, verify env vars, auto-init, etc all work

Copy link
Copy Markdown
Contributor

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

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 introduces support for locally built sources in App Hosting deployments by updating the release logic to distinguish between locally built and archive-based sources. It adds the LocallyBuiltSource interface and populates build configurations such as runCommand and environment variables. A review comment identified a potential runtime crash due to missing optional chaining when accessing buildConfig properties and suggested refactoring the code to reduce redundant lookups and improve maintainability in accordance with the repository's style guide.

Comment thread src/deploy/apphosting/release.ts Outdated
@falahat
Copy link
Copy Markdown
Contributor Author

falahat commented Apr 15, 2026

I tested this manually successfully

@falahat falahat requested review from Yuangwang and annajowang April 15, 2026 18:50
@falahat falahat marked this pull request as ready for review April 15, 2026 18:50
@falahat falahat marked this pull request as draft April 15, 2026 18:52
@falahat falahat changed the base branch from main to next April 15, 2026 20:24
@falahat falahat changed the base branch from next to main April 15, 2026 20:31
@falahat
Copy link
Copy Markdown
Contributor Author

falahat commented Apr 15, 2026

/gemini review

Copy link
Copy Markdown
Contributor

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

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 introduces a locallyBuilt source type for App Hosting releases, refactoring the deployment logic to move runCommand and env configurations into this new structure. The changes include updates to the BuildSource interface, the rollout orchestration logic, and corresponding unit tests. A review comment identifies an opportunity to reduce data redundancy by excluding the runCommand and env fields from the config object, as they are now explicitly handled within the locallyBuilt source.

locallyBuiltSource: !!context.backendLocalBuilds[backendId],
},
},
config: localBuild?.buildConfig,
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 runCommand and env fields are now being sent within source.locallyBuilt (lines 55-56). Sending the entire localBuild.buildConfig here results in redundant data being sent to the API, as buildConfig also contains these fields. Consider excluding them from the config object to ensure the new "Effective Config" fields in source.locallyBuilt are the clear source of truth.

Suggested change
config: localBuild?.buildConfig,
config: localBuild ? (({ runCommand, env, ...rest }) => rest)(localBuild.buildConfig || {}) : undefined,

@falahat falahat marked this pull request as ready for review April 15, 2026 21:24
@falahat falahat requested a review from abhis3 April 15, 2026 21:24
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