Skip to content
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

Gcf gen2 base image update #10627

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maemayve
Copy link
Member

@maemayve maemayve commented May 7, 2024

Add new fields to the cloudfunctions2 resource to support automatic base image updates. (b/330553378)

Release Note Template for Downstream PRs (will be copied)

cloudfunctions2: added `build_config.automatic_update_policy` and `build_config.on_deploy_update_policy` to `google_cloudfunctions2_function` resource

@github-actions github-actions bot requested a review from slevenick May 7, 2024 23:22
Copy link

github-actions bot commented May 7, 2024

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 280 insertions(+))
google-beta provider: Diff ( 3 files changed, 492 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 57 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 17
Passed tests: 0
Skipped tests: 1
Affected tests: 16

Click here to see the affected service packages
  • cloudfunctions2

Action taken

Found 16 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudFunctions2Function_fullUpdate|TestAccCloudFunctions2Function_update|TestAccCloudfunctions2functionIamBindingGenerated|TestAccCloudfunctions2functionIamMemberGenerated|TestAccCloudfunctions2functionIamPolicyGenerated|TestAccCloudfunctions2function_cloudfunctions2AbiuExample|TestAccCloudfunctions2function_cloudfunctions2AbiuOnDeployExample|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccCloudfunctions2function_cloudfunctions2BasicBuilderExample|TestAccCloudfunctions2function_cloudfunctions2BasicExample|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccCloudfunctions2function_cloudfunctions2FullExample|TestAccCloudfunctions2function_cloudfunctions2PrivateWorkerpoolExample|TestAccCloudfunctions2function_cloudfunctions2SecretEnvExample|TestAccCloudfunctions2function_cloudfunctions2SecretVolumeExample|TestAccDataSourceGoogleCloudFunctions2Function_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccCloudFunctions2Function_fullUpdate[Debug log]
TestAccCloudFunctions2Function_update[Debug log]
TestAccCloudfunctions2functionIamBindingGenerated[Debug log]
TestAccCloudfunctions2functionIamMemberGenerated[Debug log]
TestAccCloudfunctions2functionIamPolicyGenerated[Debug log]
TestAccCloudfunctions2function_cloudfunctions2AbiuExample[Debug log]
TestAccCloudfunctions2function_cloudfunctions2AbiuOnDeployExample[Debug log]
TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample[Debug log]
TestAccCloudfunctions2function_cloudfunctions2BasicBuilderExample[Debug log]
TestAccCloudfunctions2function_cloudfunctions2BasicExample[Debug log]
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample[Debug log]
TestAccCloudfunctions2function_cloudfunctions2FullExample[Debug log]
TestAccCloudfunctions2function_cloudfunctions2PrivateWorkerpoolExample[Debug log]
TestAccCloudfunctions2function_cloudfunctions2SecretEnvExample[Debug log]
TestAccCloudfunctions2function_cloudfunctions2SecretVolumeExample[Debug log]
TestAccDataSourceGoogleCloudFunctions2Function_basic[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an update test that adds and then removes these fields? We've seen issues with removing fields sometimes especially when they're represented as empty objects.

@maemayve
Copy link
Member Author

maemayve commented May 9, 2024

Absolutely, I'll update the PR when the tests are ready.

@maemayve maemayve force-pushed the gcf-gen2-base-image-update branch from db3d1cc to 396bf13 Compare May 10, 2024 22:30
@github-actions github-actions bot requested a review from slevenick May 10, 2024 22:31
@maemayve
Copy link
Member Author

Added an update test. Is there a way I can re-trigger the integration tests?

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 286 insertions(+), 5 deletions(-))
google-beta provider: Diff ( 4 files changed, 498 insertions(+), 5 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 57 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 17
Passed tests: 14
Skipped tests: 1
Affected tests: 2

Click here to see the affected service packages
  • cloudfunctions2

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudFunctions2Function_fullUpdate|TestAccCloudFunctions2Function_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccCloudFunctions2Function_fullUpdate[Error message] [Debug log]
TestAccCloudFunctions2Function_update[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@maemayve maemayve force-pushed the gcf-gen2-base-image-update branch from 396bf13 to d45f128 Compare May 10, 2024 22:48
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 281 insertions(+))
google-beta provider: Diff ( 4 files changed, 493 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 57 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 17
Passed tests: 15
Skipped tests: 1
Affected tests: 1

Click here to see the affected service packages
  • cloudfunctions2

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudFunctions2Function_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccCloudFunctions2Function_update[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failing with:
~ build_config {
# (5 unchanged attributes hidden)

              - automatic_update_policy {}
    
                # (1 unchanged block hidden)
            }
    
          ~ service_config {
              + environment_variables            = {}
                # (11 unchanged attributes hidden)
            }

Is this waiting on a feature rollout to work?

@maemayve maemayve force-pushed the gcf-gen2-base-image-update branch from d45f128 to d3467a2 Compare May 16, 2024 19:50
@github-actions github-actions bot requested a review from slevenick May 16, 2024 19:51
@maemayve maemayve force-pushed the gcf-gen2-base-image-update branch from d3467a2 to 8de4a37 Compare May 16, 2024 19:54
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 308 insertions(+))
google-beta provider: Diff ( 4 files changed, 520 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 73 insertions(+))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@maemayve
Copy link
Member Author

Updated the PR with a custom encoder to marshal the update policy in line with API expectations. Tested new tests and update.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • cloudfunctions2

Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccCloudfunctions2function_cloudfunctions2AbiuExample
  • TestAccCloudfunctions2function_cloudfunctions2AbiuOnDeployExample

$\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$
View the build log

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 308 insertions(+))
google-beta provider: Diff ( 4 files changed, 520 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 73 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 17
Passed tests: 14
Skipped tests: 1
Affected tests: 2

Click here to see the affected service packages
  • cloudfunctions2

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudFunctions2Function_update|TestAccCloudfunctions2function_cloudfunctions2AbiuOnDeployExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccCloudFunctions2Function_update[Debug log]
TestAccCloudfunctions2function_cloudfunctions2AbiuOnDeployExample[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@@ -125,6 +125,7 @@ resource "google_cloudfunctions2_function" "terraform-test2" {
object = google_storage_bucket_object.object.name
}
}
on_deploy_update_policy {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an update test that starts with this set, then switches to the other type of update policy, then removes the update policy entirely?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need this update test

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on the test now. Slowed down by production outage yesterday

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This proposed test case revealed additional issues in the backend implementation. I will add tests and update this PR once the fixes for these issues are rolled out to production.

Add new field to specify auto base image update.
@maemayve maemayve force-pushed the gcf-gen2-base-image-update branch from 8de4a37 to 0a84e2e Compare May 16, 2024 21:48
@github-actions github-actions bot requested a review from slevenick May 16, 2024 21:48
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 308 insertions(+))
google-beta provider: Diff ( 4 files changed, 520 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 73 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 17
Passed tests: 16
Skipped tests: 1
Affected tests: 0

Click here to see the affected service packages
  • cloudfunctions2

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

Copy link

@maemayve, this PR is waiting for action from you. Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

Image showing the re-request review button

If no action is taken, this PR will be closed in 28 days.

This notification can be disabled with the disable-automatic-closure label.

2 similar comments
Copy link

github-actions bot commented Jun 1, 2024

@maemayve, this PR is waiting for action from you. Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

Image showing the re-request review button

If no action is taken, this PR will be closed in 28 days.

This notification can be disabled with the disable-automatic-closure label.

Copy link

github-actions bot commented Jun 2, 2024

@maemayve, this PR is waiting for action from you. Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

Image showing the re-request review button

If no action is taken, this PR will be closed in 28 days.

This notification can be disabled with the disable-automatic-closure label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants