fix: resolve deadlock in concurrent offset commits #2185
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: API Compatibility | |
| on: | |
| merge_group: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| pull_request: | |
| branches: | |
| - "**" | |
| paths-ignore: | |
| - '**/*.md' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
| permissions: | |
| contents: read # for actions/checkout to fetch code | |
| env: | |
| # Use the Go toolchain installed by setup-go | |
| GOTOOLCHAIN: local | |
| jobs: | |
| apidiff: | |
| runs-on: ubuntu-latest | |
| if: github.base_ref | |
| steps: | |
| - name: Setup Go | |
| uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0 | |
| with: | |
| go-version: stable | |
| - name: Add GOBIN to PATH | |
| run: echo "$(go env GOPATH)/bin" >>$GITHUB_PATH | |
| - name: Install apidiff cmd | |
| run: go install golang.org/x/exp/cmd/apidiff@v0.0.0-20250813145105-42675adae3e6 | |
| - name: Checkout base code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| ref: ${{ github.base_ref }} | |
| path: "base" | |
| persist-credentials: false | |
| - name: Capture apidiff baseline | |
| run: apidiff -m -w ../baseline.bin . | |
| working-directory: "base" | |
| - name: Checkout updated code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| path: "updated" | |
| persist-credentials: false | |
| - name: Run apidiff check | |
| run: apidiff -m -incompatible ../baseline.bin . | |
| working-directory: "updated" |