Conversation
There was a problem hiding this comment.
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.
…ploy_effective_config
|
I tested this manually successfully |
|
/gemini review |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
| config: localBuild?.buildConfig, | |
| config: localBuild ? (({ runCommand, env, ...rest }) => rest)(localBuild.buildConfig || {}) : undefined, |
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