Open pamelafox opened 1 year ago
+1 to this issue. I've had to restructure a project to avoid the frontend node_modules folder getting published. Another problem is that local.settings.json also gets published, which can contain sensitive info like connection strings.
Is there any workaround to this issue?
@pamelafox and @ashikns - I have a PR out that should resolve this issue. Can you please try that PR and confirm is resolves this?
https://github.com/Azure/azure-dev/pull/4258
You will need to add a .funcignore file to the root of the service folder you want azd to honor.
/src/service1/.funcignore.
Thanks Jon
Output from
azd version
azd version 0.3.0-beta.4-pr.1945868 (commit 3aadf6dc4c842ba6813e423e4e9d6788e6dff200)
Output from
az version
Describe the bug
I'm fairly certain that azd is zipping up everything in the folder and not ignoring files/folders in funcignore which I would expect to be ignored.
I suspect that because 1) zipping my little function folder takes a lot longer than I'd expect and 2) I see no evidence of funcignore parsing in codebase, and I see this TODO here about ignoring files: https://github.com/Azure/azure-dev/blob/a74e800f053779cb97e365068b80c879c328c2a9/cli/azd/pkg/project/internal/project_utils.go#L16
To Reproduce
Expected behavior
I expect it to not zip up files/folders specified in .funcignore
Environment
Mac OS X Ventura
Additional context
I can reorganize my project structure to avoid such a large deploy, but I think it'd be good to support .funcignore for consistency with other ways to deploy function apps.