firebase-tools: 7.12.1
Platform: macOS
Run firebase deploy --only functions:myGroup-fn1 with the following index.js file:
const functions = require('firebase-functions');
exports.myGroup = {
fn1: functions.https.onRequest(function(request, response) {
response.status(200).send("fn1");
}
};
firebase deploy --only functions:myGroup-fn1 (or any way of trying to reference only fn1)
The function to get deployed.
The function is skipped with an error:
âš functions: the following filters were specified but do not match any functions in the project: myGroup-fn1
Also note: firebase deploy initially timed out on a couple of functions and it gave me this command to retry only those failed functions which didn't work which is how I discovered this issue.
Thanks for the simple reproduction! I was able to reproduce this with these functions:
const functions = require('firebase-functions');
exports.outside = functions.https.onRequest(function(req, res) {
res.status(200).send("outside");
});
exports.myGroup = {
fn1: functions.https.onRequest(function(request, response) {
response.status(200).send("fn1");
})
}
Deploying --only functions:outside and --functions:myGroup works but not --functions:myGroup-fn1
try firebase deploy --only functions:myGroup.fn1
i believe you need to use the dot notation when referring to a specific function in a group. but it does get confusing because the name of the function itself uses the dash.
@eleith - yep! Looks like that worked. Could have sworn I tried that originally but I must not have.
D'oh I make this mistake all the time. @eleith thanks for pointing this out. Even though the actual deployed name of the function contains a dash, we should always use the dot notation with the firebase CLI (in deploy, functions:shell, etc)
Most helpful comment
try
firebase deploy --only functions:myGroup.fn1i believe you need to use the dot notation when referring to a specific function in a group. but it does get confusing because the name of the function itself uses the dash.