-
Couldn't load subscription status.
- Fork 208
chore: Have enable-autogen generate all serviceapi resources #3410
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
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.
Pull Request Overview
This PR updates the enable-autogen target to automatically generate all serviceapi resources instead of relying on a hardcoded list.
- Replaces the hardcoded resource list with a dynamic loop that scans the internal/serviceapi directory
- Adjusts the sed substitution order in the add-lines target and runs goimports after modifications
Comments suppressed due to low confidence (2)
Makefile:216
- The sed substitution order was changed from inserting the added text after the marker to before it. Please confirm that this reversal is intentional, as it could affect the order in which resources are defined.
sed 's/${find}/${add}${find}/' "${filename}" > "file.tmp"
Makefile:203
- Verify that the newline escape sequence (\n) in the 'add' argument behaves as expected across environments. If it does not produce the intended result, consider adjusting the syntax or approach.
$(foreach resource,$(resources),make add-lines filename=${filename} find="project.Resource," add="$(resource).Resource,\n";)
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.
nice
* fix: Update error message formatting in advanced cluster resource (#3352) * doc: Upgrade guide for v1.35.0 (#3360) * upgrade guide * Update docs/guides/1.35.0-upgrade-guide.md Co-authored-by: John Williams <55147273+jwilliams-mongo@users.noreply.github.com> --------- Co-authored-by: John Williams <55147273+jwilliams-mongo@users.noreply.github.com> * chore: Updates examples link in index.md for v1.35.0 release * chore: Updates CHANGELOG.md header for v1.35.0 release * chore: Update Go version to 1.24.3 in go.mod (#3358) * chore: Clean ignore file (#3357) * ignore Cursor rule files * simplify git ignore * add .DS_Store and *~ * ignore any env file * chore: Implement better logging on network issues (#3359) * add logs * adjust doc * add error details * run acc tests when config folder changes * use NewTransport * improve doc * add config acc tests * don't log headers * make tests less verbose * remove header example from doc * remove headers from tests * rename NewNetworkLoggingTransport to NewTransportWithNetworkLogging * remove name * undo realm changes * log Digest challenge requests * note about logging.NewTransport * adjust doc * fix doc examples * enable network logging only when TF loglevel is debug or higher * fix TestAccNetworkLogging * TestNetworkLoggingTransport_Disabled * chore: Bump github.com/pb33f/libopenapi from 0.21.12 to 0.22.0 (#3356) Bumps [github.com/pb33f/libopenapi](https://github.com/pb33f/libopenapi) from 0.21.12 to 0.22.0. - [Release notes](https://github.com/pb33f/libopenapi/releases) - [Commits](pb33f/libopenapi@v0.21.12...v0.22.0) --- updated-dependencies: - dependency-name: github.com/pb33f/libopenapi dependency-version: 0.22.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: Realm Client Auth Token Overwritten by Transport Assignment (#3362) * don't use custom transport for realm * changelog entry * changelog * use baseTransport instead of default * add basic test that expects 404 and makes sure realm client works * correct projectID * add realm url in GHA * chore: Updates CHANGELOG.md for #3362 * chore: Updates examples link in index.md for v1.35.1 release * chore: Updates CHANGELOG.md header for v1.35.1 release * build(deps): bump go.mongodb.org/atlas-sdk (#3365) Co-authored-by: lantoli <430982+lantoli@users.noreply.github.com> * doc: Clarify data source source documentation when moving to asymmetric clusters (#3366) * TEMPORARY: some change * adjust guides * Revert "TEMPORARY: some change" This reverts commit 0441ce3. * add comment to example using count * apply fix suggested by Copilot * apply feedback moving to subsection * apply feedback in docs * build(deps): bump go.mongodb.org/atlas-sdk (#3367) Co-authored-by: wtrocki <981838+wtrocki@users.noreply.github.com> * remove reference to private_key from api_key datasource (#3368) Co-authored-by: Maxence <max@23.tf> * chore: Bump github.com/pb33f/libopenapi from 0.22.0 to 0.22.2 (#3369) Bumps [github.com/pb33f/libopenapi](https://github.com/pb33f/libopenapi) from 0.22.0 to 0.22.2. - [Release notes](https://github.com/pb33f/libopenapi/releases) - [Commits](pb33f/libopenapi@v0.22.0...v0.22.2) --- updated-dependencies: - dependency-name: github.com/pb33f/libopenapi dependency-version: 0.22.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: Update Terraform packages (#3370) * chore: Bump github.com/hashicorp/terraform-plugin-testing Bumps [github.com/hashicorp/terraform-plugin-testing](https://github.com/hashicorp/terraform-plugin-testing) from 1.12.0 to 1.13.1. - [Release notes](https://github.com/hashicorp/terraform-plugin-testing/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-testing/blob/main/CHANGELOG.md) - [Commits](hashicorp/terraform-plugin-testing@v1.12.0...v1.13.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-testing dependency-version: 1.13.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * upgrade github.com/hashicorp/terraform-plugin-go to v0.28.0 * upgrade github.com/hashicorp/terraform-plugin-mux to v0.20 * upgrade github.com/hashicorp/terraform-plugin-framework to v1.15.0 * go mod tidy * upgrade github.com/go-jose/go-jose/v4 to v4.0.5 * remove unneeded exclude * fix comment --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: Adds support for streams accountDetails endpoint (#3364) * chore: Updates CHANGELOG.md for #3364 * chore: Create a GitHub Action to create a PR from master to dev branch weekly (#3371) * skeleton * remove unneeded param * temporarily run in the PR * name the matrix jobs only with the branch name * slack message * simplify if * Revert "simplify if" This reverts commit db27365. * one-line Slack message * remove PR trigger * remove icon in Slack messages * chore: Run Test Suite in dev branch weekly (#3373) * run 2.0.0 branch on Fridays * TEMPORARY: don't run all test suite * fix bool comparison * remove test from name to make it shorter * empty ref if not a Friday * TEMPORARY: enable days * Revert "TEMPORARY: enable days" This reverts commit b6bd4c3. * Revert "TEMPORARY: don't run all test suite" This reverts commit 7e4ed93. * remove incorrect action link in Slack message * chore: Implement the GitHub Action to create a PR from master to dev branch weekly (#3377) * create PR with changes * TEMPORARY: create draft PRs * improve messages * improve error handling * config git email * remove temporary changes * chore: Onboard Silkbomb in the CI (#3374) * generate purls * check purls * run acceptance test only after check-purls * gen-purls before checking * generate sbom script * make target check purls * upload sbom to kondukto and release artifacts * remove comment * double quotes shellcheck * move gen purls to script * update purls.txt on dependabot PRs * doc: Fix use of variables in documentation (#3382) * API_KEY_ID and ORG_ID * 0.8.0 guide * EAR example * chore: Generate SSDLC report after release (#3383) * generate ssdlc report * add missing target shell * fix issues with generation * Update scripts/gen-ssdlc-report.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/workflows/ssdlc-report.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * remove double tab * fix commit message --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix env string (#3385) * chore: Updates Atlas Go SDK (#3386) * build(deps): bump go.mongodb.org/atlas-sdk * update purl --------- Co-authored-by: wtrocki <981838+wtrocki@users.noreply.github.com> Co-authored-by: Oriol Arbusi Abadal <oriol.abadal@mongodb.com> * chore: Updates purls automatically for SDK update (#3387) * update purls for sdk update * check purls after build * remove array * chore: Moves SSDLC report generation to release action (#3388) * chore: Generate augmented SBOM on demand (#3384) * generate augmented SBOM on demand * Update .github/workflows/generate-augmented-sbom.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * remove unncessary step name * unify into a script --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: Add code explanation in some long-running operations (#3390) * document project_ip_access_list Create * no need to wait in network_container Delete * Revert "no need to wait in network_container Delete" This reverts commit 1e4224f. * document network_container Delete * remove timeouts attribute in mongodbatlas_privatelink_endpoint_service_data_federation_online_archive * Revert "remove timeouts attribute in mongodbatlas_privatelink_endpoint_service_data_federation_online_archive" This reverts commit bff9dc0. * comment timeouts in mongodbatlas_privatelink_endpoint_service_data_federation_online_archive * doc: Adds 1.36.0 upgrade guide (#3392) * chore: Updates examples link in index.md for v1.36.0 release * chore: Updates CHANGELOG.md header for v1.36.0 release * chore: Updates repository to use supported Terraform versions (#3401) Co-authored-by: maastha <122359335+maastha@users.noreply.github.com> * chore: Bump github.com/cloudflare/circl from 1.6.0 to 1.6.1 (#3393) Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/cloudflare/circl/releases) - [Commits](cloudflare/circl@v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: github.com/cloudflare/circl dependency-version: 1.6.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: Bump github.com/pb33f/libopenapi from 0.22.2 to 0.22.3 (#3394) Bumps [github.com/pb33f/libopenapi](https://github.com/pb33f/libopenapi) from 0.22.2 to 0.22.3. - [Release notes](https://github.com/pb33f/libopenapi/releases) - [Commits](pb33f/libopenapi@v0.22.2...v0.22.3) --- updated-dependencies: - dependency-name: github.com/pb33f/libopenapi dependency-version: 0.22.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: Generates SSDLC report and fixes GHA (#3400) * generate ssdlc report and fix GHA * test * Revert "test" This reverts commit 183df49. * chore: Removes PURLS from repo and instead generates the PURL only when doing the release (#3402) * removes PURLS from repo * remove unnecessary action * get the full history (#3398) * chore: Bump github.com/spf13/cast from 1.8.0 to 1.9.2 (#3395) Bumps [github.com/spf13/cast](https://github.com/spf13/cast) from 1.8.0 to 1.9.2. - [Release notes](https://github.com/spf13/cast/releases) - [Commits](spf13/cast@v1.8.0...v1.9.2) --- updated-dependencies: - dependency-name: github.com/spf13/cast dependency-version: 1.9.2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * doc refresh logic in custom_db_role (#3405) * chore: Avoids flaky tests by sleeping 30s (#3403) * test: avoid flaky tests by sleeping 30s * Update internal/service/backupcompliancepolicy/resource_backup_compliance_policy_test.go Co-authored-by: Leo Antoli <430982+lantoli@users.noreply.github.com> --------- Co-authored-by: Leo Antoli <430982+lantoli@users.noreply.github.com> * doc: Adds example for `mongodbatlas_backup_compliance_policy` (#3391) * doc: Initial example for mongodbatlas_backup_compliance_policy * doc: Add links to mongodbatlas_backup_compliance_policy example * chore: fix lint error and example * fix: improve v2 directory detection logic in tf-validate script * fix shell errors * address PR comments * doc: Adds module example * fix tf errors * chore: fix tf-validate script * address PR comments * chore: fix use v2 in the internal cluster_with_schedule module * docs feedback * doc: Simplify module example * doc: Apply docs feedback * pr suggestions * main.tf fixes * doc: Add important notes regarding Backup Compliance Policy deletion considerations * doc: Update support links * doc: Clarify note on using Terraform Module for deletion methods * add links from cluster docs to example * apply PR comments * doc: Add reference to Terraform issue for moved and removed blocks in backup compliance policy example * test: Add dry run option to prevent project deletion in TestSingleProjectRemoval (#3406) * doc: Removes default values for `region` in `mongodbatlas_third_party_integration` (#3407) * chore: Make action to run script and commit changes reusable outside of repo (#3404) * make action reusable outside of repo * testing branch * fixes setupgo * repo-path input * add missing fi * testing changes * adds checkout before using composite action * remove testing branch * remove testing changelog * update to Go 1.24.4 (#3408) * build(deps): bump go.mongodb.org/atlas-sdk (#3411) Co-authored-by: wtrocki <981838+wtrocki@users.noreply.github.com> * have enable-autogen generate all serviceapi resources (#3410) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Leo Antoli <430982+lantoli@users.noreply.github.com> Co-authored-by: Oriol <oriol.abadal@mongodb.com> Co-authored-by: John Williams <55147273+jwilliams-mongo@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: wtrocki <981838+wtrocki@users.noreply.github.com> Co-authored-by: Maxence <max@23.tf> Co-authored-by: Kush Patel <66638373+kpatel71716@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Espen Albert <EspenAlbert@users.noreply.github.com> Co-authored-by: maastha <122359335+maastha@users.noreply.github.com>
Description
Have
enable-autogenmake goal generate allserviceapiresources, instead of having a hardcoded list. This is part of the spike: WRITING-29828.Link to any related issue(s): CLOUDP-325279
Type of change:
Required Checklist:
Further comments
Example of changes in provider.go:
