From af8d75bc7f81d2073931e776cba3fa9059cf2d5d Mon Sep 17 00:00:00 2001 From: Wojciech Trocki Date: Wed, 23 Aug 2023 12:20:17 +0200 Subject: [PATCH] fix: add instructions for updates of the Atlas SDK (#1406) --- CONTRIBUTING.md | 18 +++++++++++++++++- GNUmakefile | 6 ++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2fa48faa1d..5748f2f078 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -266,7 +266,6 @@ To do this you can: - In our documentation, when a resource field allows a maximum of only one item, we do not format that field as an array. Instead, we create a subsection specifically for this field. Within this new subsection, we enumerate all the attributes of the field. Let's illustrate this with an example: [cloud_backup_schedule.html.markdown](https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/website/docs/r/cloud_backup_schedule.html.markdown?plain=1#L207) - ## PR Title Format We use [*Conventional Commits*](https://www.conventionalcommits.org/): - `fix: description of the PR`: a commit of the type fix patches a bug in your codebase (this correlates with PATCH in Semantic Versioning). @@ -286,3 +285,20 @@ Examples: - `fix!: description of the ticket` - If the PR has `BREAKING CHANGE`: in its description is a breaking change - `remove!: description of the PR`: The commit removes a feature from the product. Typically features are deprecated first for a period of time before being removed. Removing a feature is a breaking change (correlating with MAJOR in Semantic Versioning). + +## Discovering New API features + +Most of the new features of the provider are using [atlas-sdk](https://github.com/mongodb/atlas-sdk-go) +SDK is updated automatically, tracking all new Atlas features. + +### Updating Atlas SDK + +To update Atlas SDK run: + +```bash +make update-atlas-sdk +``` + +> NOTE: Update mechanism is only needed for major releases. Any other releases will be supported by dependabot. + +> NOTE: Command can make import changes to +500 files. Please make sure that you perform update on main branch without any uncommited changes. diff --git a/GNUmakefile b/GNUmakefile index 122d88fbcc..fb1c75473e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -134,3 +134,9 @@ link-git-hooks: ## Install git hooks @echo "==> Installing all git hooks..." find .git/hooks -type l -exec rm {} \; find .githooks -type f -exec ln -sf ../../{} .git/hooks/ \; + +.PHONY: update-atlas-sdk +update-atlas-sdk: ## Update the atlas-sdk dependency + go install github.com/icholy/gomajor@v0.9.5 + ## Fetch the latest major version and update imports. + gomajor get go.mongodb.org/atlas-sdk/v20230201001@latest