Convert DCL resources to handwritten#16759
Convert DCL resources to handwritten#16759SirGitsalot wants to merge 7 commits intoGoogleCloudPlatform:mainfrom
Conversation
…te meta.yaml attribution
|
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: 6120 Click here to see the affected service packages
Action takenFound 23 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🟢 Tests passed during RECORDING mode: 🔴 Tests failed when rerunning REPLAYING mode: Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made. Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer. 🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
This is a very large change that should (assuming everything is correct!) have no effect on the downstreams. The affected resources are:
The changes here can be broken down into a few groups:
The first group was by running
tpgtoolsone last time but pointing the output back tomagic-modules/mmv1/terraform/services/...instead of the downstreams. That's what produced theresource_[name].go[.tmpl],resource_[name]_generated_test.go[.tmpl], andresource_[name]_sweeper.go[.tmpl]files. Looking at the provider diffs for these should (and does!) show only changes fromType: DCLtoType: Handwrittenand import path changes.Similarly, docs were generated one last time, redirected into
magic-modules/mmv1/terraform/website/docs/r/.github.com/GoogleCloudPlatform/declarative-resource-client-libraryis no longer a dependency. Shared code from itsdclsubdirectory was copied intomagic-modules/mmv1/terraform/tpgdclresource. Product-specific and resource-specific code (client.go,[resource].go, and[resource]_internal.go) were moved into the appropriate directory undermagic-modules/mmv1/terraform/services/. Reviewing the PR myself I see that[resource]_schema.gowas also copied, but I'm pretty sure that's not needed so I'll try removing those. The DCL kept the GA and beta versions of these files in separate directories. In their Magic Modules incarnation, they're now single file templates that have been merged with{{- if ne $.TargetVersionName "ga" }}separating diffs. For files where GA and beta were the same, templates aren't used.The root Makefile no longer touches the
tpgtoolsdirectory.Magic Modules developer docs have been updated to remove references to the DCL.
The
tpgtoolsdirectory is not deleted in this PR because there's at least one lingering reference that I'm not sure what to replace with. Plus, this PR is already ginormous and it doesn't hurt to delete the directory in a subsequent PR.I'm opening this PR in draft mode to make a self review easier, and I already see some changes that need to be made ( the aforementioned
[resource]_schema.goremoval, plus updatingmagic-modules/mmv1/terraform/go.[mod|sum]to actually remove thegithub.com/GoogleCloudPlatform/declarative-resource-client-librarydep).