Skip to content

feat: add FARO_API_KEY build secret for source-map upload#286

Merged
joscdk merged 1 commit into
mainfrom
feat/faro-api-key-secret
May 15, 2026
Merged

feat: add FARO_API_KEY build secret for source-map upload#286
joscdk merged 1 commit into
mainfrom
feat/faro-api-key-secret

Conversation

@joscdk
Copy link
Copy Markdown
Contributor

@joscdk joscdk commented May 15, 2026

Summary

Wires a new optional FARO_API_KEY through the reusable workflow chain so service repos can upload Grafana Faro source maps during their Docker build. Mirrors the existing SENTRY_AUTH_TOKEN plumbing exactly — no behavior change for callers that don't pass the new secret.

  • deploy-generic-v2.yml — declare FARO_API_KEY as an optional secret input and forward it to the build component (4 lines).
  • component-build.yml — declare FARO_API_KEY as an optional secret input and inject it into the docker/build-push-action secrets list (4 lines).

Each downstream Dockerfile decides whether to consume it via --mount=type=secret,id=FARO_API_KEY,required=false. Repos that haven't onboarded Faro see no change — the secret is optional and the Docker mount is required=false.

Caller-side usage

In a service repo's deploy workflow:

secrets:
  # ... existing entries ...
  FARO_API_KEY: ${{ secrets.FARO_API_KEY }}

First consumer is monorepo-typescript's frontend-hub deploy, which uses @grafana/faro-rollup-plugin in its Vite build to upload source maps so Faro errors symbolicate to readable source lines in Grafana Cloud Frontend Observability.

Test plan

  • Re-run a deploy workflow in monorepo-typescript (e.g. deploy-hub-staging.yml) without setting FARO_API_KEY → build passes, no behavior change (confirms optional path)
  • Re-run with FARO_API_KEY set → Faro source maps appear in Grafana Cloud's Frontend Observability app for the Hub app, errors symbolicate to real source lines

🤖 Generated with Claude Code

Wires a new optional FARO_API_KEY through the reusable workflow chain so
service repos can upload Grafana Faro source maps during their Docker
build, mirroring the existing SENTRY_AUTH_TOKEN plumbing exactly:

- `deploy-generic-v2.yml`: declare FARO_API_KEY as an optional secret
  input and forward it to the build component.
- `component-build.yml`: declare FARO_API_KEY as an optional secret
  input and inject it into the `docker/build-push-action` secrets list
  so the Dockerfile can mount it as a BuildKit secret.

Each downstream Dockerfile decides whether to consume it via
`--mount=type=secret,id=FARO_API_KEY,required=false` — repos that
haven't onboarded Faro see no behavior change because the secret is
optional and the Docker mount is `required=false`.

Caller-side usage in service repos:

```yaml
secrets:
  # ... existing entries ...
  FARO_API_KEY: ${{ secrets.FARO_API_KEY }}
```

First consumer is `monorepo-typescript`'s frontend-hub deploy, which
uses `@grafana/faro-rollup-plugin` in its Vite build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@joscdk joscdk requested a review from a team as a code owner May 15, 2026 07:07
@joscdk joscdk requested review from sudheer-monta and removed request for a team May 15, 2026 07:07
@joscdk joscdk merged commit 86e0909 into main May 15, 2026
1 check passed
@joscdk joscdk deleted the feat/faro-api-key-secret branch May 15, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants