-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add NetworkConfig and NetworkConfigs to TPU v2 QueuedResource #12482
base: main
Are you sure you want to change the base?
Conversation
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @melinath, 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. |
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_tpu_v2_queued_resource" "primary" {
tpu {
node_spec {
node {
network_configs {
can_ip_forward = # value needed
enable_external_ips = # value needed
network = # value needed
queue_count = # value needed
subnetwork = # value needed
}
}
}
}
}
|
Tests analyticsTotal tests: 7 Click here to see the affected service packages
🔴 Tests were added that are skipped in VCR:
View the build log |
Hi @melinath, it's been about two business days and wanted to see if you could please take a look? I was aiming to merge this change prior to the cut for the next release. |
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.
This seems straightforward; just have one question below. I'll also need to manually run a test since it's skipped in VCR.
description: | | ||
Network configurations for the TPU node. | ||
immutable: true | ||
default_from_api: true |
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.
default_from_api has a couple drawbacks:
- Users won't be able to know accurate information about the end state of the resource (even if it could be known)
- Users can't set the field to its empty/zero value.
I just want to double-check that this field (and the rest marked with default_from_api) don't have other options?
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.
Thanks for highlighting. The network
and subnetwork
fields do get a default value from the API if not set. Consequently, those are subfields of networkConfig
, which has subfields where some have API defaults and some do not, so I set networkConfig
to get its default from the API so that its subfields like network
and subnetwork
can get these default values. This is also the case for a similar resource TPUv2 VM, where networkConfig
has default_from_api: true
and has been working as expected.
I double checked queueCount
and that does not get a default value from the TPU API, so I removed default_from_api
from the queueCount
subfield here and below.
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_tpu_v2_queued_resource" "primary" {
tpu {
node_spec {
node {
network_configs {
can_ip_forward = # value needed
enable_external_ips = # value needed
network = # value needed
queue_count = # value needed
subnetwork = # value needed
}
}
}
}
}
|
Thank you for the manual test run. I'm not sure I have proper permissions to view the results, can you let me know if there's any issues or actions I need to take, or can you let me know the best way to setup my account and get permissions to view the test at this link? When I try to login via GitHub, it says |
Tests analyticsTotal tests: 7 Click here to see the affected service packages
🔴 Tests were added that are skipped in VCR:
View the build log |
Sorry, we can't grant access to the manual runs due to the platform they run on. |
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.
Sorry for not catching this sooner - it looks like we're missing tests for the network_configs
field: #12482 (comment) Could you add them?
TestAccTpuV2QueuedResource_tpuV2QueuedResourceFullExample passed though and that all looks good! |
No worries and sounds good, just wanted to make sure there was no action needed from me at that point!
It's a copy of the existing
Great, thanks for running this! |
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, a separate test for the networkConfigs field would be great. Even though it's a duplicate, we should have tests to cover it.
/gcbrun |
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_tpu_v2_queued_resource" "primary" {
tpu {
node_spec {
node {
network_configs {
can_ip_forward = # value needed
enable_external_ips = # value needed
network = # value needed
queue_count = # value needed
subnetwork = # value needed
}
}
}
}
}
|
Tests analyticsTotal tests: 8 Click here to see the affected service packages
🔴 Tests were added that are skipped in VCR:
View the build log |
mmv1/templates/terraform/examples/tpu_v2_queued_resource_network_configs.tf.tmpl
Outdated
Show resolved
Hide resolved
…rk_configs.tf.tmpl Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
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.
|
Tests analyticsTotal tests: 8 Click here to see the affected service packages
🔴 Tests were added that are skipped in VCR:
View the build log |
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.
Manual test run failed with:
resource_tpu_v2_queued_resource_generated_test.go:169: Step 1/2 error: Error running apply: exit status 1
Error: Error creating QueuedResource: googleapi: Error 400: Invalid JSON payload received. Unknown name "networkConfigs" at 'queued_resource.tpu.node_spec[0].node': Cannot find field.
Details:
[
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name \"networkConfigs\" at 'queued_resource.tpu.node_spec[0].node': Cannot find field.",
"field": "queued_resource.tpu.node_spec[0].node"
}
]
}
]
with google_tpu_v2_queued_resource.qr,
on terraform_plugin_test.tf line 2, in resource "google_tpu_v2_queued_resource" "qr":
2: resource "google_tpu_v2_queued_resource" "qr" {
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 need to remove the unreleased field so that it's safe to add the field that's already supported in the API
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'm not able to modify the PR myself, so I don't think it's going possible to get this into a mergeable state today. We may as well wait for the networkConfigs field to be present in the API.
Add NetworkConfig and NetworkConfigs fields. NetworkConfigs (array) and NetworkConfig (singular) conflict. NetworkConfigs should be the field to specify multiple NetworkConfig, so I copied over the NetworkConfig NestedObject properties to its array form, NetworkConfigs.