Skip to content
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

docs-issue-generation: add related PRs link to product change issue body #105817

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pkg/cmd/docs-issue-generation/docs_issue_generation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
82 changes: 82 additions & 0 deletions pkg/cmd/docs-issue-generation/docs_issue_generation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down