-
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
Re-add monitoring monitored project, without metrics scope resource #5235
Conversation
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.
Seems like the Magician ate an import in tpgb, it may need a kick (making some changes'll do it)
@@ -110,14 +110,18 @@ func ConvertSampleJSONToHCL(resourceType string, version string, b []byte) (stri | |||
{{- else }} | |||
// If not found in sample version, fallthrough to GA | |||
switch resourceType { | |||
{{- range $res := $resList }} | |||
{{- range $res := $resList }} |
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.
{{- range $res := $resList }} | |
{{- range $res := $resList }} |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
1 similar comment
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccMonitoringMonitoredProject_BasicMonitoredProject You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=207234 |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
- type: APPEND_TO_BASE_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 think the need for this override is a sign that the DCL misrepresented the API. This means that to override the endpoint- a DCL feature- users need to create two different monitoring clients and pick the right one depending on the resource, with no external indicator which one should get chosen.
This is non-blocking because this code was already reviewed in an earlier iteration, although I would have blocked on this otherwise.
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 disagree - I think this is an implication of Terraform's pre-existing choice about how to handle the monitoring API having 2 GA versions and that it won't come up in other APIs and also wouldn't if TF didn't have monitoring resources already.
But we argued about this with Scott, thanks for letting that decision stand. I'll remember that we should re-discuss this with you personally if it ever matters in the future. Monitoring may be singularly weird on this one.
return nil | ||
} | ||
{{- end}} | ||
skip, err := {{$.SkipDeleteFunction}}(config, obj) |
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 the formatting fix!
Great - upgraded the DCL in another PR so we do need to re-push those, but that should be it and we can merge after that. I'll push that now. |
I'll go ahead and let that finish before merging but it should be fine. |
Okay, changed my mind - tired of waiting for test runs to finish and getting merge conflicts on the go.mod again. Going to resolve that merge conflict and submit without waiting. |
* Added monitoring metrics scope and monitored project resources. * Ran make upgrade-dcl * Fixed indentation * Copied tpgtools go.sum lines into mmv1 go.sum. * Apply suggestions from code review Co-authored-by: Scott Suarez <[email protected]> * Attempted to fix strange downstream change in iam.go. * Added missing custom serializer to GA version, upgraded DCL again. * Update ID format so import is possible. Co-authored-by: Scott Suarez <[email protected]> Co-authored-by: Nathan Mckinley <[email protected]>
fcb771b
to
761a587
Compare
…oogleCloudPlatform#5235) * Added monitoring metrics scope and monitored project resources. (GoogleCloudPlatform#5218) * Added monitoring metrics scope and monitored project resources. * Ran make upgrade-dcl * Fixed indentation * Copied tpgtools go.sum lines into mmv1 go.sum. * Apply suggestions from code review Co-authored-by: Scott Suarez <[email protected]> * Attempted to fix strange downstream change in iam.go. * Added missing custom serializer to GA version, upgraded DCL again. * Update ID format so import is possible. Co-authored-by: Scott Suarez <[email protected]> Co-authored-by: Nathan Mckinley <[email protected]> * Revert reversion of metrics scopes * Remove scope from provider. * Remove from GA, remove metrics scope from provider. * Added missing strings import for mmv1 dataproc cluster test. * Ran make serialize. * Removed unneeded overrides. Re-ran make serialize. * Removed undeletable override. Co-authored-by: Thomas Rodgers <[email protected]> Co-authored-by: Scott Suarez <[email protected]>
This is an unclean revert of #5229, which is itself a clean revert of #5218.
The unclean part is commit aa2a676 (edit to add: also aa40f0a) - which, if you like, you can review instead of re-looking at all the files in this, since almost none of them needed to change.
The only difference is that this does not include metrics scope, which was a no-op resource (not even a useful data source), now that we have extracted monitored project as a fine-grained resource.
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)