Open edaniszewski opened 4 years ago
@edaniszewski thanks for looking into it. I'm not going to publish new version, once we sort this out. If it's time taking, then probably we need to revert this change for now
(sorry for confusing comments, I deleted them. I thought it's someone else that reports the problem again :)
Based on the following, it seems like this is an issue w/ the cloud functions / deployment manager api
I haven't yet read through the entire issue thread, but It looks like there are workarounds, so there seems to be a path forward for this.
As an update, I've cobbled together a minimal implementation for setting IAM policies which appears to work. I'll spend some time over the next day or two cleaning it up and will open a PR when ready.
I recently added support for IAM policies (https://github.com/serverless/serverless-google-cloudfunctions/pull/219), and it appears that using it is causing deploys to fail (https://github.com/serverless/serverless-google-cloudfunctions/pull/219#issuecomment-649422035)
After overwriting my local
compileFunction.js
in my node_modules (probably a dumb question, but since I don't use npm/node often -- is there an easier way to reference a branch/local copy other than just overwriting the file?) and running a deploymentI got a similar error as to the one described in the PR comment
The interesting bit to me:
https://cloudfunctions.googleapis.com/v1/:setIamPolicy
which didn't look right. Looking at the cloudfunctions API doc (https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions/setIamPolicy?hl=fa), the request should be:So, it appears that the resource identifier isn't being set in the API call.
I'll try to dig into this a bit more, but since I'm relatively new to the code base, any pointers on where I should look are appreciated (:
And also apologies for not catching this and fixing this while it was in a PR.