-
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
Make tpgtools generate beta docs into GA as well for parity with mmv1. #5325
Conversation
@@ -48,7 +48,7 @@ func mergeResource(res *Resource, resources map[Version][]*Resource, version *Ve | |||
} | |||
return ga | |||
} | |||
beta.Description = "Beta only" | |||
beta.Description = fmt.Sprintf("Beta only: %s", beta.Description) |
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.
Honestly, I'm fairly certain that adding this as-is is worse than having nothing there- "DCL specification for X" is completely meaningless, and there is zero discoverability on what "DCL" means. We should update the description for the affected resources before this part of the change, at least.
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.
Agree - I didn't look at how bad those were. I'll put this change on hold until that's fixed.
tpgtools/main.go
Outdated
@@ -90,6 +90,12 @@ func main() { | |||
generateResourceFile(resource) | |||
generateSweeperFile(resource) | |||
generateResourceTestFile(resource) | |||
} | |||
// Website files are always generated for the beta version. | |||
for _, resource := range resources[BETA_VERSION] { |
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.
Can we guard this on just the GA version and used the specified version otherwise? w/ the alpha version, we'll want to generate the alpha website.
- substitution: "project" | ||
value: ":PROJECT" | ||
docs_value: "preexisting-project-to-monitor-with" |
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.
You mentioned offline that the DCL provided sample values, but I'm not seeing them in https://github.com/GoogleCloudPlatform/declarative-resource-client-library/blob/main/services/google/monitoring/samples/basic_monitored_project.yaml. Do they not exist? Keeping values for every field in every sample seems onerous.
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. |
40ea62b
to
f720a09
Compare
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceGoogleSQLCaCerts_basic|TestAccAssuredWorkloadsWorkload_BasicHandWritten|TestAccAssuredWorkloadsWorkload_FullHandWritten|TestAccCloudRunService_cloudRunServiceSqlExample|TestAccComputeFirewallPolicyRule_update|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccContainerNodePool_withWorkloadIdentityConfig|TestAccDataprocWorkflowTemplate_basic|TestAccEventarcTrigger_BasicHandWritten|TestAccMonitoringMonitoredProject_BasicMonitoredProject|TestAccOrgPolicyPolicy_EnforcePolicy|TestAccOrgPolicyPolicy_ProjectPolicy|TestAccOrgPolicyPolicy_FolderPolicy|TestAccOrgPolicyPolicy_OrganizationPolicy|TestAccPrivatecaCertificateTemplate_BasicCertificateTemplate|TestAccSQLDatabase_sqlDatabaseBasicExample|TestAccSqlDatabaseInstance_basicSecondGen|TestAccSqlDatabaseInstance_basicMSSQL|TestAccSqlDatabaseInstance_settings_basic|TestAccSqlDatabaseInstance_settings_deletionProtection|TestAccSqlDatabaseInstance_slave|TestAccSqlDatabaseInstance_diskspecs|TestAccSqlDatabaseInstance_maintenance|TestAccSqlDatabaseInstance_settings_upgrade|TestAccSqlDatabaseInstance_settingsDowngrade|TestAccSqlDatabaseInstance_authNets|TestAccSqlDatabaseInstance_multipleOperations|TestAccSqlDatabaseInstance_basic_with_user_labels|TestAccSqlDatabaseInstance_withPrivateNetwork|TestAccSqlDatabase_basic|TestAccSqlDatabase_update|TestAccSqlClientCert_mysql|TestAccSqlUser_postgresIAM You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=212770 |
Tests failed during RECORDING mode: TestAccOrgPolicyPolicy_EnforcePolicy|TestAccMonitoringMonitoredProject_BasicMonitoredProject|TestAccOrgPolicyPolicy_ProjectPolicy|TestAccEventarcTrigger_BasicHandWritten|TestAccAssuredWorkloadsWorkload_BasicHandWritten|TestAccAssuredWorkloadsWorkload_FullHandWritten|TestAccComputeFirewallPolicyRule_update|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccSqlDatabaseInstance_basicMSSQL|TestAccSqlUser_postgresIAM Please fix these to complete your PR |
Also, minor changes to make sure that the docs are a little bit better - allow overrides of documentation values, for instance. Also, includes the actual description of the resource, which, at the moment is not acceptable in the DCL. Will need to implement an override in the DCL.
fd498e8
to
6e96c44
Compare
Okay - as long as those tests pass overnight, should be good to review. I'll mark it non-draft after checking. |
Okay, this looks right to me. |
Assured workloads and eventarc still have messy docs. Fixing that on the DCL side involves diving into more complicated overrides. If you'll accept this (imo, clear improvement) as is, I'll fix that on our end separately, and we'll get the fix when it can be done on our end. |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccAssuredWorkloadsWorkload_BasicHandWritten|TestAccAssuredWorkloadsWorkload_FullHandWritten|TestAccCloudFunctionsFunction_vpcConnector|TestAccComputeInstanceFromMachineImage_basic|TestAccComputeInstanceFromMachineImage_overrideMetadataDotStartupScript|TestAccComputeInstanceFromMachineImage_diffProject|TestAccComputeRegionNetworkEndpointGroup_regionNetworkEndpointGroupAppengineExample|TestAccComputeServiceAttachment_serviceAttachmentBasicExampleUpdate|TestAccContainerNodePool_withWorkloadIdentityConfig|TestAccEventarcTrigger_BasicHandWritten|TestAccMonitoringMonitoredProject_BasicMonitoredProject|TestAccOrgPolicyPolicy_EnforcePolicy|TestAccOrgPolicyPolicy_FolderPolicy|TestAccOrgPolicyPolicy_ProjectPolicy|TestAccPrivatecaCertificateTemplate_BasicCertificateTemplate|TestAccSqlDatabaseInstance_withPrivateNetwork|TestAccSqlUser_postgresIAM You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=217340 |
There's a failure in TestAccEventarcTrigger_BasicHandWritten that appears related, btw! |
Nuts, thanks. |
GoogleCloudPlatform#5325) * Make tpgtools generate beta docs into GA as well for parity with mmv1. Also, minor changes to make sure that the docs are a little bit better - allow overrides of documentation values, for instance. Also, includes the actual description of the resource, which, at the moment is not acceptable in the DCL. Will need to implement an override in the DCL. * Generate reasonable documentation for autogenerated and handwritten tests. * Default to - instead of _ * Improve documentation further with links and guides.
Also, minor changes to make sure that the docs are a little bit better - allow overrides of documentation values, for instance.
Also, includes the actual description of the resource, which, at the moment is not acceptable in the DCL. Will need to implement an override in the DCL.
Fixes the worst of hashicorp/terraform-provider-google#10252, bringing the urgency down to "we need better docstrings for these fields". I'll get to that soon.
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)