-
Notifications
You must be signed in to change notification settings - Fork 965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
firebase.json: functions.ignore not including deeper directories #8131
Comments
Thanks for the detailed report and for providing a test case, @rhodgkins! I’m able to reproduce the behavior you mentioned. It looks like you have a fix for this ready in #8132. I think it would be better to include the fix along with the tests so that our engineers can verify and review the changes in the fix. I’ll also raise this to our engineering team to get their feedback. A not so elegant workaround I can see here(since |
Thanks for getting back to me @aalej - fix pushed |
[REQUIRED] Environment info
firebase-tools:
13.29.1
Platform:
macOS
[REQUIRED] Test case
See simple setup here https://github.com/rhodgkins/firebase-tools-functions-ignore
I have a directory named
deployment
at the root inside thefunctions.source
directory, and also another directorydeployment
in thefoobar
directory at the root. I want the rootdeployment
directory to not be uploaded with the functions.functions/
deployment/
- ignore this whole directoryfoobar/
deployment/
- want this directory (and everything inside it) included[REQUIRED] Steps to reproduce
Deploy the functions:
firebase --project=XXX deploy --only=functions
Found this due to having a deployment directory (with some config files not related to the function runtime execution) and another sub directory called deployment which was named after some function functionality. Couldn't work out why the directory wasn't being uploaded.
I've tried using
deployment/*
in theignore
instead but then the rootdeployment
directory gets uploaded.I think it's mainly due to how paths are filtered here:
firebase-tools/src/fsAsync.ts
Line 23 in e145360
It shouldn't include base
sourceDir
and then theminimatch
filters will work correctly withdeployment/*
.Going to attempt a fix, or at least start off with a PR with a failing test case for
readdirRecursive
[REQUIRED] Expected behavior
For
functions/foobar/deployment
directory to be uploaded, butfunctions/deployment
to not be included.[REQUIRED] Actual behavior
functions/foobar/deployment
and everything in it, is excluded.The text was updated successfully, but these errors were encountered: