Improve error messaging around function dot-notation deploys
See original GitHub issueEnvironment info
firebase-tools: 8.1.1 Platform: MacOs
Test case
$ firebase deploy --only functions:trig-users-onUserUpdate
Steps to reproduce
- Have a project setup
- Create a cloud function
- Try to deploy just that function, ex:
$ firebase deploy --only functions:trig-users-onUserUpdate
Expected behavior
...
✔ functions[trig-users-onUserUpdate(us-central1)]: Successful update operation.
...
Function deployed.
Actual behavior
i functions: current functions in project: trig-auth-createAuthUser(us-central1), trig-auth-onDeleteUser(us-central1), trig-users-onUserUpdate(us-central1)
⚠ functions: the following filters were specified but do not match any functions in the project: trig-users-onUserUpdate
Function wasn’t deployed
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
How to Write Helpful Error Messages to Improve Your App's ...
The first builds context around error messages and why they're important. This section should be useful, regardless of whether you're a ...
Read more >Fix program errors and improve code - Visual Studio (Windows)
This article describes some basic ways Visual Studio can help you find and fix problems in your code, including build errors, code analysis, ......
Read more >Get Started with Custom Error Handling in Spring Boot (Java)
Learn how to implement custom error handling logic in Spring Boot. You will see two approaches based on the @ControllerAdvice annotation.
Read more >Common .NET Software Errors and How to Fix Them - Stackify
NET software errors from around the web. It includes exceptions, broken data bindings, ... NET error, see this article from Dot Net Perls....
Read more >Top 10 errors from 1000+ Ruby on Rails projects ... - Rollbar
NoMethodError: undefined method '[]' for nil:NilClass. This means that you are using square bracket notation to read a property from an object, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We use dot notation because we allow for exporting groups of functions and deploying them together, for instance:
Where I can now deploy both functions with:
Function names cannot have periods in them, but the hierarchy makes dot-notation make more sense than dash notation.
I think the action here is probably to have a better error message before deploy if you include dashes (which are not allowed by our trigger parser), so I’ll leave it open and edit the title to reflect.
The issue is that, for some reason, the deploy --only filter expects you to use dot notation to separate the modules / directories.
If you try this, it will work:
$ firebase deploy --only functions:trig.users.onUserUpdate
i.e. change the - for .
I believe this is very counter intuitive, but it is what it is for now.
¯_(ツ)_/¯