Skip to content

Commit

Permalink
Include serving locality in create backend requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
taeold committed Dec 6, 2023
1 parent c2ea584 commit 5ce2747
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/gcp/frameworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ interface Codebase {
rootDirectory: string;
}

export type ServingLocality = "GLOBAL_ACCESS" | "REGIONAL_STRICT";

/** A Backend, the primary resource of Frameworks. */
export interface Backend {
name: string;
mode?: string;
codebase: Codebase;
servingLocality: ServingLocality;
labels: Record<string, string>;
createTime: string;
updateTime: string;
Expand Down
1 change: 1 addition & 0 deletions src/init/features/frameworks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export async function doSetup(setup: any, projectId: string): Promise<void> {

function toBackend(cloudBuildConnRepo: Repository): Omit<Backend, BackendOutputOnlyFields> {
return {
servingLocality: "GLOBAL_ACCESS",
codebase: {
repository: `${cloudBuildConnRepo.name}`,
rootDirectory: "/",
Expand Down
3 changes: 2 additions & 1 deletion src/test/init/frameworks/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ describe("operationsConverter", () => {
createTime: "0",
updateTime: "1",
};
const backendInput = {
const backendInput: Omit<gcp.Backend, gcp.BackendOutputOnlyFields> = {
servingLocality: "GLOBAL_ACCESS",
codebase: {
repository: cloudBuildConnRepo.name,
rootDirectory: "/",
Expand Down

0 comments on commit 5ce2747

Please sign in to comment.