diff --git a/pkg/cmd/docs-issue-generation/docs_issue_generation.go b/pkg/cmd/docs-issue-generation/docs_issue_generation.go index 95c5a3913cc6..d3aa2e19e227 100644 --- a/pkg/cmd/docs-issue-generation/docs_issue_generation.go +++ b/pkg/cmd/docs-issue-generation/docs_issue_generation.go @@ -867,6 +867,15 @@ func formatReleaseNotes( ) rnBodySlice = append(rnBodySlice, strings.TrimSuffix(rnBody, "\n")) } + if len(rnBodySlice) > 1 { + relatedProductChanges := "Related product changes: " + + "https://cockroachlabs.atlassian.net/issues/?jql=project%20%3D%20%22DOC%22%20and%20%22Doc%20Type%5BDropdown%5D" + + "%22%20%3D%20%22Product%20Change%22%20AND%20description%20~%20%22commit%2F" + + crdbSha + "%22%20ORDER%20BY%20created%20DESC\n\n---" + for i, rn := range rnBodySlice { + rnBodySlice[i] = strings.Replace(rn, "\n---", relatedProductChanges, -1) + } + } return rnBodySlice } diff --git a/pkg/cmd/docs-issue-generation/docs_issue_generation_test.go b/pkg/cmd/docs-issue-generation/docs_issue_generation_test.go index 78ec9ea2bf2e..b56848553424 100644 --- a/pkg/cmd/docs-issue-generation/docs_issue_generation_test.go +++ b/pkg/cmd/docs-issue-generation/docs_issue_generation_test.go @@ -360,6 +360,88 @@ This increases troubleshootability. Release note: None`, rns: []string{}, }, + { + prNum: "104265", + sha: "d756dec1b9d7245305ab706e68e2ec3de0e61ffc", + commitMessage: `Release note (cli change): The log output formats ` + "`crdb-v1`" + ` and +` + "`crdb-v2`" + ` now support the format option ` + "`timezone`" + `. When specified, +the corresponding time zone is used to produce the timestamp column. + +For example: +` + "```" + `yaml +file-defaults: + format: crdb-v2 + format-options: {timezone: america/new_york} +` + "```" + ` + +Example logging output: +` + "```" + ` +I230606 12:43:01.553407-040000 1 1@cli/start.go:575 ⋮ [n?] 4 soft memory limit of Go runtime is set to 35 GiB +^^^^^^^ indicates GMT-4 was used. +` + "```" + ` + +The timezone offset is also always included in the format if it is not +zero (e.g. for non-UTC time zones). This is necessary to ensure that +the times can be read back precisely. + +Release note (cli change): The command ` + "`cockroach debug merge-log`" + ` was +adapted to understand time zones in input files read with format +` + "`crdb-v1`" + ` or ` + "`crdb-v2`" + `. + +Release note (backward-incompatible change): When a deployment is +configured to use a time zone (new feature) for log file output using +formats ` + "`crdb-v1`" + ` or ` + "`crdb-v2`" + `, it becomes impossible to process the +new output log files using the ` + "`cockroach debug merge-log`" + ` command +from a previous version. The newest ` + "`cockroach debug merge-log`" + ` code +must be used instead.`, + rns: []string{`Related PR: https://github.com/cockroachdb/cockroach/pull/104265 +Commit: https://github.com/cockroachdb/cockroach/commit/d756dec1b9d7245305ab706e68e2ec3de0e61ffc +Related product changes: https://cockroachlabs.atlassian.net/issues/?jql=project%20%3D%20%22DOC%22%20and%20%22Doc%20Type%5BDropdown%5D%22%20%3D%20%22Product%20Change%22%20AND%20description%20~%20%22commit%2Fd756dec1b9d7245305ab706e68e2ec3de0e61ffc%22%20ORDER%20BY%20created%20DESC + +--- + +Release note (cli change): The log output formats ` + "`crdb-v1`" + ` and +` + "`crdb-v2`" + ` now support the format option ` + "`timezone`" + `. When specified, +the corresponding time zone is used to produce the timestamp column. + +For example: +` + "```" + `yaml +file-defaults: + format: crdb-v2 + format-options: {timezone: america/new_york} +` + "```" + ` + +Example logging output: +` + "```" + ` +I230606 12:43:01.553407-040000 1 1@cli/start.go:575 ⋮ [n?] 4 soft memory limit of Go runtime is set to 35 GiB +^^^^^^^ indicates GMT-4 was used. +` + "```" + ` + +The timezone offset is also always included in the format if it is not +zero (e.g. for non-UTC time zones). This is necessary to ensure that +the times can be read back precisely.`, + `Related PR: https://github.com/cockroachdb/cockroach/pull/104265 +Commit: https://github.com/cockroachdb/cockroach/commit/d756dec1b9d7245305ab706e68e2ec3de0e61ffc +Related product changes: https://cockroachlabs.atlassian.net/issues/?jql=project%20%3D%20%22DOC%22%20and%20%22Doc%20Type%5BDropdown%5D%22%20%3D%20%22Product%20Change%22%20AND%20description%20~%20%22commit%2Fd756dec1b9d7245305ab706e68e2ec3de0e61ffc%22%20ORDER%20BY%20created%20DESC + +--- + +Release note (cli change): The command ` + "`cockroach debug merge-log`" + ` was +adapted to understand time zones in input files read with format +` + "`crdb-v1`" + ` or ` + "`crdb-v2`" + `.`, + `Related PR: https://github.com/cockroachdb/cockroach/pull/104265 +Commit: https://github.com/cockroachdb/cockroach/commit/d756dec1b9d7245305ab706e68e2ec3de0e61ffc +Related product changes: https://cockroachlabs.atlassian.net/issues/?jql=project%20%3D%20%22DOC%22%20and%20%22Doc%20Type%5BDropdown%5D%22%20%3D%20%22Product%20Change%22%20AND%20description%20~%20%22commit%2Fd756dec1b9d7245305ab706e68e2ec3de0e61ffc%22%20ORDER%20BY%20created%20DESC + +--- + +Release note (backward-incompatible change): When a deployment is +configured to use a time zone (new feature) for log file output using +formats ` + "`crdb-v1`" + ` or ` + "`crdb-v2`" + `, it becomes impossible to process the +new output log files using the ` + "`cockroach debug merge-log`" + ` command +from a previous version. The newest ` + "`cockroach debug merge-log`" + ` code +must be used instead.`}, + }, } for _, tc := range testCases { t.Run(tc.prNum, func(t *testing.T) {