Extend breaking change detector to work on new required and new optional with default#14059
Conversation
…toplevel optional with default
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_instance" "primary" {
boot_disk {
debug_test_new_optional_with_default = # value needed
initialize_params {
debug_test_new_required = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
}
Resource: resource "google_compute_instance_from_machine_image" "primary" {
boot_disk {
debug_test_new_optional_with_default = # value needed
initialize_params {
debug_test_new_required = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
}
Resource: resource "google_compute_instance_from_template" "primary" {
boot_disk {
debug_test_new_optional_with_default = # value needed
initialize_params {
debug_test_new_required = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
}
Resource: resource "google_compute_router_interface" "primary" {
debug_test_new_required = # value needed
}
Missing doc report (experimental)The following resources have fields missing in documents.
|
Tests analyticsTotal tests: 1199 Click here to see the affected service packages
Action takenFound 1115 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Breaking Change(s) DetectedThe following breaking change(s) were detected within your pull request.
If you believe this detection to be incorrect please raise the concern with your reviewer. Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_instance" "primary" {
boot_disk {
debug_test_new_optional_with_default = # value needed
initialize_params {
debug_test_new_required = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
}
Resource: resource "google_compute_instance_from_machine_image" "primary" {
boot_disk {
debug_test_new_optional_with_default = # value needed
initialize_params {
debug_test_new_required = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
}
Resource: resource "google_compute_instance_from_template" "primary" {
boot_disk {
debug_test_new_optional_with_default = # value needed
initialize_params {
debug_test_new_required = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
}
Resource: resource "google_compute_router_interface" "primary" {
debug_test_new_required = # value needed
}
Missing doc report (experimental)The following resources have fields missing in documents.
|
Tests analyticsTotal tests: 1199 Click here to see the affected service packages
Action takenFound 1115 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
| for field, fieldDiff := range resourceDiff.Fields { | ||
| for _, rule := range FieldDiffRules { | ||
| for _, message := range rule.Messages(resource, field, fieldDiff) { | ||
| for _, message := range rule.Messages(resource, field, fieldDiff, isPreExistingResource) { |
There was a problem hiding this comment.
Rather than passing a bool isPreExistingResource, what would you think of passing the entire resourceDiff object? That would be a simple change that would give us more flexibility for potentially introducing more complex logic in the future.
There was a problem hiding this comment.
changed to pass interface, would rather not pass entire object, difficult to unit test
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Breaking Change(s) DetectedThe following breaking change(s) were detected within your pull request.
If you believe this detection to be incorrect please raise the concern with your reviewer. Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_instance" "primary" {
boot_disk {
initialize_params {
debug_test_new_required = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_instance_from_machine_image" "primary" {
boot_disk {
initialize_params {
debug_test_new_required = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_instance_from_template" "primary" {
boot_disk {
initialize_params {
debug_test_new_required = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_router_interface" "primary" {
debug_test_new_required = # value needed
}
Missing doc report (experimental)The following resources have fields missing in documents.
|
Tests analyticsTotal tests: 1199 Click here to see the affected service packages
Action takenFound 1115 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Breaking Change(s) DetectedThe following breaking change(s) were detected within your pull request.
If you believe this detection to be incorrect please raise the concern with your reviewer. Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_instance" "primary" {
boot_disk {
initialize_params {
debug_test_new_nested_optional_with_default_nested = # value needed
debug_test_new_required_nested = # value needed
}
new_obj {
debug_test_new_nested_optional_with_default_nested_ignore = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_instance_from_machine_image" "primary" {
boot_disk {
initialize_params {
debug_test_new_nested_optional_with_default_nested = # value needed
debug_test_new_required_nested = # value needed
}
new_obj {
debug_test_new_nested_optional_with_default_nested_ignore = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_instance_from_template" "primary" {
boot_disk {
initialize_params {
debug_test_new_nested_optional_with_default_nested = # value needed
debug_test_new_required_nested = # value needed
}
new_obj {
debug_test_new_nested_optional_with_default_nested_ignore = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_router_interface" "primary" {
debug_test_new_required = # value needed
}
Missing doc report (experimental)The following resources have fields missing in documents.
|
Tests analyticsTotal tests: 1200 Click here to see the affected service packages
Found 1116 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Breaking Change(s) DetectedThe following breaking change(s) were detected within your pull request.
If you believe this detection to be incorrect please raise the concern with your reviewer. Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_instance" "primary" {
boot_disk {
initialize_params {
debug_test_new_nested_optional_with_default_nested = # value needed
debug_test_new_required_nested = # value needed
}
new_obj {
debug_test_new_nested_optional_with_default_nested_ignore = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_instance_from_machine_image" "primary" {
boot_disk {
initialize_params {
debug_test_new_nested_optional_with_default_nested = # value needed
debug_test_new_required_nested = # value needed
}
new_obj {
debug_test_new_nested_optional_with_default_nested_ignore = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_instance_from_template" "primary" {
boot_disk {
initialize_params {
debug_test_new_nested_optional_with_default_nested = # value needed
debug_test_new_required_nested = # value needed
}
new_obj {
debug_test_new_nested_optional_with_default_nested_ignore = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_router_interface" "primary" {
debug_test_new_required = # value needed
}
Missing doc report (experimental)The following resources have fields missing in documents.
|
Tests analyticsTotal tests: 1200 Click here to see the affected service packages
Found 1116 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
checks are failing due to noop virtual fields (will be removed before checkin) |
Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Breaking Change(s) DetectedThe following breaking change(s) were detected within your pull request.
If you believe this detection to be incorrect please raise the concern with your reviewer. Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_instance" "primary" {
boot_disk {
initialize_params {
debug_test_new_nested_optional_with_default_nested = # value needed
debug_test_new_required_nested = # value needed
}
new_obj {
debug_test_new_nested_optional_with_default_nested_ignore = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_instance_from_machine_image" "primary" {
boot_disk {
initialize_params {
debug_test_new_nested_optional_with_default_nested = # value needed
debug_test_new_required_nested = # value needed
}
new_obj {
debug_test_new_nested_optional_with_default_nested_ignore = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_instance_from_template" "primary" {
boot_disk {
initialize_params {
debug_test_new_nested_optional_with_default_nested = # value needed
debug_test_new_required_nested = # value needed
}
new_obj {
debug_test_new_nested_optional_with_default_nested_ignore = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_router_interface" "primary" {
debug_test_new_required = # value needed
}
Missing doc report (experimental)The following resources have fields missing in documents.
|
Tests analyticsTotal tests: 1204 Click here to see the affected service packages
Found 1120 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
| package breaking_changes | ||
|
|
||
| // MockSchemaDiff implements the diff.SchemaDiff interface for testing | ||
| type MockSchemaDiff struct { |
There was a problem hiding this comment.
I would prefer to not mock per go/choose-test-double?polyglot=go#prefer-real-implementations, but I'm not blocking on it.
There was a problem hiding this comment.
ack, this is checked upstream (parent package) in another integration test. I would like to keep these simple and relevant to the logic they need to check.
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Breaking Change(s) DetectedThe following breaking change(s) were detected within your pull request.
If you believe this detection to be incorrect please raise the concern with your reviewer. Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_instance" "primary" {
boot_disk {
initialize_params {
debug_test_new_nested_optional_with_default_nested = # value needed
debug_test_new_required_nested = # value needed
}
new_obj {
debug_test_new_nested_optional_with_default_nested_ignore = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_instance_from_machine_image" "primary" {
boot_disk {
initialize_params {
debug_test_new_nested_optional_with_default_nested = # value needed
debug_test_new_required_nested = # value needed
}
new_obj {
debug_test_new_nested_optional_with_default_nested_ignore = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_instance_from_template" "primary" {
boot_disk {
initialize_params {
debug_test_new_nested_optional_with_default_nested = # value needed
debug_test_new_required_nested = # value needed
}
new_obj {
debug_test_new_nested_optional_with_default_nested_ignore = # value needed
debug_test_new_required_nested_ignore = # value needed
}
}
debug_test_new_optional_with_default = # value needed
}
Resource: resource "google_compute_router_interface" "primary" {
debug_test_new_required = # value needed
}
Missing doc report (experimental)The following resources have fields missing in documents.
|
Tests analyticsTotal tests: 1204 Click here to see the affected service packages
Found 1120 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
29dd6c8
…nal with default (GoogleCloudPlatform#14059) Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
…nal with default (GoogleCloudPlatform#14059) Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
…nal with default (GoogleCloudPlatform#14059) Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
…nal with default (GoogleCloudPlatform#14059) Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
…nal with default (GoogleCloudPlatform#14059) Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
…nal with default (GoogleCloudPlatform#14059) Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
…nal with default (GoogleCloudPlatform#14059) Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
…nal with default (GoogleCloudPlatform#14059) Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
…nal with default (GoogleCloudPlatform#14059) Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
closes b/300515447
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.