KRaft hardening: correctness fixes, admission validation, and controller rolling-restart quorum safety #1843
Workflow file for this run
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-integrity: | |
| name: Check integrity | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - name: Check Go modules dependency file integrity | |
| run: | | |
| find . -type f -name go.mod | while read module_file; do | |
| module=$(dirname "$module_file") | |
| pushd "$module" > /dev/null | |
| go mod tidy | |
| if [ "$(git status --porcelain)" != "" ]; then | |
| printf >&2 '\n`go mod tidy` in module `%s` results in a dirty state, Go mod files are not in sync with the source code files, differences:\n\n%s\n\n' "$module" "$(git diff)" | |
| git reset --hard | |
| exit 1 | |
| fi | |
| popd > /dev/null | |
| done | |
| - name: Check generated file integrity | |
| run: | | |
| make generate manifests | |
| if [ "$(git status --porcelain)" != "" ]; then | |
| printf >&2 '\ngenerating code files and manifests results in a dirty state, generated files are not in sync with the source code files, differences:\n\n%s\n\n' "$(git diff)" | |
| git reset --hard | |
| exit 1 | |
| fi | |
| build: | |
| name: Build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - name: Clean Go module and build cache | |
| run: | | |
| # Clean any existing Go module and build cache to avoid conflicts | |
| sudo rm -rf ~/go/pkg/mod || true | |
| sudo rm -rf ~/.cache/go-build || true | |
| mkdir -p ~/go/pkg/mod | |
| mkdir -p ~/.cache/go-build | |
| # Ensure proper permissions | |
| chmod -R 755 ~/go/pkg/mod | |
| chmod -R 755 ~/.cache/go-build | |
| - name: License cache | |
| uses: actions/cache/restore@v6 | |
| with: | |
| path: .licensei.cache | |
| key: ci-license-v1-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ci-license-v1- | |
| license-v1- | |
| enableCrossOsArchive: false | |
| fail-on-cache-miss: false | |
| - name: Download license information for dependencies | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: make license-cache | |
| - name: Vendor dependencies to retrieve licenses locally | |
| # Vendor deps in every module (root + third_party/*) before running | |
| # https://github.com/goph/licensei to avoid false-positives when a module's | |
| # github repo cannot be determined - e.g. vanity import paths like | |
| # dario.cat/mergo. Root-only vendoring left the third_party/* sub-modules | |
| # relying on flaky GitHub resolution. | |
| run: make license-vendor | |
| - name: Check licenses | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: make license-check | |
| - name: Check license header | |
| env: | |
| GOTEMPLATE_DEBUG: true | |
| GOTEMPLATE_INTERNAL_LOG_LEVEL: debug | |
| GOTEMPLATE_TEMPLATE_LOG_LEVEL: debug | |
| run: make license-header-check | |
| - name: Build | |
| run: | | |
| make generate | |
| - name: Lint | |
| run: | | |
| make lint | |
| - name: Run tests | |
| run: | | |
| make test | |
| - name: Save license cache | |
| uses: actions/cache/save@v6 | |
| with: | |
| path: .licensei.cache | |
| key: ci-license-v1-${{ hashFiles('**/go.sum') }} | |