Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add force flag to delete backend #6635

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Add force flag to delete backend (#6635).
2 changes: 1 addition & 1 deletion src/gcp/apphosting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
done: boolean;
// oneof result
error?: Status;
response?: any;

Check warning on line 240 in src/gcp/apphosting.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
// end oneof result
}

Expand Down Expand Up @@ -297,7 +297,7 @@
location: string,
backendId: string
): Promise<Operation> {
const name = `projects/${projectId}/locations/${location}/backends/${backendId}`;
const name = `projects/${projectId}/locations/${location}/backends/${backendId}?force=true`;
const res = await client.delete<Operation>(name);

return res.body;
Expand Down Expand Up @@ -420,7 +420,7 @@
/**
* Ensure that Frameworks API is enabled on the project.
*/
export async function ensureApiEnabled(options: any): Promise<void> {

Check warning on line 423 in src/gcp/apphosting.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
const projectId = needProjectId(options);

Check warning on line 424 in src/gcp/apphosting.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe argument of type `any` assigned to a parameter of type `{ projectId?: string | undefined; project?: string | undefined; rc?: RC | undefined; }`
return await ensure(projectId, API_HOST, "frameworks", true);
}