Skip to content

fix(trace-stats)!: add grpc_method to aggregation key #2252

fix(trace-stats)!: add grpc_method to aggregation key

fix(trace-stats)!: add grpc_method to aggregation key #2252

Workflow file for this run

name: Rustfmt Auto
on:
pull_request:
types: [opened, reopened, labeled]
jobs:
rustfmt:
runs-on: ubuntu-latest
if: >-
contains(github.event.pull_request.labels.*.name, 'commit-rustfmt-changes') &&
github.event.pull_request.head.repo.full_name == github.repository &&
!startsWith(github.head_ref, 'mq-working-branch')
permissions:
id-token: write
contents: write
steps:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Get GitHub App token
uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
id: octo-sts
with:
scope: DataDog/libdatadog
policy: self.write.rustfmt
- name: Read nightly version from nightly-toolchain.toml
id: nightly-version
run: echo "version=$(grep -Po '^channel = "\K[^"]+' nightly-toolchain.toml)" >> $GITHUB_OUTPUT
- name: Install ${{ steps.nightly-version.outputs.version }} toolchain and rustfmt
run: |
rustup install ${{ steps.nightly-version.outputs.version }}
rustup component add rustfmt --toolchain ${{ steps.nightly-version.outputs.version }}
- name: Run rustfmt and commit changes
uses: mbrobbel/rustfmt-check@e7ac5685995bd39fb14f6c83fa6f10627e92e680 # master
env:
# Override rust-toolchain.toml so rustfmt runs on nightly (required by
# the unstable_features in rustfmt.toml) instead of the workspace MSRV.
RUSTUP_TOOLCHAIN: ${{ steps.nightly-version.outputs.version }}
with:
token: ${{ steps.octo-sts.outputs.token }}