-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Promote Vertex AI FeatureStore resources (GA only) #6565
Promote Vertex AI FeatureStore resources (GA only) #6565
Conversation
Hello! I am a robot who works on Magic Modules PRs. I've detected that you're a community contributor. @slevenick, a repository maintainer, has been assigned to assist you and help review your changes. ❓ First time contributing? Click here for more detailsYour assigned reviewer will help review your code by:
You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails. If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox. |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 7 files changed, 1264 insertions(+), 11 deletions(-)) |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
It looks like the two tests also fail in the other PRs regardless of the PR contents. BTW, I can't see the build log or the debug log either due to the permission errors. Is this an expected behavior? [UPDATED] I found the following note on README.md. I understand that community developers don't need permission too see the logs.
|
Hi @slevenick, could you please review this PR? |
Hmmm, it looks like some fields may not be supported in GA at the API level (or were renamed, removed or something else) This test fails: Can you see what is going on with that test? I see this failure message:
|
@slevenick Thank you for your comment! I found out the following things:
I'll remove |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 7 files changed, 1239 insertions(+), 17 deletions(-)) |
Yikes, so this is going to be a bit of a tricky situation. We have pretty strict guidelines around backwards compatibility, where we cannot remove a field until a major version change. That means that we can't remove the field from the beta provider, but we also can't have it present in the GA provider. Maybe we can mark that field as min_version: beta to prevent it from being in the GA provider, and then deprecate it so we can remove it in the next major version |
Thank you for sharing the release policy. This approach looks good to me. I'll update the PR, and get back to you! |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample|TestAccComputeInstance_soleTenantNodeAffinities |
Tests failed during RECORDING mode: Please fix these to complete your PR |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 7 files changed, 1241 insertions(+), 13 deletions(-)) |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeForwardingRule_internalTcpUdpLbWithMigBackendExample|TestAccComputeGlobalForwardingRule_externalTcpProxyLbMigBackendExample|TestAccComputeForwardingRule_networkTier|TestAccComputeForwardingRule_update|TestAccComputeForwardingRule_forwardingRuleRegionalHttpXlbExample|TestAccComputeForwardingRule_forwardingRuleExternallbExample|TestAccClouddeployDeliveryPipeline_DeliveryPipeline|TestAccComputeRouterInterface_basic|TestAccComputeVpnTunnel_vpnTunnelBetaExample|TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample|TestAccSqlDatabaseInstance_mysqlMajorVersionUpgrade|TestAccComputeFirewallPolicyRule_update|TestAccComputeFirewallPolicy_update |
Hello @slevenick, I removed |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error is:
provider_test.go:315: Step 1/2 error: After applying this test step, the plan was not empty.
stdout:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# google_vertex_ai_featurestore_entitytype.entity will be updated in-place
~ resource "google_vertex_ai_featurestore_entitytype" "entity" {
id = "projects/ci-test-project-188019/locations/us-central1/featurestores/terraformxhbvcoal6r/entityTypes/terraformxhbvcoal6r"
name = "terraformxhbvcoal6r"
# (4 unchanged attributes hidden)
+ monitoring_config {
+ snapshot_analysis {
+ disabled = false
}
}
}
Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample (67.11s)
Looks like if monitoring_interval isn't specified we get an empty block back. Can you specify the other field in that test?
Thank you for letting me know about the error! The Apart from that, I added |
Still seeing:
Are you able to run these tests yourself? |
Thank you for your comment. I tried reproducing the error with the auto-generated branch on my local machine like below, but the test passed on my machine. So I might have overlooked something. I attached test.log.
|
It's failing on the beta provider specifically, so maybe it's a beta vs GA difference? |
Ah, I could reproduce the error with the beta provider locally. I'll look into it. Thanks! |
Hi there, I'm the Modular magician - ! |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccFirebaserulesRelease_BasicRelease|TestAccBillingSubaccount_renameOnDestroy|TestAccBillingSubaccount_basic|TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample|TestAccVertexAIFeaturestoreEntitytypeFeature_vertexAiFeaturestoreEntitytypeFeatureExample |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
Hi @slevenick I added the default value of the monitoring_interval and I confirmed the tests passed. Could you review the change when you have time? Thanks! |
mmv1/products/vertexai/api.yaml
Outdated
@@ -273,7 +271,11 @@ objects: | |||
The monitoring schedule for snapshot analysis. For EntityType-level config: unset / disabled = true indicates disabled by default for Features under it; otherwise by default enable snapshot analysis monitoring with monitoringInterval for Features under it. | |||
- !ruby/object:Api::Type::String | |||
name: 'monitoringInterval' | |||
default_value: "0s" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't add a default value in a minor version of the provider. It's technically considered a breaking change even if it was the implicit default value before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slevenick Got it! I'll revert the change. BTW, could you give me an example to test a beta field? I'd like to test monitoring_interval
only in the google-beta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, can we define an additional google_vertex_ai_featurestore_entitytype
only in the test of the google-beta provider?
resource "google_vertex_ai_featurestore_entitytype" "entity" {
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
}
featurestore = google_vertex_ai_featurestore.featurestore.id
monitoring_config {
snapshot_analysis {
disabled = true
}
}
}
<%- if is_beta %>
resource "google_vertex_ai_featurestore_entitytype" "entity_for_beta" {
provider = google-beta
name = "<%= ctx[:vars]['name'] + '_for_beta' %>"
labels = {
foo = "bar"
}
featurestore = google_vertex_ai_featurestore.featurestore.id
monitoring_config {
snapshot_analysis {
disabled = false
monitoring_interval = "86400s"
}
}
}
<%- end %>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you can find examples of the version tag needed to make some code only exist in the beta provider. I think its something like <%- unless version == "ga" %>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slevenick it turns out there is no version information in the bindings to render the example. I'm wondering if there is another way to test a beta field. Or should I pass the version to render the example?
magic-modules/mmv1/provider/terraform/examples.rb
Lines 259 to 267 in 3132afe
body = lines(compile_file( | |
{ | |
vars: rand_vars.merge(overrides), | |
test_env_vars: test_env_vars.map { |k, _| [k, "%{#{k}}"] }.to_h, | |
primary_resource_id: primary_resource_id, | |
primary_resource_type: primary_resource_type | |
}, | |
pwd + '/' + config_path | |
)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understood we could define multiple examples for a resource, and we can define min_version of an example object. I'll add two example erb files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could define an example only for the beta provider by min_version of an example object. However, I couldn't define an example only for the ga provider only with the min_version.
magic-modules/mmv1/templates/terraform/examples/base_configs/test_file.go.erb
Lines 29 to 32 in 13f6fa6
object.examples | |
.reject(&:skip_test) | |
.reject { |e| @api.version_obj_or_closest(version) < @api.version_obj_or_closest(e.min_version) } | |
.each do |example| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created two examples. One is without monitoring_interval
, which works for both ga and beta. Another example is with monitoring_interval
, which only works for beta.
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 10 files changed, 1846 insertions(+), 18 deletions(-)) |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccVertexAIFeaturestoreEntitytypeFeature_vertexAiFeaturestoreEntitytypeFeatureWithBetaFieldsExample|TestAccVertexAIFeaturestoreEntitytypeFeature_vertexAiFeaturestoreEntitytypeFeatureExample|TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample|TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeWithBetaFieldsExample|TestAccComputeForwardingRule_internalTcpUdpLbWithMigBackendExample|TestAccComputeInstance_soleTenantNodeAffinities |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
@slevenick OK, the added tests passed in the recording mode. Could you please review this PR again when you have time? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great thanks! Good call on adding a separate test for the beta-only field
part of hashicorp/terraform-provider-google#9298
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)