From b76187bffac36d518afffb2e2e2cb3b512fe56e7 Mon Sep 17 00:00:00 2001 From: Marco Suma Date: Wed, 17 Apr 2024 07:56:50 +0200 Subject: [PATCH 1/6] chore: Minor documentation refactoring on the new changelog process. --- contributing/changelog-process.md | 22 +++++++++++----------- tools/check-changelog-entry-file/main.go | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contributing/changelog-process.md b/contributing/changelog-process.md index 38ebc46db6..f9b0537742 100644 --- a/contributing/changelog-process.md +++ b/contributing/changelog-process.md @@ -1,9 +1,9 @@ # Changelog Process +- [PR Changelog check](#pr-changelog-check) - [Changelog format](#changelog-format) - [Changelog entry guidelines](#changelog-entry-guidelines) - [Script for creating changelog entry files](#script-for-creating-changelog-entry-files) -- [PR Changelog check](#pr-changelog-check) - [Unreleased section of CHANGELOG.md automatic update](#unreleased-section-of-CHANGELOG.md-automatic-update) HashiCorp’s open-source projects have always maintained user-friendly, readable CHANGELOG.md that allow users to tell at a glance whether a release should have any effect on them, and to gauge the risk of an upgrade. @@ -12,6 +12,16 @@ We use the [go-changelog](https://github.com/hashicorp/go-changelog) to generate `@mongodb/docs-cloud-team` will be required reviewers for new changelog entry files contained in a Pull Request. We will wait up to 24 hours for a review, and after that proceed with the merge. Exceptions for merging ahead of the 24 hours may also apply. +## Script for creating changelog entry files + +A script is defined to guide the creation of new entry files, simplifying the process and avoiding errors. You can invoke the script using the following make command: + +``` +make generate-changelog-entry +``` + +- The `subcategory` input prompt refers to the prefix of the changelog entry, used for specifying the relevant resource/data source when needed (e.g. data-source/mongodbatlas_project) + ## Changelog format The changelog format requires an entry in the following format, where HEADER corresponds to the changelog category, and the entry is the changelog entry itself. The entry should be included in a file in the `.changelog` directory with the naming convention `{PR-NUMBER}.txt`. For example, to create a changelog entry for pull request 1234, there should be a file named `.changelog/1234.txt`. @@ -136,16 +146,6 @@ data-source/mongodbatlas_search_indexes: Removes `page_num` and `items_per_page` - Code refactoring - Dependency updates -## Script for creating changelog entry files - -A script is defined to guide the creation of new entry files, simplifying the process and avoiding errors. You can invoke the script using the following make command: - -``` -make generate-changelog-entry -``` - -- The `subcategory` input prompt refers to the prefix of the changelog entry, used for specifying the relevant resource/data source when needed (e.g. data-source/mongodbatlas_project) - ## PR Changelog check A PR check is included to validate the changelog entry file. diff --git a/tools/check-changelog-entry-file/main.go b/tools/check-changelog-entry-file/main.go index 73c60949ed..a1603ad299 100644 --- a/tools/check-changelog-entry-file/main.go +++ b/tools/check-changelog-entry-file/main.go @@ -46,7 +46,7 @@ func main() { return } - log.Fatalf("Consider using label %s if this PR doesn't need a changelog entry file. Read contributing guides for more info.\nChangelog file not found: %s, err: %v", skipLabelName, filePath, errFile) + log.Fatalf("Changelog file %s not found due to the following reason: %v.\nHave you ran the `make generate-changelog-entry` command?\nIf this PR doesn't need a changelog entry file, Consider using label %s.\nRead contributing guides (https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/contributing/changelog-process.md) for more info.", filePath, errFile, skipLabelName) } func validateChangelog(filePath, body string) { From cd19af62846f62ad26373ab15b4aed183dac6e22 Mon Sep 17 00:00:00 2001 From: Marco Suma Date: Wed, 17 Apr 2024 08:08:45 +0200 Subject: [PATCH 2/6] minor fix. --- tools/check-changelog-entry-file/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check-changelog-entry-file/main.go b/tools/check-changelog-entry-file/main.go index a1603ad299..838e4de695 100644 --- a/tools/check-changelog-entry-file/main.go +++ b/tools/check-changelog-entry-file/main.go @@ -46,7 +46,7 @@ func main() { return } - log.Fatalf("Changelog file %s not found due to the following reason: %v.\nHave you ran the `make generate-changelog-entry` command?\nIf this PR doesn't need a changelog entry file, Consider using label %s.\nRead contributing guides (https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/contributing/changelog-process.md) for more info.", filePath, errFile, skipLabelName) + log.Fatalf("Changelog file %s not found due to the following reason: %v.\nHave you ran the `make generate-changelog-entry` command?\nIf this PR doesn't need a changelog entry file, consider using label %s.\nRead contributing guides (https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/contributing/changelog-process.md) for more info.", filePath, errFile, skipLabelName) } func validateChangelog(filePath, body string) { From 699e58fd4474767b8d846a3434e6f5b90245759d Mon Sep 17 00:00:00 2001 From: Marco Suma Date: Wed, 17 Apr 2024 12:32:55 +0200 Subject: [PATCH 3/6] fix headline. --- contributing/changelog-process.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contributing/changelog-process.md b/contributing/changelog-process.md index f9b0537742..187fcd08d2 100644 --- a/contributing/changelog-process.md +++ b/contributing/changelog-process.md @@ -1,9 +1,9 @@ # Changelog Process -- [PR Changelog check](#pr-changelog-check) +- [Script for creating changelog entry files](#script-for-creating-changelog-entry-files) - [Changelog format](#changelog-format) - [Changelog entry guidelines](#changelog-entry-guidelines) -- [Script for creating changelog entry files](#script-for-creating-changelog-entry-files) +- [PR Changelog check](#pr-changelog-check) - [Unreleased section of CHANGELOG.md automatic update](#unreleased-section-of-CHANGELOG.md-automatic-update) HashiCorp’s open-source projects have always maintained user-friendly, readable CHANGELOG.md that allow users to tell at a glance whether a release should have any effect on them, and to gauge the risk of an upgrade. From a60ae7145e2869ca4c42566493a473160f651199 Mon Sep 17 00:00:00 2001 From: Marco Suma Date: Wed, 17 Apr 2024 12:34:21 +0200 Subject: [PATCH 4/6] temp change to be reverted. --- .../service/maintenancewindow/resource_maintenance_window.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/maintenancewindow/resource_maintenance_window.go b/internal/service/maintenancewindow/resource_maintenance_window.go index 533bcfc1a7..ff10f8df11 100644 --- a/internal/service/maintenancewindow/resource_maintenance_window.go +++ b/internal/service/maintenancewindow/resource_maintenance_window.go @@ -82,7 +82,7 @@ func Resource() *schema.Resource { "auto_defer_once_enabled": { Type: schema.TypeBool, Optional: true, - Computed: true, + // Computed: true, -- just a temp change to trigger changelog error }, }, } From f821b4b826d2625a23766c20494f6725f66c32df Mon Sep 17 00:00:00 2001 From: Marco Suma Date: Wed, 17 Apr 2024 12:39:00 +0200 Subject: [PATCH 5/6] reverts previous change. --- .../service/maintenancewindow/resource_maintenance_window.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/maintenancewindow/resource_maintenance_window.go b/internal/service/maintenancewindow/resource_maintenance_window.go index ff10f8df11..533bcfc1a7 100644 --- a/internal/service/maintenancewindow/resource_maintenance_window.go +++ b/internal/service/maintenancewindow/resource_maintenance_window.go @@ -82,7 +82,7 @@ func Resource() *schema.Resource { "auto_defer_once_enabled": { Type: schema.TypeBool, Optional: true, - // Computed: true, -- just a temp change to trigger changelog error + Computed: true, }, }, } From b1f0e8d51c3352bce9822359023cf7d4e293fcfd Mon Sep 17 00:00:00 2001 From: Marco Suma Date: Wed, 17 Apr 2024 17:08:46 +0200 Subject: [PATCH 6/6] Update tools/check-changelog-entry-file/main.go --- tools/check-changelog-entry-file/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check-changelog-entry-file/main.go b/tools/check-changelog-entry-file/main.go index 838e4de695..22377c6889 100644 --- a/tools/check-changelog-entry-file/main.go +++ b/tools/check-changelog-entry-file/main.go @@ -46,7 +46,7 @@ func main() { return } - log.Fatalf("Changelog file %s not found due to the following reason: %v.\nHave you ran the `make generate-changelog-entry` command?\nIf this PR doesn't need a changelog entry file, consider using label %s.\nRead contributing guides (https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/contributing/changelog-process.md) for more info.", filePath, errFile, skipLabelName) + log.Fatalf("Have you ran the `make generate-changelog-entry` command?\nIf this PR doesn't need a changelog entry file, consider using label %s.\nRead contributing guides (https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/contributing/changelog-process.md) for more info.\nChangelog entry file %s not found due to the following reason: %v.", skipLabelName, filePath, errFile) } func validateChangelog(filePath, body string) {