-
Notifications
You must be signed in to change notification settings - Fork 66
Update V3.x ReadMe to Bring Back "Declarative" Message #421
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
Comments
Hi @seth-acuitymd - it's not supposed to be anymore 😄 . Do you have examples of the specific field(s) that were overwritten? P.S. Cool name. |
Here's the block in my GH Action Workflow - id: 'Deploy'
uses: 'google-github-actions/deploy-cloud-functions@v3'
timeout-minutes: 10
with:
name: '<FUNCTION_NAME>'
runtime: 'python311'
region: 'us-east1'
entry_point: '<FUNCTION_NAME>'
source_dir: './cloud_functions/<FUNCTION_NAME>'
project_id: '<PROJECT_NAME>' After running this in my dev environment, I later made an unrelated Terraform change, and saw that my state had drifted for that specific function (this function has existed for many months) - was able to confirm that these changes were made when I checked the UI
So it looks like it modified:
Thanks for looking my friend! Let me know if I can provide more info! |
Can you apply that Terraform, then re-run the GitHub Action with GitHub logging enabled and send the output? You didn't set any Or if you can give me a Terraform snippet and full action.yml, I can try to reproduce this myself. |
@sethvargo yessir! I'll have that over ASAP - didn't want you to think this was getting stale! |
function.tf.txt |
Hi @seth-acuitymd your terraform uses node22, but your github action specifies python - that would trigger a full rebuild since you cannot change the environment runtime like that. |
Hi @seth-acuitymd - I modified the Terraform to make it work. The first thing I noticed is that, without running any GitHub Action, Terraform is detecting changes:
This repeats no matter how many times I apply the changes. If I ignore that, I think there could be a bug/misunderstanding in the FieldMask documentation for Cloud Functions which states (emphasis mine):
My interpretation of that was, if no field is provided, the value will not be touched. The payload being produced by the GitHub Action YAML does not include any secrets or environment variables, so I would expect those fields to be untouched:
However, it seems like those fields are being modified, even though they aren't sent with the payload. I think that means we need to construct a field mask (sigh) by iterating over the object. It'll take me a bit to figure out a good way to do that. |
@sethvargo - We have two cloud functions we deploy, one in Node and one in Python, I think I grabbed the Action for one, and the Terraform for the other, my bad! 😭 |
It's all good - I got it working and was able to reproduce it. |
TL;DR
The
v2
README has a block of text near the top that statesThe V3 README does not have that text, as such - when using the
v3
action, I accidentally defaulted a bunch of config I was specifying via Terraform (that's why we test in lower envs first 😄 )Detailed design
No response
Additional information
If this GitHub Action is not meant to be declarative in the way that
v2
was, then there's a bug, but I assume sincev2
is declarative, thatv3
will be as wellThe text was updated successfully, but these errors were encountered: