Skip to content

v7.2.0 regression: Can't deploy 1st gen Firestore trigger with leading slash in document path #1830

@jhuleatt

Description

@jhuleatt

Related issues

N/A

[REQUIRED] Version info

node: any

firebase-functions: 7.2.0 (1st gen)

firebase-tools: latest

firebase-admin: latest

[REQUIRED] Test case

This works:

exports.myFunction = functions.firestore
  .document('my-collection/{docId}')
  .onWrite((change, context) => { /* ... */ });

This doesn't:

exports.myFunction = functions.firestore
  // note the leading slash here
  .document('/my-collection/{docId}')
  .onWrite((change, context) => { /* ... */ });

[REQUIRED] Steps to reproduce

Try to deploy a function with a leading slash in the Firestore resource string.

[REQUIRED] Expected behavior

Leading slashes are supported.

[REQUIRED] Actual behavior

Deploy fails

Were you able to successfully deploy your functions?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions