[fix] Don't 500 on bad profile types #1193
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: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| # Cancel any running workflow for the same branch when new commits are pushed. | |
| # We group both by ref_name (available when CI is triggered by a push to a branch/tag) | |
| # and head_ref (available when CI is triggered by a PR). | |
| group: "${{ github.ref_name }}-${{ github.head_ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| format: | |
| runs-on: ${{ github.repository_owner == 'grafana' && 'ubuntu-x64-large' || 'ubuntu-latest' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version: 1.24.8 | |
| - name: Format | |
| run: make fmt check/unstaged-changes | |
| check-generated: | |
| runs-on: ${{ github.repository_owner == 'grafana' && 'ubuntu-x64-large' || 'ubuntu-latest' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version: 1.24.8 | |
| - name: Check generated files | |
| run: make generate check/unstaged-changes | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [amd64, arm64] | |
| # Compute runner OS dynamically based on arch and repo ownership | |
| runs-on: >- | |
| ${{ | |
| github.repository_owner == 'grafana' | |
| && format('ubuntu-{0}-large', matrix.arch) | |
| || (matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04') | |
| }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version: 1.24.8 | |
| - name: Go Mod | |
| run: make check/go/mod | |
| - name: Test | |
| run: make go/test | |
| lint: | |
| runs-on: ${{ github.repository_owner == 'grafana' && 'ubuntu-x64-large' || 'ubuntu-latest' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version: 1.24.8 | |
| - name: Run linter | |
| run: make lint | |
| - name: Check helm manifests | |
| run: make helm/check check/unstaged-changes | |
| test-docs: | |
| runs-on: ${{ github.repository_owner == 'grafana' && 'ubuntu-x64-small' || 'ubuntu-latest' }} | |
| steps: | |
| - name: "Check out code" | |
| uses: "actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955" # v4 | |
| with: | |
| persist-credentials: false | |
| - name: "Test docs" | |
| run: make docs/test | |
| build-image: | |
| if: github.event_name != 'push' | |
| runs-on: ${{ github.repository_owner == 'grafana' && 'ubuntu-x64' || 'ubuntu-latest' }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
| - name: Set up go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version: 1.24.8 | |
| - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3 | |
| with: | |
| node-version: 20 | |
| cache: yarn | |
| - name: Build image Pyroscope | |
| run: make docker-image/pyroscope/build-multiarch "BUILDX_ARGS=--cache-from=type=gha --cache-to=type=gha" | |
| build-push: | |
| if: github.event_name == 'push' && github.repository == 'grafana/pyroscope' | |
| permissions: | |
| contents: read | |
| id-token: write | |
| runs-on: ${{ github.repository_owner == 'grafana' && 'ubuntu-x64-large' || 'ubuntu-latest' }} | |
| outputs: | |
| image: ${{ steps.push-metadata.outputs.image }} | |
| image-digest: ${{ steps.push-metadata.outputs.image-digest }} | |
| image-tag: ${{ steps.push-metadata.outputs.image-tag }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
| - name: Set up go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version: 1.24.8 | |
| # login to docker hub | |
| - id: get-secrets | |
| uses: grafana/shared-workflows/actions/get-vault-secrets@ad819d8e2e2dccb7a28c7e2c43054573d6b45900 | |
| with: | |
| common_secrets: | | |
| DOCKERHUB_USERNAME=dockerhub:username | |
| DOCKERHUB_PASSWORD=dockerhub:password | |
| - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2 | |
| name: Login to Docker Hub | |
| with: | |
| username: ${{ env.DOCKERHUB_USERNAME }} | |
| password: ${{ env.DOCKERHUB_PASSWORD }} | |
| - name: Pyroscope Build & push multi-arch image | |
| id: build-push | |
| run: | | |
| make docker-image/pyroscope/push-multiarch "BUILDX_ARGS=--cache-from=type=gha --cache-to=type=gha" | |
| - name: Get image, image tag and image digest | |
| id: push-metadata | |
| run: | | |
| image=$(cat ./.docker-image-name-pyroscope) | |
| echo "image=${image}" >> "$GITHUB_OUTPUT" | |
| echo "image-tag=${image#*:}" >> "$GITHUB_OUTPUT" | |
| echo "image-digest=$(cat ./.docker-image-digest-pyroscope)" >> "$GITHUB_OUTPUT" | |
| deploy-dev: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| if: github.event_name == 'push' && github.repository == 'grafana/pyroscope' && github.ref == 'refs/heads/main' | |
| runs-on: ${{ github.repository_owner == 'grafana' && 'ubuntu-x64-small' || 'ubuntu-latest' }} | |
| needs: [build-push] | |
| steps: | |
| - id: "submit-argowfs-deployment" | |
| name: "Submit Argo Workflows deployment" | |
| uses: grafana/shared-workflows/actions/trigger-argo-workflow@ad819d8e2e2dccb7a28c7e2c43054573d6b45900 | |
| with: | |
| namespace: "phlare-cd" | |
| workflow_template: "deploy-pyroscope-dev" | |
| parameters: | | |
| dockertag=${{ needs.build-push.outputs.image-tag }} | |
| commit=${{ github.sha }} | |
| - name: Print URI | |
| run: | | |
| echo "URI: ${{ steps.submit-argowfs-deployment.outputs.uri }}" |