这是indexloc提供的服务,不要输入任何密码
Skip to content

Provision App Hosting compute service account during init flow #8580

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

Merged
merged 6 commits into from
May 15, 2025

Conversation

blidd-google
Copy link
Contributor

We must provision the App Hosting compute service account before calling createBackend.

@@ -48,7 +48,7 @@ let choices: {
},
{
value: "apphosting",
name: "App Hosting: Configure an apphosting.yaml file for App Hosting",
name: "App Hosting: Enable web app deployments with App Hosting",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong to me? are we enabling deployments, or making a backend? I think the flow as-written doesn't link to github?

Copy link
Contributor Author

@blidd-google blidd-google May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @jpreid7396 my understanding is that the description is meant to be generic enough to cover set up for deploy from source, but also any other features we might want to include as part of this flow. I'll defer to Julia here about the language specifics

@@ -31,6 +34,26 @@ export async function doSetup(setup: Setup, config: Config): Promise<void> {
"Firebase App Hosting requires billing to be enabled on your project. Please enable billing by following the steps at https://cloud.google.com/billing/docs/how-to/modify-project",
);
}
await ensureApiEnabled({ projectId });
await ensureRequiredApisEnabled(projectId);
// N.B. Deploying a backend from source requires the App Hosting compute service
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we actually attaching the the storage.objectViewer role right now?
Also, even if we were doing that, this comment is about the storage.objectViewer role, but its on the block of code that actually provisions the SA, and we'd need to do that even if the use isn't using deploy from source

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the storage.objectViewer role change isn't relevant until the follow-up deploy from source PR #8516. Removing the comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In

      projectId,
      location,
      backendId,
      /* serviceAccount= */ null,
      /* repository= */ undefined,
      webApp?.id,
    );

It's a real trap right now to make a backend without attaching a git repo (or doing deploy from source), since AFAIK we don't have a command to add one later

@github-project-automation github-project-automation bot moved this to Changes Requested [PR] in [Cloud] Extensions + Functions May 14, 2025
@github-project-automation github-project-automation bot moved this from Changes Requested [PR] to Approved [PR] in [Cloud] Extensions + Functions May 14, 2025
@blidd-google blidd-google enabled auto-merge (squash) May 15, 2025 00:07
@blidd-google blidd-google merged commit 0f59e99 into master May 15, 2025
49 of 50 checks passed
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions May 15, 2025
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