-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
87128: lint: Add commit/PR body linter for epic and issue refs r=nickvigilante a=nickvigilante Before: Commits and PRs would inconsistently contain references to issues. Sometimes the author would forget to add it. Some authors might not think to add them. And there were no epic references provided. Why: Adding issue and epic references to PRs and commits provides traceability and context for the revenue teams, product, management and engineers. Now: A new GitHub Action workflow checks for references to issues the PR closes or informs and epics the PR is part of. It looks for references in the PR body and in commit messages and, if it doesn't find what it expects, it fails the check. This PR is a continuation of #77654. Fixes #77376 Release note: None Release justification: Adding linter for better epic tracking 89332: roachtest: ignore duplicated events in fingerprint validator r=srosenberg a=renatolabs This commit updates the fingerprint validator (and its use in the `cdc/mixed-versions` test) to ignore duplicated events received by the validator. A previously implicit assumption of the validator is that any events that it receives are either not duplicated, or -- if they are duplicated -- they are within the previous resolved timestamp and the current resolved timestamp. However, that assumption is not justified by the changefeed guarantees and depends on how frequently `resolved` events are emitted and how often the changefeed checkpoints. In the specific case of the `cdc/mixed-versions` roachtest, it was possible for the changefeed to start from an old checkpoint (older than the last received `resolved` timestamp), causing it to re-emit old events that happened way before the previously observed resolved event. As a consequence, when the validator applies the update associated with that event, there is a mismatch with state of the original table as of the update's timestamp, as the fingerprint validator relies on the fact that updates are applied in order. To fix the issue, we now skip events that happen before the timestamp of the previous `resolved` event received. In addition, the caller can also tell the validator to verify that such out-of-order messages received by the validator have indeed been previously seen; if not, that would represent a violation of the changefeed's guarantees. Fixes: #87251. Release note: None 89504: sql: fix panic in DROP ROLE when schemas have the same name r=ajwerner a=rafiss fixes #89486 Release note (bug fix): Fix a crash that could occur when dropping a role that owned two schemas with the same name in different databases. The bug was introduced in v22.1.0. 89516: bazel,ci: check generated code and docs are up-to-date in CI r=rail a=rickystewart When I created the file `build/bazelutil/checked_in_genfiles.txt` it was meant to contain an exhaustive list of all checked-in Go code, to be used by CI. In reality this file never had an exhaustive list and is not updated when new checked-in generated files are added. These days we have the `pkg/gen` infrastructure which *does* keep an exhaustive list of checked-in generated code, so the file is redundant anyway. Here I delete the file and just directly run `pkg/gen` for checking whether the generated code is up-to-date. Closes #88744. Release note: None Co-authored-by: Nick Vigilante <[email protected]> Co-authored-by: Renato Costa <[email protected]> Co-authored-by: Rafi Shamim <[email protected]> Co-authored-by: Ricky Stewart <[email protected]>
- Loading branch information
Showing
22 changed files
with
1,219 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Epic + Issue Ref Linter for PR Body or Commit Messages | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize, edited] | ||
|
||
jobs: | ||
linter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Bazel cache | ||
id: bazel-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cache/bazel | ||
key: ${{ runner.os }}-bazel-cache | ||
|
||
- name: Install bazelisk | ||
run: | | ||
curl -fsSL https://github.com/bazelbuild/bazelisk/releases/download/v1.10.1/bazelisk-linux-amd64 > /tmp/bazelisk | ||
sha256sum -c - <<EOF | ||
4cb534c52cdd47a6223d4596d530e7c9c785438ab3b0a49ff347e991c210b2cd /tmp/bazelisk | ||
EOF | ||
mkdir -p "${GITHUB_WORKSPACE}/bin/" | ||
mv /tmp/bazelisk "${GITHUB_WORKSPACE}/bin/bazel" | ||
chmod +x "${GITHUB_WORKSPACE}/bin/bazel" | ||
- name: Run lint | ||
run: build/github/pr-epic-issue-ref-lint.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
PR_NUMBER="$(echo "$GITHUB_REF" | awk -F '/' '{print $3}')" | ||
|
||
GITHUB_TOKEN="${GITHUB_TOKEN}" bin/bazel run //pkg/cmd/lint-epic-issue-refs:lint-epic-issue-refs "$PR_NUMBER" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.