Skip to content

Commit

Permalink
Promote Vertex AI FeatureStore resources (GA only) (#6565)
Browse files Browse the repository at this point in the history
* feat: promote vertex ai feature store resources (ga only)

* feat: deprecate the field:       monitoring_interval

* Revert "feat: deprecate the field:       monitoring_interval"

This reverts commit 89d6672.

* feat: update the example to use only the GA fields

* fix: diable monitoring_config.snapshot_analysis in the example

* feat: promote the featurestore entity feature resource to GA

* fix: add default_value to fix the unintentional diff

* feat: update the link to the api doc

* Revert "fix: add default_value to fix the unintentional diff"

This reverts commit d3b5090.

* refactor: use deprecation_message to clarify the deprecated field

* feat: add a new example to test beta fields

* fix: use a different resource name to run tests in parallel
  • Loading branch information
shotarok authored Oct 14, 2022
1 parent c8cee6c commit 679dd04
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 28 deletions.
11 changes: 5 additions & 6 deletions mmv1/products/vertexai/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,13 @@ objects:
base_url: projects/{{project}}/locations/{{region}}/featurestores
create_url: projects/{{project}}/locations/{{region}}/featurestores?featurestoreId={{name}}
self_link: 'projects/{{project}}/locations/{{region}}/featurestores/{{name}}'
min_version: beta
update_verb: :PATCH
update_mask: true
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation':
'https://cloud.google.com/vertex-ai/docs'
api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations.featurestores'
api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featurestores'
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
path: 'name'
Expand Down Expand Up @@ -194,14 +193,13 @@ objects:
base_url: '{{featurestore}}/entityTypes'
create_url: '{{featurestore}}/entityTypes?entityTypeId={{name}}'
self_link: '{{featurestore}}/entityTypes/{{name}}'
min_version: beta
update_verb: :PATCH
update_mask: true
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation':
'https://cloud.google.com/vertex-ai/docs'
api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations.featurestores.entityTypes'
api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featurestores.entityTypes'
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
path: 'name'
Expand Down Expand Up @@ -273,6 +271,8 @@ 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'
min_version: beta
deprecation_message: This field is unavailable in the GA provider and will be removed from the beta provider in a future release.
description: |
Configuration of the snapshot analysis based monitoring pipeline running interval. The value is rolled up to full day.
Expand All @@ -284,14 +284,13 @@ objects:
base_url: '{{entitytype}}/features'
create_url: '{{entitytype}}/features?featureId={{name}}'
self_link: '{{entitytype}}/features/{{name}}'
min_version: beta
update_verb: :PATCH
update_mask: true
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation':
'https://cloud.google.com/vertex-ai/docs'
api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations.featurestores.entityTypes.features'
api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featurestores.entityTypes.features'
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
path: 'name'
Expand Down
25 changes: 21 additions & 4 deletions mmv1/products/vertexai/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@ overrides: !ruby/object:Overrides::ResourceOverrides
billing_account: :BILLING_ACCT
test_vars_overrides:
kms_key_name: 'BootstrapKMSKeyInLocation(t, "us-central1").CryptoKey.Name'
- !ruby/object:Provider::Terraform::Examples
name: "vertex_ai_featurestore_entitytype_with_beta_fields"
primary_resource_id: "entity"
vars:
name: "terraform2"
project: "vertex-ai"
kms_key_name: "kms-name"
test_env_vars:
org_id: :ORG_ID
billing_account: :BILLING_ACCT
test_vars_overrides:
kms_key_name: 'BootstrapKMSKeyInLocation(t, "us-central1").CryptoKey.Name'
min_version: beta
properties:
etag: !ruby/object:Overrides::Terraform::PropertyOverride
ignore_read: true
Expand All @@ -99,10 +112,14 @@ overrides: !ruby/object:Overrides::ResourceOverrides
name: "terraform"
project: "vertex-ai"
kms_key_name: "kms-name"
test_env_vars:
org_id: :ORG_ID
billing_account: :BILLING_ACCT
test_vars_overrides:
- !ruby/object:Provider::Terraform::Examples
name: "vertex_ai_featurestore_entitytype_feature_with_beta_fields"
primary_resource_id: "feature"
vars:
name: "terraform2"
project: "vertex-ai"
kms_key_name: "kms-name"
min_version: beta
properties:
etag: !ruby/object:Overrides::Terraform::PropertyOverride
ignore_read: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
resource "google_vertex_ai_featurestore" "featurestore" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
resource "google_vertex_ai_featurestore" "featurestore" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
Expand All @@ -14,16 +13,9 @@ resource "google_vertex_ai_featurestore" "featurestore" {
}

resource "google_vertex_ai_featurestore_entitytype" "entity" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
}
featurestore = google_vertex_ai_featurestore.featurestore.id
monitoring_config {
snapshot_analysis {
disabled = false
monitoring_interval = "86400s"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
resource "google_vertex_ai_featurestore" "featurestore" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
Expand All @@ -11,22 +10,14 @@ resource "google_vertex_ai_featurestore" "featurestore" {
}

resource "google_vertex_ai_featurestore_entitytype" "entity" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
}
featurestore = google_vertex_ai_featurestore.featurestore.id
monitoring_config {
snapshot_analysis {
disabled = false
monitoring_interval = "86400s"
}
}
}

resource "google_vertex_ai_featurestore_entitytype_feature" "feature" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
resource "google_vertex_ai_featurestore" "featurestore" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
}
region = "us-central1"
online_serving_config {
fixed_node_count = 2
}
}

resource "google_vertex_ai_featurestore_entitytype" "entity" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
}
featurestore = google_vertex_ai_featurestore.featurestore.id
monitoring_config {
snapshot_analysis {
disabled = false
monitoring_interval = "86400s"
}
}
}

resource "google_vertex_ai_featurestore_entitytype_feature" "feature" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
}
entitytype = google_vertex_ai_featurestore_entitytype.entity.id

value_type = "INT64_ARRAY"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
resource "google_vertex_ai_featurestore" "featurestore" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
}
region = "us-central1"
online_serving_config {
fixed_node_count = 2
}
encryption_spec {
kms_key_name = "<%= ctx[:vars]['kms_key_name'] %>"
}
}

resource "google_vertex_ai_featurestore_entitytype" "entity" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
}
featurestore = google_vertex_ai_featurestore.featurestore.id
monitoring_config {
snapshot_analysis {
disabled = false
monitoring_interval = "86400s"
}
}
}

0 comments on commit 679dd04

Please sign in to comment.