Skip to content

feat(vertexai): add google_vertex_ai_online_evaluator resource#17944

Merged
roaks3 merged 20 commits into
GoogleCloudPlatform:mainfrom
guvenenb:online_evals
Jun 19, 2026
Merged

feat(vertexai): add google_vertex_ai_online_evaluator resource#17944
roaks3 merged 20 commits into
GoogleCloudPlatform:mainfrom
guvenenb:online_evals

Conversation

@guvenenb

@guvenenb guvenenb commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

`google_vertex_ai_online_evaluator` (beta)

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jun 12, 2026
@github-actions github-actions Bot requested a review from roaks3 June 12, 2026 02:30
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@roaks3, 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.

Comment thread mmv1/products/vertexai/OnlineEvaluator.yaml Outdated
Comment thread mmv1/products/vertexai/OnlineEvaluator.yaml Outdated
Comment thread mmv1/products/vertexai/OnlineEvaluator.yaml Outdated
Comment thread mmv1/products/vertexai/OnlineEvaluator.yaml Outdated
Comment thread mmv1/products/vertexai/OnlineEvaluator.yaml
guvenenb added 4 commits June 15, 2026 14:15
- Rename location parameter to region for consistency.
- Update format description in name property to use region.
- Add timeouts (insert/update: 20m, delete: 60m) to OnlineEvaluator.
- Specify OpAsync type for async operations.
- Clean up comments in custom flatten template.

TAG=agy
CONV=5308268d-2e95-4a0c-8ce0-cdac27b8c645
- Use custom flattener for name to extract short ID.
- Update self_link to use full path template with short name.
- Update basic example to use region instead of location.

TAG=agy
CONV=5308268d-2e95-4a0c-8ce0-cdac27b8c645
guvenenb added 2 commits June 15, 2026 14:52
… metrics

    - Add a simple google_vertex_ai_reasoning_engine resource to the basic example to make it self-contained and runnable.
    - Reference the reasoning engine ID in the evaluator's agent_resource.
    - Add predefined metrics for hallucination, final response quality, and tool use quality to enrich the example.

    TAG=agy
    CONV=56524cca-e5c6-4a4d-bf34-390d5c1e5c74
@guvenenb guvenenb requested a review from maxgasztych June 15, 2026 15:59
    - Add TODO comment to support structured metric config in the future instead of JSON string.
    - Update description of the metric field to list suggested predefined metric names (including multi-turn metrics) for user reference.

    TAG=agy
    CONV=56524cca-e5c6-4a4d-bf34-390d5c1e5c74
@guvenenb guvenenb closed this Jun 15, 2026
@guvenenb guvenenb reopened this Jun 15, 2026
@guvenenb guvenenb closed this Jun 15, 2026
@guvenenb guvenenb reopened this Jun 15, 2026
@github-actions

Copy link
Copy Markdown

@roaks3 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions

Copy link
Copy Markdown

@GoogleCloudPlatform/terraform-team @roaks3 This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

@roaks3 roaks3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall looks good, but left a few comments, mainly to align with common practices

Comment thread mmv1/products/vertexai/OnlineEvaluator.yaml Outdated
Comment thread mmv1/products/vertexai/OnlineEvaluator.yaml
Comment thread mmv1/products/vertexai/OnlineEvaluator.yaml Outdated
Comment thread mmv1/templates/terraform/examples/vertex_ai_online_evaluator_basic.tf.tmpl Outdated
Comment thread mmv1/templates/terraform/examples/vertex_ai_online_evaluator_basic.tf.tmpl Outdated
@github-actions github-actions Bot requested a review from roaks3 June 18, 2026 19:24

@roaks3 roaks3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just one minor comment on the tests

… in online evaluator tests

    - Added 'tf-test-' prefix to 'display_name' fields in online evaluator test configs to allow sweeper cleanup.
    - Added 'provider = google-beta' to resources in online evaluator tests to fix inconsistent dependency lock file error.

    TAG=agy
    CONV=7bc9c29e-b75e-4607-b4db-43cea40a3c95
@github-actions github-actions Bot requested a review from roaks3 June 18, 2026 21:09
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jun 18, 2026
@modular-magician

modular-magician commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 356 insertions(+)
google-beta provider View Diff 6 files changed, 2405 insertions(+)
terraform-google-conversion View Diff 1 file changed, 465 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_vertex_ai_online_evaluator (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_vertex_ai_online_evaluator" "primary" {
  cloud_observability {
    log_view   = # value needed
    trace_view = # value needed
  }
  metric_sources {
    metric_resource_name = # value needed
  }
}

Missing service labels

The following new resources do not have corresponding service labels:

  • google_vertex_ai_online_evaluator

If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels.
An override-missing-service-label label can be added to allow merging.

Test report

Analytics

Total Tests Passed Skipped Affected
101 95 4 2
Affected Service Packages
  • vertexai

Learn how VCR tests work


Step 1: Replaying Mode

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
  • TestAccVertexAIOnlineEvaluator_update
  • TestAccVertexAIOnlineEvaluator_vertexAiOnlineEvaluatorBasicExample

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccVertexAIOnlineEvaluator_update
❌ Error · Log - TestAccVertexAIOnlineEvaluator_vertexAiOnlineEvaluatorBasicExample

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@guvenenb, @roaks3 VCR tests complete for 1c349d6!

@roaks3

roaks3 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

update test looks like a field is trying to be updated that shouldn't?

=== CONT  TestAccVertexAIOnlineEvaluator_update
    resource_vertex_ai_online_evaluator_test.go:35: Step 1/4 error: After applying this test step, the non-refresh plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
        -/+ destroy and then create replacement
        
        Terraform will perform the following actions:
        
          # google_vertex_ai_online_evaluator.evaluator must be replaced
        -/+ resource "google_vertex_ai_online_evaluator" "evaluator" {
              ~ create_time     = "2026-06-18T21:35:29.127524Z" -> (known after apply)
              ~ id              = "projects/ci-test-project-188019/locations/us-central1/onlineEvaluators/7049681529206734848" -> (known after apply)
              ~ name            = "7049681529206734848" -> (known after apply)
              ~ state           = "ACTIVE" -> (known after apply)
              ~ state_details   = [] -> (known after apply)
              ~ update_time     = "2026-06-18T21:35:29.127524Z" -> (known after apply)
                # (5 unchanged attributes hidden)
        
              ~ cloud_observability {
                    # (2 unchanged attributes hidden)
        
                  + open_telemetry { # forces replacement
                      + semconv_version = "1.39.0" # forces replacement
                    }
        
                    # (1 unchanged block hidden)
                }
        
                # (2 unchanged blocks hidden)
            }
        
        Plan: 1 to add, 0 to change, 1 to destroy.
--- FAIL: TestAccVertexAIOnlineEvaluator_update (356.67s)

And the basic example probably needs either provider = google-beta, or the example might need min_version: beta, i forget exactly how those interact

- Add google_vertex_ai_online_evaluator to enrolled_teams.yml for service labeler.
- Add TestAccVertexAIOnlineEvaluator_full to cover cloud_observability and metric_sources.
- Implement helper to dynamically create/delete EvaluationMetric dependency in the test.

TAG=agy
CONV=7205c9b4-543f-4e5a-b743-93db32f7121c
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jun 18, 2026
- Mark openTelemetry field as ignore_read: true to prevent perpetual drift.
- Mark metricSources as immutable: true to align with backend API restrictions.
- Add provider = google-beta to basic example config.
- Add cloud_observability.0.open_telemetry to ImportStateVerifyIgnore in update test.
- Remove TestAccVertexAIOnlineEvaluator_full to avoid VCR recording issues and dependencies.

TAG=agy
CONV=af1d212f-1300-4b9f-ade0-e28655f4ecc7
@modular-magician modular-magician added service/aiplatform-agent-engine and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jun 19, 2026
@modular-magician

modular-magician commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 358 insertions(+)
google-beta provider View Diff 6 files changed, 2398 insertions(+)
terraform-google-conversion View Diff 1 file changed, 465 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_vertex_ai_online_evaluator (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_vertex_ai_online_evaluator" "primary" {
  cloud_observability {
    log_view   = # value needed
    trace_view = # value needed
  }
  metric_sources {
    metric_resource_name = # value needed
  }
}

Test report

Analytics

Total Tests Passed Skipped Affected
101 95 4 2
Affected Service Packages
  • vertexai

Learn how VCR tests work


Step 1: Replaying Mode

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
  • TestAccVertexAIOnlineEvaluator_update
  • TestAccVertexAIOnlineEvaluator_vertexAiOnlineEvaluatorBasicExample

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccVertexAIOnlineEvaluator_update
✅ Log TestAccVertexAIOnlineEvaluator_vertexAiOnlineEvaluatorBasicExample

🟢 All tests passed!

View the recording VCR build log or the debug logs folder for detailed results.

@guvenenb, @roaks3 VCR tests complete for 5a24c63!

- Add immutable: true to "metric" and "metricResourceName" fields under metric_sources.
- This ensures changing these fields forces resource replacement, aligning with API behavior.

TAG=agy
CONV=e140dd26-45cc-49c9-b656-0a71375a4aa7
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jun 19, 2026
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jun 19, 2026
@modular-magician

modular-magician commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 358 insertions(+)
google-beta provider View Diff 6 files changed, 2400 insertions(+)
terraform-google-conversion View Diff 1 file changed, 465 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_vertex_ai_online_evaluator (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_vertex_ai_online_evaluator" "primary" {
  cloud_observability {
    log_view   = # value needed
    trace_view = # value needed
  }
  metric_sources {
    metric_resource_name = # value needed
  }
}

Test report

Analytics

Total Tests Passed Skipped Affected
101 97 4 0
Affected Service Packages
  • vertexai

Learn how VCR tests work


Step 1: Replaying Mode

🟢 All tests passed in Replaying mode! No Recording was needed.

View the replaying VCR build log

@guvenenb, @roaks3 VCR tests complete for a5a761a!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants