Conversation
Replace the community-maintained grafanalib with Grafana's official Foundation SDK for dashboards-as-code. The Foundation SDK is actively maintained by Grafana Labs, auto-generated from Grafana's schemas, and provides strongly-typed builders. Changes: - Update requirements.in to use grafana-foundation-sdk 11.6.0 - Update grafana.bzl to reference the new package - Migrate example/sample.py and test/dash.py to Foundation SDK builder pattern 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Dependency updates: - aspect_bazel_lib: 2.20.0 → 2.21.2 - bazel_skylib: 1.8.1 → 1.9.0 - container_structure_test: 1.19.1 → 1.21.1 - platforms: 0.0.11 → 1.0.0 - rules_oci: 2.2.0 → 2.2.7 - rules_pkg: 1.0.1 → 1.1.0 - rules_python: 0.38.0 → 1.7.0 - Python: 3.11.8 → 3.11.13 (security fixes for CVE-2025-47273) Grafana change: - Downgrade from 12.0 to 11.6.9 for a more conservative upgrade path (Etsy currently uses 10.x) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Bump version to 2.0.0 (breaking change: grafanalib → grafana-foundation-sdk) - Add oci_load target to example for running Grafana locally - Update README with correct instructions and grafana-foundation-sdk examples - Add .bcr/ directory with BCR metadata templates - Add GitHub Actions CI (Bazel 7.x/8.x on Ubuntu/macOS) and release workflows - Add module docstring to grafana.bzl with SDK example 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove invalid bazel-version input from setup-bazel action - Use specific bazelisk version (1.25.0) instead of "latest" - Control Bazel version via USE_BAZEL_VERSION environment variable - Comment out E2E tests (on separate branch) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Split CI into linux and macos jobs - macOS: only build non-OCI targets (Grafana image requires linux) - Add docker tags to container_structure_test targets - Mark grafana_with_plugins_docker_test as manual (path differs Bazel 7/8) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add linux/arm64 platform to oci_pull for M1/M2 Mac support - Use latest bazelisk (1.27.0) and latest-7/latest Bazel versions - Update BCR presubmit to use macos-15 and exclude docker tests - Add detailed comment explaining Bazel 7/8 canonical repo name difference (Bazel 7: _main~ext~repo, Bazel 8: +ext+repo) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Grafana OCI image digest is for linux/amd64 only. On macOS: - Local dev: Docker Desktop handles translation via Rosetta - CI: Skip OCI targets, only build dashboard rules BCR presubmit now has separate Linux-only job for OCI targets. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update bazel_compatibility to >=8.0.0 - Remove Bazel 7.x from CI matrix and BCR presubmit - Remove E2E Testing section from README (moved to playwright-e2e branch) - Enable grafana_with_plugins_docker_test (no longer manual since Bazel 8 only) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add grafana_with_plugins_docker_test to Linux CI - Add plugin build and test to BCR presubmit - Update release.yml comment (BCR app is now installed) - Clarify extensions.bzl comment about macOS OCI builds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add tags parameter to grafana_image macro - Add "oci" tag to all OCI targets - Linux CI: build and test //... (everything) - macOS CI: use --build_tag_filters=-oci and --test_tag_filters=-docker,-oci - BCR presubmit: use //... patterns with tag filters - Document tags parameter in README This approach is more maintainable as new targets are automatically included without updating CI configuration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
OCI images can be built on any platform - they're just tar layers. The only thing that fails on macOS CI is container_structure_test because Docker is not available on GitHub-hosted macOS runners. See: actions/runner#1456 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Before: 3 jobs (ubuntu ran twice with redundant builds) After: 2 jobs (1 per platform, no redundancy) - bcr_test_module_linux: builds and tests everything - bcr_test_module_macos: builds everything, tests non-docker 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Push to main: CI runs - Any PR: CI runs (removed branch filter) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The oci tag was added when we incorrectly thought OCI builds failed on macOS. Only docker tests need filtering (they require Docker which isn't available on GitHub macOS runners). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
oci_pull creates a select() for linux/amd64. On arm64 macOS (GitHub Actions runners), builds fail because there's no matching platform. - Add "oci" tag to grafana_image and oci_load targets - Use --build_tag_filters=-oci on macOS CI - Use --test_tag_filters=-docker,-oci on macOS CI Intel Macs work fine (x86_64 matches linux/amd64 in select). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
container_structure_test depends on grafana_image. Even with --build_tag_filters=-oci, Bazel analyzes the test's dependencies. Adding oci tag to tests ensures they're fully excluded on arm64 macOS. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
--test_tag_filters only filters which tests RUN, not which targets are ANALYZED. bazel test //... still analyzes all targets. Need --build_tag_filters=-oci to prevent analysis of OCI targets. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Require Bazel 8+
Add the metadata and CI target for Bazel Central Registry support.
Call this version 2.0.0. We will upgrade to 3.x in a future release with the grafana foundation SDK, as grafanalib is in maintenance mode and the foundation SDK has first-party support.
Context / Why are we making this change?
Testing and QA Plan
Impact