Open MathBunny opened 4 years ago
Hey @MathBunny, I chatted with Bryan about this last Friday, not sure if it reached you. You're absolutely right about the cause of this issue - on function creation, the CLI makes a call to IAM to try to make your new function public. That call is failing due to your org policy, so the function ends up being created but staying private. The next deploy succeeds, because it is updating the function, and the CLI doesn't make any IAM calls when updating functions (so that it won't break any manual changes to IAM policy).
Having said all that, I do think it would be worth cleaning up and clarifying the error here - ideally, that first deployment should show a message like "Unable to set IAM policy to make "functionXYZ" public"
Thanks for following up! This is consistent with the behavior I was seeing, as I was unable to make the functions public as well.
I am suspecting this is the cause:
[REQUIRED] Environment info
firebase-tools:8.2.0
Platform: Linux (gLinux)
[REQUIRED] Test case
Default setup, with the following function:
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
Function is created successfully in one go, or the appropriate function is outlined with the error (not having to supply the
--debug
flag).[REQUIRED] Actual behavior
Invoking it again right after: