chore: Update OpenTelemetry semantic conventions to v1.40.0 #245
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
| # Copyright 2025 Google LLC | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # https://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: Presubmit | |
| on: | |
| push: | |
| jobs: | |
| go: | |
| name: Go & npm tests | |
| runs-on: ubuntu-latest | |
| container: | |
| image: quay.io/prometheus/golang-builder:1.24-base | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - uses: prometheus/promci@443c7fc2397e946bc9f5029e313a9c3441b9b86d # v0.4.7 | |
| - uses: ./.github/promci/actions/setup_environment | |
| with: | |
| enable_npm: true | |
| - run: make install-goyacc build test | |
| build-image-amd64: | |
| name: Ensure Google image builds (amd64) | |
| timeout-minutes: 30 | |
| runs-on: ubuntu-latest | |
| container: | |
| # Use the same image Louhi will use. | |
| image: gcr.io/cloud-builders/docker:latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # - name: Set up Docker Buildx | |
| # uses: docker/setup-buildx-action@v3 | |
| - name: Add vendoring | |
| run: | | |
| # Our dockerfile expects npm vendoring, yet this is done during the mirror stage. | |
| # Do it on demand here, with exactly the same script that internal CI would use | |
| # for both testing and later build purposes. | |
| bash ./google_vendor.sh | |
| - name: Ensure forked image is buildable | |
| run: | | |
| # The same commands we use for building internally. | |
| docker run --rm --privileged multiarch/qemu-user-static --reset --credential yes --persistent yes | |
| docker buildx create --name multi-arch-builder --use | |
| DOCKER_BUILDKIT=1 docker buildx build -t gmp-prometheus:amd64 . -f ./Dockerfile.google --platform linux/amd64 --target=app --load | |
| # TODO: One day we could enable linux/arm64, but right now it's OOMing on free GH action. | |
| - name: Save Docker image as a tar archive | |
| run: docker save gmp-prometheus:amd64 -o image.tar | |
| - name: Upload Docker image artifact for the next tests | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gmp-prometheus-amd64 | |
| path: image.tar | |
| test-export-gcm: | |
| name: GCM e2e tests | |
| runs-on: ubuntu-latest | |
| # This job now depends on build-image-amd64 and will run only after it succeeds. | |
| needs: build-image-amd64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download Docker image artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: gmp-prometheus-amd64 | |
| - name: Load Docker image | |
| run: docker load -i image.tar | |
| - name: Run export GCM tests | |
| env: | |
| GCM_SECRET: ${{ secrets.GCM_SECRET }} | |
| GMP_PROMETHEUS_IMAGE: "gmp-prometheus:amd64" | |
| run: make -C ./google/internal/promqle2etest test | |
| - name: Run prw2gcm GCM tests | |
| env: | |
| GCM_SECRET: ${{ secrets.GCM_SECRET }} | |
| GMP_PROMETHEUS_IMAGE: "gmp-prometheus:amd64" | |
| run: make -C ./google/cmd/prw2gcm test |