I’m a new dev straight out of college working on a webapp on Firebase. I’m following the Get Started Instructions word-for-word.
So I initialized app hosting using npm init @apphosting
adn set up my services.
I then used the Console to create a backend that authenticated with GitHub.
Then I initialized and installed the webpack by following the instructions here: https://webpack.js.org/guides/getting-started
Then I pushed my changes to Git which automatically triggered a rollout to my backend. The build was succesful, but the rollout failed.
The error in the log is referring to Cloud Run which is what App Hosting sits on top of, but I don’t want to deploy to Cloud Run directly. Is there anything I need to set up in Cloud Run to use App Hosting? Here is the error:
{
"protoPayload": {
"@type": "type.googleapis.com/google.cloud.audit.AuditLog",
"status": {
"code": 3,
"message": "template.containers.resources.limits.cpu: Invalid value specified for cpu. For the specified value, maxScale may not exceed 10.nConsider running your workload in a region with greater capacity, decreasing your requested cpu-per-instance, or requesting an increase in quota for this region if you are seeing sustained usage near this limit, see https://cloud.google.com/run/quotas. Your project may gain access to further scaling by adding billing information to your account."
},
"authenticationInfo": {
"principalEmail": "service-597689444285@gcp-sa-firebaseapphosting.iam.gserviceaccount.com"
},
"requestMetadata": {
"callerIp": "private",
"callerSuppliedUserAgent": "stubby_client",
"requestAttributes": {
"time": "2024-08-12T05:50:10.143263Z",
"auth": {}
},
"destinationAttributes": {}
},
"serviceName": "run.googleapis.com",
"methodName": "google.cloud.run.v2.Services.CreateService",
"authorizationInfo": [
{
"resource": "projects/597689444285/locations/us-central1/services/root-is-functions",
"permission": "run.services.create",
"granted": true,
"resourceAttributes": {},
"permissionType": "ADMIN_WRITE"
}
],
"resourceName": "projects/597689444285/locations/us-central1/services/root-is-functions",
"request": {
"parent": "projects/597689444285/locations/us-central1",
"service": {
"launchStage": "BETA",
"scaling": {},
"template": {
"maxInstanceRequestConcurrency": 80,
"revision": "root-is-functions-build-2024-08-12-000",
"scaling": {
"maxInstanceCount": 100
},
"serviceAccount": "firebase-app-hosting-compute@eventalchemist-59d4a.iam.gserviceaccount.com",
"executionEnvironment": "EXECUTION_ENVIRONMENT_GEN1"
},
"labels": {
"goog-managed-by": "firebase-app-hosting"
},
"traffic": [
{
"percent": 100,
"revision": "root-is-functions-build-2024-08-12-000",
"tag": "t-3250351220",
"type": "TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION"
}
]
},
"@type": "type.googleapis.com/google.cloud.run.v2.CreateServiceRequest"
},
"resourceLocation": {
"currentLocations": [
"us-central1"
]
}
},
"insertId": "15wfdkld45jt",
"resource": {
"type": "cloud_run_revision",
"labels": {
"revision_name": "",
"configuration_name": "",
"location": "us-central1",
"project_id": "eventalchemist-59d4a",
"service_name": "root-is-functions"
}
},
"timestamp": "2024-08-12T05:50:10.054899Z",
"severity": "ERROR",
"logName": "projects/eventalchemist-59d4a/logs/cloudaudit.googleapis.com%2Factivity",
"receiveTimestamp": "2024-08-12T05:50:10.680139295Z"
}
Thank you!
I was really hoping that my rollout would go through 🙂
Denae Luna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.