Skip to content

Commit

Permalink
fix: add instructions for updates of the Atlas SDK (#1406)
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki committed Aug 23, 2023
1 parent b7a2763 commit af8d75b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
18 changes: 17 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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.
6 changes: 6 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit af8d75b

Please sign in to comment.