firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

On failed deploy, the command suggested to retry is wrong

Open MichaelGradek opened this issue 6 years ago • 0 comments

[REQUIRED] Environment info

firebase-tools: 8.1.1

Platform: macOS

[REQUIRED] Test case

Have functions organized hierarchically in directories, i.e.

functions/index.js
functions/endpoints/index.js
functions/endpoints/OAuthCallbacks.js

functions/index.js exports.Endpoints = require("./endpoints")

functions/endpoints/index.js exports.OAuthCallbacks = require("./OAuthCallbacks.js")

functions/endpoints/OAuthCallbacks.js exports.Google = functions.https.onRequest(...)

[REQUIRED] Steps to reproduce

Have a function deployment fail (i.e. bad request)

⚠  functions: failed to create function Endpoints-OAuthCallbacks-Google
HTTP Error: 400, The request has errors

[REQUIRED] Expected behavior

The prompt to deploy only the failed functions should use the correct filtering notation using dots (.) to separate the modules / hierarchy

To try redeploying those functions, run:
    firebase deploy --only functions:Endpoints.OAuthCallbacks.Google

[REQUIRED] Actual behavior

The prompt to deploy only the failed functions uses the dash notation instead, which is not recognized then (as the deploy only uses dot notation)

To try redeploying those functions, run:
    firebase deploy --only functions:Endpoints-OAuthCallbacks-Google

This leads to:

⚠ functions: the following filters were specified but do not match any functions in the project: Endpoints-OAuthCallbacks-Google

MichaelGradek avatar Apr 24 '20 15:04 MichaelGradek