Skip to content

Commit

Permalink
Fix breakage with app hosting beta API switch (#7896)
Browse files Browse the repository at this point in the history
* Fix breakage with app hosting beta API switch

* Changelog
  • Loading branch information
inlined authored Nov 4, 2024
1 parent 45991d4 commit ab05bb7
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Fixes an error creating a rollout with App Hosting in the beta API (#7896)
- Added support for Next.js 15. (#7588)
6 changes: 0 additions & 6 deletions src/apphosting/backend.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,6 @@ describe("apphosting setup functions", () => {
expect(updateTrafficStub).to.be.calledWith(projectId, location, backendId, {
rolloutPolicy: {
codebaseBranch: "main",
stages: [
{
progression: "IMMEDIATE",
targetPercent: 100,
},
],
},
});
});
Expand Down
6 changes: 0 additions & 6 deletions src/apphosting/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,6 @@ export async function setDefaultTrafficPolicy(
const traffic: DeepOmit<apphosting.Traffic, apphosting.TrafficOutputOnlyFields | "name"> = {
rolloutPolicy: {
codebaseBranch: codebaseBranch,
stages: [
{
progression: "IMMEDIATE",
targetPercent: 100,
},
],
},
};
const op = await apphosting.updateTraffic(projectId, location, backendId, traffic);
Expand Down
6 changes: 1 addition & 5 deletions src/gcp/apphosting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ export interface Rollout {
pauseTime: string;
error?: Error;
build: string;
stages?: RolloutStage[];
displayName?: string;
createTime: string;
updateTime: string;
Expand Down Expand Up @@ -193,9 +192,7 @@ export type TrafficOutputOnlyFields =
| "updateTime"
| "etag"
| "uid"
| "rolloutPolicy.disabledTime"
| "rolloutPolicy.stages.startTime"
| "rolloutPolicy.stages.endTime";
| "rolloutPolicy.disabledTime";

assertImplements<TrafficOutputOnlyFields, RecursiveKeyOf<Traffic>>();

Expand All @@ -213,7 +210,6 @@ export interface RolloutPolicy {
codebaseBranch?: string;
codebaseTagPattern?: string;
// end oneof trigger
stages?: RolloutStage[];
disabled?: boolean;

// TODO: This will be undefined if disabled is not true, right?
Expand Down

0 comments on commit ab05bb7

Please sign in to comment.