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

🐛 [firestore-send-email] Updating from v0.1.34 to v0.2.3 breaks extension during update (cannot be installed because of too high maxInstances), prevents extension from working #2457

@sceee

Description

@sceee

[READ] Step 1: Are you in the right place?

Yes

[REQUIRED] Step 2: Describe your configuration

  • Extension name: firestore-send-email
  • Extension version: Previously 0.1.34, after the update 0.2.3
  • Configuration values (redact info where appropriate):
    • Advanced parameters: Minimum function instances (before update): 0 (this was probably the default since a long time set by the extension when initially installed)
    • Advanced parameters: Maximum function instances (before update): 3000 (this was probably the default since a long time set by the extension when initially installed)

After the initial installation via the Firebase console (I don't remember in which version as it was a long time ago), the extension was updated multiple times via the Firebase console.
However, the minInstances and maxInstances have not been manually touched as far as I remember.

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

  1. Update the extension via the firebase console
  2. Click through the wizard without modifying any values
Expected result

The extension is updated correctly.

Actual result

The extension update fails with the following error:

; RESOURCE_ERROR at /deployments/firebase-ext-firestore-send-email/resources/processQueue: {"ResourceType":"gcp-types/cloudfunctions-v2beta:projects.locations.functions","ResourceErrorCode":"400","ResourceErrorMessage":{"code":400,"message":"Could not create Cloud Run service ext-firestore-send-email-processqueue. spec.template.metadata.annotations[autoscaling.knative.dev/maxScale]: Max instances must be set to 1204 or fewer to set the requested total CPU.\nConsider running your workload in a region with greater capacity, 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.\n\nQuota violated:\nCpuAllocPerProjectRegion requested: 498000 allowed: 200000\nMemAllocPerProjectRegion requested: 805306368000 allowed: 429496729600","status":"INVALID_ARGUMENT","statusMessage":"Bad Request","requestPath":"XXXXXXXXXXXXXXXXXXXX","httpMethod":"POST"}}

This makes the extension being stuck now because:

  • The previous version (being implemented as V1 function) is already uninstalled by the "update"
  • However, the new version (being implemented as V2 function) could not be installed by the "update"
    This means that the email extension no longer works.

The issue seems to be the maxInstances being set to 3000.

During the initial update wizard, I guess it was possible to change the settings (also the advanced settings). However, since there was no warning of whatsoever, I did not adjust/reduce the maxInstances setting in the advanced parameters as I just kept the existing (default) value. that was previously used by the extension.

However, now the extension is in a fail state - I can only retry the update by clicking the "retry update" button in the console but this immediately tries to redeploy the extension without the showing the wizard where I could adjust the values.

Image

Therefore, this also fails again.

I would now somehow have to adjust the maxInstances value of the "installed" (actuall no longer installed) extension which I can't because I can just retry the update which fails.

According to the Firebase Support there is no other way to adjust the settings of the extension.

So now I am stuck and only have the options:

  • Wait until another extension update is released so I potentially could run through the update wizard again
  • Uninstall the extension and set it up completely all over again

Both are not satisfying, especially if the application relies on the extension working and you can simply break it by performing an update as there is also no way to downgrade the extension (to make it work again and potentially perform the update at a later time).

As this simply breaks during the update with no way to fix it for the "installed" extension, it renders the extension useless during the update which is pretty dangerous.

Metadata

Metadata

Assignees

Labels

type: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions