experimental-extensions icon indicating copy to clipboard operation
experimental-extensions copied to clipboard

[firestore-sentiment-analysis] Reconfiguring collection path causes Error deploying extension

Open agau4779 opened this issue 4 years ago • 4 comments

Expected Behavior

It is possible to create a Firestore collection with spaces and punctuation.

I would expect reconfiguring COLLECTION_PATH for firestore-stentiment-analysis to either support spaces and punctuation as firestore does OR the reconfigure action fails the regex validation.

Actual Behavior

Reconfiguring firestore-sentiment-analysis doesn't stop me from configuring COLLECTION_PATH with spaces and punctuation, but it results in "error deploying Extension" with the following error output:

Error saving configuration:

; RESOURCE_ERROR at /deployments/firebase-ext-firestore-sentiment-analysis/resources/fssentiment: {"ResourceType":"gcp-types/cloudfunctions-v1:projects.locations.functions","ResourceErrorCode":"500","ResourceErrorMessage":"Failed to configure trigger providers/cloud.firestore/eventTypes/[email protected] (__gcf__.europe-west2.ext-firestore-sentiment-analysis-fssentiment)"}

Steps to Reproduce the Problem

Install firestore-sentiment-analysis, setting the collection path to something including spaces and punctuation. In my case, this is a collection!.

Specifications

  • Extension name: firestore-sentiment-analysis
  • Version: 0.0.1

agau4779 avatar Jan 14 '21 22:01 agau4779

@PaulTR can you please take a look at this? Here's an example of collection validation we use in the other extensions repo to avoid deployment issues.

Also fyi @kevinthecheung we may want to document (in the Extensions docs) the limitations of the types of Firestore paths that can be specified

jhuleatt avatar Jan 19 '21 20:01 jhuleatt

👍 Will grab this as the same time as the other issue.

PaulTR avatar Jan 19 '21 20:01 PaulTR

Looks like that's actually the validation I'm already using. We should check to see if this issue exists on other Firestore extensions.

PaulTR avatar Jan 20 '21 19:01 PaulTR

Confirmed the error exists across the board by trying to install the translation extension using the collection path 'this is a collection!'

PaulTR avatar Jan 20 '21 19:01 PaulTR