2023-05-04 02:56:02 +08:00
|
|
|
"""
|
CI Migration: Backport pkg/build (daggerbuild) and GHAs to `release-12.0.3` (#107997)
* CI: move grafana-build into pkg/build (#105640)
* move grafana-build into pkg/build
* Update go.mod/go.sum files after cherry-pick build
- Updates from workspace sync after cherry-picking daggerbuild package
- Resolves dependency conflicts from pkg/build integration
- Required for successful build after CI migration backport
* CI Migration: Replace .github with main branch version
- Complete replacement of .github directory from main branch
- Includes updated workflows, actions, and configuration files
- Ensures all CI improvements from main are included
- Next step: fix branch-specific issues in separate commits
* Fix branch triggers: Update workflows to target release branches
- Update 8 workflows to trigger on release-* instead of main
- Ensures workflows run on pull requests to release branches
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* Fix branch triggers: Update workflows to target both main and release branches
- CORRECTED: Include both main and release-* branch patterns
- Ensures workflows run on both main branch (original functionality) and release branches (needed for backport)
- Previous commit incorrectly removed main branch support
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* CI Migration: Update .gitignore to allow OSS wire file to be committed
- Remove **/wire_gen.go (allow pkg/server/wire_gen.go to be committed)
- Add /pkg/server/enterprise_wire_gen.go (keep enterprise wire file ignored)
- This enables the new committed wire files architecture for CI
* CI Migration: Add enhanced wire tool with automatic build constraints
- Backport enhanced wire tool from main branch with -gen_tags flag
- This enables automatic regeneration with proper constraints to prevent conflicts
- Wire file contains all required functions: Initialize, InitializeDocumentBuilders, etc.
- Solves the missing wire functions issue causing CI failures
- Enhanced tool ensures build constraints persist on regeneration
* CI Migration: Update Makefile to use enhanced wire tool with build constraints
- Update gen-go target to use -gen_tags flag for automatic build constraints
- Ensures future engineers get proper build constraints when running 'make gen-go'
- Matches main branch approach for consistent wire file generation
- Removes dependency on WIRE_TAGS variable and GO_RACE_FLAG for simplicity
* Add gen-enterprise-go target to Makefile for release-12.0.3
- Backports gen-enterprise-go target from main branch
- Enables enterprise wire file generation in release branches
- Part of CI migration backport wire infrastructure fixes
- Resolves CI issues where enterprise wire functions were missing
* Fix wire tool golden file format for Drone CI compatibility
- Update all 43 golden test files to match main branch format
- Change go:generate command from github.com/google/wire/cmd/wire to ./pkg/build/wire/cmd/wire/main.go
- Remove legacy '// +build !wireinject' constraints
- Fixes Drone CI test failures that were blocking OSS PR merge
- All wire tests now pass successfully
This aligns the backport branch with the golden file format updates
that were made in main branch when the wire tool was enhanced.
* Update swagger specs to include enterprise APIs
- Regenerated api-enterprise-spec.json with enterprise API definitions
- Updated api-merged.json with merged OSS and enterprise specs
- Regenerated openapi3.json with complete API specifications
- Fixes enterprise CI swagger generation validation failures
- Enterprise APIs now properly detected and documented
* Fix OSS integration tests missing enterprise build tags in Drone CI
- Add -tags=enterprise to all integration test steps in lib.star
- Fixes test-backend-integration, postgres-integration-tests, and mysql-integration-tests
- Regenerate .drone.yml with proper enterprise build tags
- Resolves 'server could not find the requested resource' errors for enterprise APIs
- Ensures enterprise APIs (querylibrary, reporting, banners, scim) are registered during tests
- Aligns OSS Drone CI with GitHub Actions behavior and enterprise repository
* Fix CODEOWNERS for release-12.0.3 compatibility
- Remove 21 entries that reference files/directories not present in release branch
- Resolves File Exist Checker failures in codeowners-validator workflow
- Maintains team ownership assignments from main branch for existing files
- Lines removed: .air.toml, apps/secret/, apps/iam/, e2e-playwright/, packages/grafana-alerting/, etc.
* baldm0mma/ update releasefinder
* Add i18n-extract script for release branch compatibility
- Add 'i18n-extract': 'make i18n-extract' to package.json scripts
- Resolves i18n-verify workflow failure that expects this script
- The make target already exists and handles OSS + enterprise i18n extraction
- Maintains i18n verification functionality from main branch workflows
- Simple safe addition that calls existing make infrastructure
* Phase 4: Fix GitHub Actions workflow branch triggers
- Add release-*.*.* pattern to 8 workflows missing it
- Fix duplicate release branch patterns in 3 workflows
- Ensure consistent branch trigger format across all workflows
- Critical workflows now properly trigger on release branches
Fixes workflows: actionlint, backend-code-checks, go-lint, reject-gh-secrets,
run-schema-v2-e2e, shellcheck, swagger-gen, trivy-scan
* Fix: Backport E2E runner infrastructure for Enterprise CI
- Add e2e/main.go and e2e/internal/ directory from main branch
- Add urfave/cli/v3 dependency required by E2E runner
- Fixes Enterprise CI failure: 'Build E2E test runner' and 'Build & package Grafana for e2e tests'
- Root cause: E2E runner infrastructure was added to main after release-12.0.3 branch creation
- Solution: Backport missing E2E runner files to enable Enterprise CI completion
Resolves: no Go files in /opt/actions-runner/_work/grafana-enterprise/grafana-enterprise/grafana/e2e
* Fix: Update go.mod dependency classification for urfave/cli/v3
- Change urfave/cli/v3 from indirect to direct dependency
- Fixes Go Workspace Check failure in CI
- Required after adding E2E runner infrastructure that directly imports urfave/cli/v3
- Resolves: make update-workspace corrects dependency classification
* Fix: Add team ownership for urfave/cli/v3 dependency
- Assign @grafana/grafana-backend-group as owner for github.com/urfave/cli/v3@v3.3.8
- Follows existing pattern: urfave/cli v1 and v2 also owned by grafana-backend-group
- Resolves Backend Code Checks / Validate Backend Configs CI failure
- Required for E2E runner infrastructure dependency ownership compliance
Fixes: modowners check requiring team assignment for newly added dependencies
* Fix: Revert experimental E2E playwright infrastructure to stable version
- Revert pr-e2e-tests.yml to stable Cypress-based E2E testing
- Remove experimental storybook-verification-playwright.yml workflow
- Revert run-dashboard-search-e2e.yml and release-pr.yml to use e2e/test-plugins/
- Keep stable E2E runner infrastructure (e2e/main.go + e2e/internal/)
- Remove experimental playwright features per team recommendation
Team feedback: Playwright tests are experimental and shouldn't be backported to stable release branches
* Fix: Complete cleanup of experimental playwright dependencies
- Revert package.json to stable version (remove e2e-playwright scripts and path references)
- Revert playwright.config.ts to stable plugin-e2e configuration
- Remove all experimental playwright infrastructure dependencies
- Ensure clean stable E2E testing environment
All experimental features removed per team recommendation for stable release branches
* Fix: Restore working package.json configuration
- Revert package.json to version 12.0.3 (working release branch version)
- Fix workspace dependency resolution issues caused by incorrect revert to main branch version
- FE tests, betterer, and linting should now work correctly
Issue was caused by reverting package.json to main branch (12.1.0-pre) instead of keeping
the working release branch configuration (12.0.3)
* CI: mirror some CI dependencies (#106148)
* mirror some CI dependencies
* remove -v from go build
* Fix: Backport missing e2e/run-suite script for daggerbuild E2E system
The daggerbuild E2E system (used by OSS workflows) expects ./e2e/run-suite
to exist, but we only backported the new E2E runner infrastructure.
This script is needed for:
- OSS workflow: 'go run ./pkg/build/e2e --suite=dashboards-suite'
- Legacy Cypress configuration with video support
- Integration between daggerbuild and existing Cypress test suites
Resolves E2E test failures in OSS workflows where videos directory
cannot be found because run-suite script was missing.
* Fix: Resolve daggerbuild E2E path doubling issue
- Extract just suite name from full path using filepath.Base()
- Prevents doubled paths like './e2e/e2e/dashboards-suite/videos'
- Resolves 'no spec files found' and 'no such file or directory' errors
- GitHub Actions passes full paths like 'e2e/dashboards-suite' but run-suite script expects just 'dashboards-suite'
* Infrastructure: Wholesale copy pkg/build/ from main
COMPLETE DAGGERBUILD SYSTEM UPDATE:
- Modern E2E system with CLI framework and --flags support
- New accessibility testing system (a11y/)
- New Playwright E2E testing system (e2e-playwright/)
- External infrastructure improvements (musl.cc → dl.grafana.com/ci)
- Updated daggerbuild core components with latest fixes
- Updated Go dependencies and wire modules
ARCHITECTURAL COMPATIBILITY VERIFIED:
- Modern pkg/build calls: ./e2e-runner cypress --start-grafana=false --cypress-video
- Our e2e runner supports: All required parameters including --suite, --env flags
- GitHub Actions workflows: Pass compatible arguments
- Binary builds: Successfully creates working e2e-runner
RESOLVES ISSUES:
- Fixes --flags parameter compatibility with GitHub Actions
- Includes all follow-up infrastructure improvements
- Provides complete, tested system with modern CLI framework
- Eliminates external dependency failures (musl.cc timeouts)
- Removes need for path doubling workarounds (modern system handles full paths correctly)
Replaces incremental cherry-picking with complete, tested system from main.
* Dependencies: Update Go modules after pkg/build wholesale copy
DEPENDENCY UPDATES:
- Updated go.work.sum with new dependencies from modern pkg/build system
- Updated all workspace module dependencies (go.mod/go.sum files)
- Removed pkg/build/cmd/enterprise.go (enterprise-only file, gets copied during enterprise development)
ENTERPRISE INTEGRATION FIX:
- enterprise.go file doesn't belong in OSS repository
- Gets copied from grafana-enterprise during development mode
- Main branch doesn't have this file, explaining module compatibility
All Go modules now properly resolved and compatible with modern pkg/build architecture.
* Dependencies: Update workspace Go module checksums after pkg/build wholesale copy
- Synchronizes all go.sum files across workspace modules
- Adds missing .mod.h1 entries that were required after infrastructure update
- Resolves Go Workspace Check CI failures
- Updates 22 modules: .citools/, apps/, pkg/ subdirectories plus go.work.sum
Addresses CI error: 'Please run make update-workspace and commit the changes'
* Infrastructure: Revert to pre-Playwright E2E system for release branch compatibility
Strategic combination of modern daggerbuild with stable E2E infrastructure:
**Modern Daggerbuild (from main):**
- Latest CLI framework (github.com/urfave/cli/v3)
- External infrastructure fixes (musl.cc → dl.grafana.com/ci)
- Complete pkg/build/ system with all enhancements
- Updated dependencies and architecture improvements
**Stable E2E Infrastructure (pre-Playwright):**
- pkg/build/e2e/service.go: Reverted to version before commit b6580ccb103942d3ea26c52fac320810aa93fa1e
- pkg/build/a11y/: Reverted to stable version compatible with existing infrastructure
- Removed experimental pkg/build/e2e-playwright/ system
- Removed experimental e2e-playwright/ test infrastructure
**Why This Approach:**
- GitHub Actions workflows call 'go run ./pkg/build/e2e' (modern system)
- Modern system now expects only standard e2e/ directory (compatible)
- Release branches have standard e2e/ infrastructure (dashboards-suite, various-suite, etc.)
- Eliminates dependency on experimental Playwright infrastructure
**Key Dependencies Met:**
- e2e/pa11yci.conf.js: Added for a11y test compatibility
- /src/e2e directory: Standard directory structure (no e2e-playwright needed)
- Existing test plugins: Uses stable e2e/test-plugins/
**Result:**
Best of both worlds - modern, reliable daggerbuild infrastructure with
proven E2E testing that works across all release branches without
requiring experimental dependencies.
* Fix: Remove unused embed.go file causing golangci-lint failure
- Removes pkg/build/daggerbuild/msi/embed.go with unused embed.FS variable
- MSI build process uses directory mounting instead of embedded filesystem
- Resolves 'var resources is unused (unused)' linting error
* Fix: Update Node.js version to match working E2E configuration
- Changes from v22.11.0 to v22.16.0 to match commit 17952d45e4e406ca7c6f5f441e4ce3ca9d20982a
- Working commit had all E2E tests passing with same daggerbuild infrastructure
- Node.js version differences can affect frontend builds and UI rendering
- Ensures consistent environment between working reference and current branch
* Fix: Use conditional container base for E2E compatibility
- Alpine for OSS tests (better old arch dashboardScene=false compatibility)
- Ubuntu for Enterprise tests (when image renderer needed)
- Restores original release-12.0.3 Alpine behavior for OSS
- Should resolve old arch E2E test failures
* Fix: Go fmt formatting for conditional container logic
* Revert: Remove unnecessary Alpine/Ubuntu conditional logic
- Real issue was wrong environment variable name (dashboardScene vs DISABLE_SCENES)
- Keep Ubuntu base (original main branch behavior) for simplicity
- Container base was not the root cause of old arch failures
* Experiment: Copy scripts/ from pre-Playwright commit (ea0ddb3fc95)
- Copied scripts directory from commit ea0ddb3fc95 (just before Playwright migration)
- This overwrites some CI migration fixes but testing if it's actually needed
- Can revert back to b9b4602dbd5 if CI breaks
Test commit to see real impact on GitHub Actions workflows.
* trigger ci 01
* Fix: Copy .drone.star from main to match scripts structure
- Resolves Starlark evaluation error for missing integration_test_pipelines
- Aligns .drone.star with main branch scripts structure
- Same fix applied to both OSS and Enterprise repositories
* make drone
* Fix ARM/v7 Docker build failures by using dagger run for cross-compilation
- Change artifacts_cmd() in scripts/drone/steps/rgm.star to use 'dagger run go run' instead of 'go run'
- Add --max-execution-steps 100000 to make drone target in Makefile to properly regenerate .drone.yml
- This fixes CGO cross-compilation issues with SQLite for ARM/v7 Docker builds
- Matches the approach already used successfully in Enterprise builds
* Fix Docker base image references in rgm build steps
- Change from symbolic names (alpine-base, ubuntu-base) to actual Docker images
- alpine-base → alpine:3.21.3
- ubuntu-base → ubuntu:22.04
- Add ubuntu and alpine parameters to rgm_artifacts_step and rgm_build_docker_step functions
- Fixes Docker pull errors: 'repository does not exist or may require authorization'
- Aligns OSS configuration with Enterprise approach
---------
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2025-07-18 23:14:14 +08:00
|
|
|
'rgm' pipelines are pipelines that use dagger (located in 'pkg/build/daggerbuild')
|
2023-05-04 02:56:02 +08:00
|
|
|
"""
|
|
|
|
|
|
2023-05-23 16:01:09 +08:00
|
|
|
load(
|
CI Migration: Backport pkg/build (daggerbuild) and GHAs to `release-12.0.3` (#107997)
* CI: move grafana-build into pkg/build (#105640)
* move grafana-build into pkg/build
* Update go.mod/go.sum files after cherry-pick build
- Updates from workspace sync after cherry-picking daggerbuild package
- Resolves dependency conflicts from pkg/build integration
- Required for successful build after CI migration backport
* CI Migration: Replace .github with main branch version
- Complete replacement of .github directory from main branch
- Includes updated workflows, actions, and configuration files
- Ensures all CI improvements from main are included
- Next step: fix branch-specific issues in separate commits
* Fix branch triggers: Update workflows to target release branches
- Update 8 workflows to trigger on release-* instead of main
- Ensures workflows run on pull requests to release branches
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* Fix branch triggers: Update workflows to target both main and release branches
- CORRECTED: Include both main and release-* branch patterns
- Ensures workflows run on both main branch (original functionality) and release branches (needed for backport)
- Previous commit incorrectly removed main branch support
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* CI Migration: Update .gitignore to allow OSS wire file to be committed
- Remove **/wire_gen.go (allow pkg/server/wire_gen.go to be committed)
- Add /pkg/server/enterprise_wire_gen.go (keep enterprise wire file ignored)
- This enables the new committed wire files architecture for CI
* CI Migration: Add enhanced wire tool with automatic build constraints
- Backport enhanced wire tool from main branch with -gen_tags flag
- This enables automatic regeneration with proper constraints to prevent conflicts
- Wire file contains all required functions: Initialize, InitializeDocumentBuilders, etc.
- Solves the missing wire functions issue causing CI failures
- Enhanced tool ensures build constraints persist on regeneration
* CI Migration: Update Makefile to use enhanced wire tool with build constraints
- Update gen-go target to use -gen_tags flag for automatic build constraints
- Ensures future engineers get proper build constraints when running 'make gen-go'
- Matches main branch approach for consistent wire file generation
- Removes dependency on WIRE_TAGS variable and GO_RACE_FLAG for simplicity
* Add gen-enterprise-go target to Makefile for release-12.0.3
- Backports gen-enterprise-go target from main branch
- Enables enterprise wire file generation in release branches
- Part of CI migration backport wire infrastructure fixes
- Resolves CI issues where enterprise wire functions were missing
* Fix wire tool golden file format for Drone CI compatibility
- Update all 43 golden test files to match main branch format
- Change go:generate command from github.com/google/wire/cmd/wire to ./pkg/build/wire/cmd/wire/main.go
- Remove legacy '// +build !wireinject' constraints
- Fixes Drone CI test failures that were blocking OSS PR merge
- All wire tests now pass successfully
This aligns the backport branch with the golden file format updates
that were made in main branch when the wire tool was enhanced.
* Update swagger specs to include enterprise APIs
- Regenerated api-enterprise-spec.json with enterprise API definitions
- Updated api-merged.json with merged OSS and enterprise specs
- Regenerated openapi3.json with complete API specifications
- Fixes enterprise CI swagger generation validation failures
- Enterprise APIs now properly detected and documented
* Fix OSS integration tests missing enterprise build tags in Drone CI
- Add -tags=enterprise to all integration test steps in lib.star
- Fixes test-backend-integration, postgres-integration-tests, and mysql-integration-tests
- Regenerate .drone.yml with proper enterprise build tags
- Resolves 'server could not find the requested resource' errors for enterprise APIs
- Ensures enterprise APIs (querylibrary, reporting, banners, scim) are registered during tests
- Aligns OSS Drone CI with GitHub Actions behavior and enterprise repository
* Fix CODEOWNERS for release-12.0.3 compatibility
- Remove 21 entries that reference files/directories not present in release branch
- Resolves File Exist Checker failures in codeowners-validator workflow
- Maintains team ownership assignments from main branch for existing files
- Lines removed: .air.toml, apps/secret/, apps/iam/, e2e-playwright/, packages/grafana-alerting/, etc.
* baldm0mma/ update releasefinder
* Add i18n-extract script for release branch compatibility
- Add 'i18n-extract': 'make i18n-extract' to package.json scripts
- Resolves i18n-verify workflow failure that expects this script
- The make target already exists and handles OSS + enterprise i18n extraction
- Maintains i18n verification functionality from main branch workflows
- Simple safe addition that calls existing make infrastructure
* Phase 4: Fix GitHub Actions workflow branch triggers
- Add release-*.*.* pattern to 8 workflows missing it
- Fix duplicate release branch patterns in 3 workflows
- Ensure consistent branch trigger format across all workflows
- Critical workflows now properly trigger on release branches
Fixes workflows: actionlint, backend-code-checks, go-lint, reject-gh-secrets,
run-schema-v2-e2e, shellcheck, swagger-gen, trivy-scan
* Fix: Backport E2E runner infrastructure for Enterprise CI
- Add e2e/main.go and e2e/internal/ directory from main branch
- Add urfave/cli/v3 dependency required by E2E runner
- Fixes Enterprise CI failure: 'Build E2E test runner' and 'Build & package Grafana for e2e tests'
- Root cause: E2E runner infrastructure was added to main after release-12.0.3 branch creation
- Solution: Backport missing E2E runner files to enable Enterprise CI completion
Resolves: no Go files in /opt/actions-runner/_work/grafana-enterprise/grafana-enterprise/grafana/e2e
* Fix: Update go.mod dependency classification for urfave/cli/v3
- Change urfave/cli/v3 from indirect to direct dependency
- Fixes Go Workspace Check failure in CI
- Required after adding E2E runner infrastructure that directly imports urfave/cli/v3
- Resolves: make update-workspace corrects dependency classification
* Fix: Add team ownership for urfave/cli/v3 dependency
- Assign @grafana/grafana-backend-group as owner for github.com/urfave/cli/v3@v3.3.8
- Follows existing pattern: urfave/cli v1 and v2 also owned by grafana-backend-group
- Resolves Backend Code Checks / Validate Backend Configs CI failure
- Required for E2E runner infrastructure dependency ownership compliance
Fixes: modowners check requiring team assignment for newly added dependencies
* Fix: Revert experimental E2E playwright infrastructure to stable version
- Revert pr-e2e-tests.yml to stable Cypress-based E2E testing
- Remove experimental storybook-verification-playwright.yml workflow
- Revert run-dashboard-search-e2e.yml and release-pr.yml to use e2e/test-plugins/
- Keep stable E2E runner infrastructure (e2e/main.go + e2e/internal/)
- Remove experimental playwright features per team recommendation
Team feedback: Playwright tests are experimental and shouldn't be backported to stable release branches
* Fix: Complete cleanup of experimental playwright dependencies
- Revert package.json to stable version (remove e2e-playwright scripts and path references)
- Revert playwright.config.ts to stable plugin-e2e configuration
- Remove all experimental playwright infrastructure dependencies
- Ensure clean stable E2E testing environment
All experimental features removed per team recommendation for stable release branches
* Fix: Restore working package.json configuration
- Revert package.json to version 12.0.3 (working release branch version)
- Fix workspace dependency resolution issues caused by incorrect revert to main branch version
- FE tests, betterer, and linting should now work correctly
Issue was caused by reverting package.json to main branch (12.1.0-pre) instead of keeping
the working release branch configuration (12.0.3)
* CI: mirror some CI dependencies (#106148)
* mirror some CI dependencies
* remove -v from go build
* Fix: Backport missing e2e/run-suite script for daggerbuild E2E system
The daggerbuild E2E system (used by OSS workflows) expects ./e2e/run-suite
to exist, but we only backported the new E2E runner infrastructure.
This script is needed for:
- OSS workflow: 'go run ./pkg/build/e2e --suite=dashboards-suite'
- Legacy Cypress configuration with video support
- Integration between daggerbuild and existing Cypress test suites
Resolves E2E test failures in OSS workflows where videos directory
cannot be found because run-suite script was missing.
* Fix: Resolve daggerbuild E2E path doubling issue
- Extract just suite name from full path using filepath.Base()
- Prevents doubled paths like './e2e/e2e/dashboards-suite/videos'
- Resolves 'no spec files found' and 'no such file or directory' errors
- GitHub Actions passes full paths like 'e2e/dashboards-suite' but run-suite script expects just 'dashboards-suite'
* Infrastructure: Wholesale copy pkg/build/ from main
COMPLETE DAGGERBUILD SYSTEM UPDATE:
- Modern E2E system with CLI framework and --flags support
- New accessibility testing system (a11y/)
- New Playwright E2E testing system (e2e-playwright/)
- External infrastructure improvements (musl.cc → dl.grafana.com/ci)
- Updated daggerbuild core components with latest fixes
- Updated Go dependencies and wire modules
ARCHITECTURAL COMPATIBILITY VERIFIED:
- Modern pkg/build calls: ./e2e-runner cypress --start-grafana=false --cypress-video
- Our e2e runner supports: All required parameters including --suite, --env flags
- GitHub Actions workflows: Pass compatible arguments
- Binary builds: Successfully creates working e2e-runner
RESOLVES ISSUES:
- Fixes --flags parameter compatibility with GitHub Actions
- Includes all follow-up infrastructure improvements
- Provides complete, tested system with modern CLI framework
- Eliminates external dependency failures (musl.cc timeouts)
- Removes need for path doubling workarounds (modern system handles full paths correctly)
Replaces incremental cherry-picking with complete, tested system from main.
* Dependencies: Update Go modules after pkg/build wholesale copy
DEPENDENCY UPDATES:
- Updated go.work.sum with new dependencies from modern pkg/build system
- Updated all workspace module dependencies (go.mod/go.sum files)
- Removed pkg/build/cmd/enterprise.go (enterprise-only file, gets copied during enterprise development)
ENTERPRISE INTEGRATION FIX:
- enterprise.go file doesn't belong in OSS repository
- Gets copied from grafana-enterprise during development mode
- Main branch doesn't have this file, explaining module compatibility
All Go modules now properly resolved and compatible with modern pkg/build architecture.
* Dependencies: Update workspace Go module checksums after pkg/build wholesale copy
- Synchronizes all go.sum files across workspace modules
- Adds missing .mod.h1 entries that were required after infrastructure update
- Resolves Go Workspace Check CI failures
- Updates 22 modules: .citools/, apps/, pkg/ subdirectories plus go.work.sum
Addresses CI error: 'Please run make update-workspace and commit the changes'
* Infrastructure: Revert to pre-Playwright E2E system for release branch compatibility
Strategic combination of modern daggerbuild with stable E2E infrastructure:
**Modern Daggerbuild (from main):**
- Latest CLI framework (github.com/urfave/cli/v3)
- External infrastructure fixes (musl.cc → dl.grafana.com/ci)
- Complete pkg/build/ system with all enhancements
- Updated dependencies and architecture improvements
**Stable E2E Infrastructure (pre-Playwright):**
- pkg/build/e2e/service.go: Reverted to version before commit b6580ccb103942d3ea26c52fac320810aa93fa1e
- pkg/build/a11y/: Reverted to stable version compatible with existing infrastructure
- Removed experimental pkg/build/e2e-playwright/ system
- Removed experimental e2e-playwright/ test infrastructure
**Why This Approach:**
- GitHub Actions workflows call 'go run ./pkg/build/e2e' (modern system)
- Modern system now expects only standard e2e/ directory (compatible)
- Release branches have standard e2e/ infrastructure (dashboards-suite, various-suite, etc.)
- Eliminates dependency on experimental Playwright infrastructure
**Key Dependencies Met:**
- e2e/pa11yci.conf.js: Added for a11y test compatibility
- /src/e2e directory: Standard directory structure (no e2e-playwright needed)
- Existing test plugins: Uses stable e2e/test-plugins/
**Result:**
Best of both worlds - modern, reliable daggerbuild infrastructure with
proven E2E testing that works across all release branches without
requiring experimental dependencies.
* Fix: Remove unused embed.go file causing golangci-lint failure
- Removes pkg/build/daggerbuild/msi/embed.go with unused embed.FS variable
- MSI build process uses directory mounting instead of embedded filesystem
- Resolves 'var resources is unused (unused)' linting error
* Fix: Update Node.js version to match working E2E configuration
- Changes from v22.11.0 to v22.16.0 to match commit 17952d45e4e406ca7c6f5f441e4ce3ca9d20982a
- Working commit had all E2E tests passing with same daggerbuild infrastructure
- Node.js version differences can affect frontend builds and UI rendering
- Ensures consistent environment between working reference and current branch
* Fix: Use conditional container base for E2E compatibility
- Alpine for OSS tests (better old arch dashboardScene=false compatibility)
- Ubuntu for Enterprise tests (when image renderer needed)
- Restores original release-12.0.3 Alpine behavior for OSS
- Should resolve old arch E2E test failures
* Fix: Go fmt formatting for conditional container logic
* Revert: Remove unnecessary Alpine/Ubuntu conditional logic
- Real issue was wrong environment variable name (dashboardScene vs DISABLE_SCENES)
- Keep Ubuntu base (original main branch behavior) for simplicity
- Container base was not the root cause of old arch failures
* Experiment: Copy scripts/ from pre-Playwright commit (ea0ddb3fc95)
- Copied scripts directory from commit ea0ddb3fc95 (just before Playwright migration)
- This overwrites some CI migration fixes but testing if it's actually needed
- Can revert back to b9b4602dbd5 if CI breaks
Test commit to see real impact on GitHub Actions workflows.
* trigger ci 01
* Fix: Copy .drone.star from main to match scripts structure
- Resolves Starlark evaluation error for missing integration_test_pipelines
- Aligns .drone.star with main branch scripts structure
- Same fix applied to both OSS and Enterprise repositories
* make drone
* Fix ARM/v7 Docker build failures by using dagger run for cross-compilation
- Change artifacts_cmd() in scripts/drone/steps/rgm.star to use 'dagger run go run' instead of 'go run'
- Add --max-execution-steps 100000 to make drone target in Makefile to properly regenerate .drone.yml
- This fixes CGO cross-compilation issues with SQLite for ARM/v7 Docker builds
- Matches the approach already used successfully in Enterprise builds
* Fix Docker base image references in rgm build steps
- Change from symbolic names (alpine-base, ubuntu-base) to actual Docker images
- alpine-base → alpine:3.21.3
- ubuntu-base → ubuntu:22.04
- Add ubuntu and alpine parameters to rgm_artifacts_step and rgm_build_docker_step functions
- Fixes Docker pull errors: 'repository does not exist or may require authorization'
- Aligns OSS configuration with Enterprise approach
---------
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2025-07-18 23:14:14 +08:00
|
|
|
"scripts/drone/dagger.star",
|
|
|
|
|
"with_dagger_install",
|
2023-07-28 22:58:22 +08:00
|
|
|
)
|
2023-09-12 23:19:06 +08:00
|
|
|
load(
|
CI Migration: Backport pkg/build (daggerbuild) and GHAs to `release-12.0.3` (#107997)
* CI: move grafana-build into pkg/build (#105640)
* move grafana-build into pkg/build
* Update go.mod/go.sum files after cherry-pick build
- Updates from workspace sync after cherry-picking daggerbuild package
- Resolves dependency conflicts from pkg/build integration
- Required for successful build after CI migration backport
* CI Migration: Replace .github with main branch version
- Complete replacement of .github directory from main branch
- Includes updated workflows, actions, and configuration files
- Ensures all CI improvements from main are included
- Next step: fix branch-specific issues in separate commits
* Fix branch triggers: Update workflows to target release branches
- Update 8 workflows to trigger on release-* instead of main
- Ensures workflows run on pull requests to release branches
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* Fix branch triggers: Update workflows to target both main and release branches
- CORRECTED: Include both main and release-* branch patterns
- Ensures workflows run on both main branch (original functionality) and release branches (needed for backport)
- Previous commit incorrectly removed main branch support
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* CI Migration: Update .gitignore to allow OSS wire file to be committed
- Remove **/wire_gen.go (allow pkg/server/wire_gen.go to be committed)
- Add /pkg/server/enterprise_wire_gen.go (keep enterprise wire file ignored)
- This enables the new committed wire files architecture for CI
* CI Migration: Add enhanced wire tool with automatic build constraints
- Backport enhanced wire tool from main branch with -gen_tags flag
- This enables automatic regeneration with proper constraints to prevent conflicts
- Wire file contains all required functions: Initialize, InitializeDocumentBuilders, etc.
- Solves the missing wire functions issue causing CI failures
- Enhanced tool ensures build constraints persist on regeneration
* CI Migration: Update Makefile to use enhanced wire tool with build constraints
- Update gen-go target to use -gen_tags flag for automatic build constraints
- Ensures future engineers get proper build constraints when running 'make gen-go'
- Matches main branch approach for consistent wire file generation
- Removes dependency on WIRE_TAGS variable and GO_RACE_FLAG for simplicity
* Add gen-enterprise-go target to Makefile for release-12.0.3
- Backports gen-enterprise-go target from main branch
- Enables enterprise wire file generation in release branches
- Part of CI migration backport wire infrastructure fixes
- Resolves CI issues where enterprise wire functions were missing
* Fix wire tool golden file format for Drone CI compatibility
- Update all 43 golden test files to match main branch format
- Change go:generate command from github.com/google/wire/cmd/wire to ./pkg/build/wire/cmd/wire/main.go
- Remove legacy '// +build !wireinject' constraints
- Fixes Drone CI test failures that were blocking OSS PR merge
- All wire tests now pass successfully
This aligns the backport branch with the golden file format updates
that were made in main branch when the wire tool was enhanced.
* Update swagger specs to include enterprise APIs
- Regenerated api-enterprise-spec.json with enterprise API definitions
- Updated api-merged.json with merged OSS and enterprise specs
- Regenerated openapi3.json with complete API specifications
- Fixes enterprise CI swagger generation validation failures
- Enterprise APIs now properly detected and documented
* Fix OSS integration tests missing enterprise build tags in Drone CI
- Add -tags=enterprise to all integration test steps in lib.star
- Fixes test-backend-integration, postgres-integration-tests, and mysql-integration-tests
- Regenerate .drone.yml with proper enterprise build tags
- Resolves 'server could not find the requested resource' errors for enterprise APIs
- Ensures enterprise APIs (querylibrary, reporting, banners, scim) are registered during tests
- Aligns OSS Drone CI with GitHub Actions behavior and enterprise repository
* Fix CODEOWNERS for release-12.0.3 compatibility
- Remove 21 entries that reference files/directories not present in release branch
- Resolves File Exist Checker failures in codeowners-validator workflow
- Maintains team ownership assignments from main branch for existing files
- Lines removed: .air.toml, apps/secret/, apps/iam/, e2e-playwright/, packages/grafana-alerting/, etc.
* baldm0mma/ update releasefinder
* Add i18n-extract script for release branch compatibility
- Add 'i18n-extract': 'make i18n-extract' to package.json scripts
- Resolves i18n-verify workflow failure that expects this script
- The make target already exists and handles OSS + enterprise i18n extraction
- Maintains i18n verification functionality from main branch workflows
- Simple safe addition that calls existing make infrastructure
* Phase 4: Fix GitHub Actions workflow branch triggers
- Add release-*.*.* pattern to 8 workflows missing it
- Fix duplicate release branch patterns in 3 workflows
- Ensure consistent branch trigger format across all workflows
- Critical workflows now properly trigger on release branches
Fixes workflows: actionlint, backend-code-checks, go-lint, reject-gh-secrets,
run-schema-v2-e2e, shellcheck, swagger-gen, trivy-scan
* Fix: Backport E2E runner infrastructure for Enterprise CI
- Add e2e/main.go and e2e/internal/ directory from main branch
- Add urfave/cli/v3 dependency required by E2E runner
- Fixes Enterprise CI failure: 'Build E2E test runner' and 'Build & package Grafana for e2e tests'
- Root cause: E2E runner infrastructure was added to main after release-12.0.3 branch creation
- Solution: Backport missing E2E runner files to enable Enterprise CI completion
Resolves: no Go files in /opt/actions-runner/_work/grafana-enterprise/grafana-enterprise/grafana/e2e
* Fix: Update go.mod dependency classification for urfave/cli/v3
- Change urfave/cli/v3 from indirect to direct dependency
- Fixes Go Workspace Check failure in CI
- Required after adding E2E runner infrastructure that directly imports urfave/cli/v3
- Resolves: make update-workspace corrects dependency classification
* Fix: Add team ownership for urfave/cli/v3 dependency
- Assign @grafana/grafana-backend-group as owner for github.com/urfave/cli/v3@v3.3.8
- Follows existing pattern: urfave/cli v1 and v2 also owned by grafana-backend-group
- Resolves Backend Code Checks / Validate Backend Configs CI failure
- Required for E2E runner infrastructure dependency ownership compliance
Fixes: modowners check requiring team assignment for newly added dependencies
* Fix: Revert experimental E2E playwright infrastructure to stable version
- Revert pr-e2e-tests.yml to stable Cypress-based E2E testing
- Remove experimental storybook-verification-playwright.yml workflow
- Revert run-dashboard-search-e2e.yml and release-pr.yml to use e2e/test-plugins/
- Keep stable E2E runner infrastructure (e2e/main.go + e2e/internal/)
- Remove experimental playwright features per team recommendation
Team feedback: Playwright tests are experimental and shouldn't be backported to stable release branches
* Fix: Complete cleanup of experimental playwright dependencies
- Revert package.json to stable version (remove e2e-playwright scripts and path references)
- Revert playwright.config.ts to stable plugin-e2e configuration
- Remove all experimental playwright infrastructure dependencies
- Ensure clean stable E2E testing environment
All experimental features removed per team recommendation for stable release branches
* Fix: Restore working package.json configuration
- Revert package.json to version 12.0.3 (working release branch version)
- Fix workspace dependency resolution issues caused by incorrect revert to main branch version
- FE tests, betterer, and linting should now work correctly
Issue was caused by reverting package.json to main branch (12.1.0-pre) instead of keeping
the working release branch configuration (12.0.3)
* CI: mirror some CI dependencies (#106148)
* mirror some CI dependencies
* remove -v from go build
* Fix: Backport missing e2e/run-suite script for daggerbuild E2E system
The daggerbuild E2E system (used by OSS workflows) expects ./e2e/run-suite
to exist, but we only backported the new E2E runner infrastructure.
This script is needed for:
- OSS workflow: 'go run ./pkg/build/e2e --suite=dashboards-suite'
- Legacy Cypress configuration with video support
- Integration between daggerbuild and existing Cypress test suites
Resolves E2E test failures in OSS workflows where videos directory
cannot be found because run-suite script was missing.
* Fix: Resolve daggerbuild E2E path doubling issue
- Extract just suite name from full path using filepath.Base()
- Prevents doubled paths like './e2e/e2e/dashboards-suite/videos'
- Resolves 'no spec files found' and 'no such file or directory' errors
- GitHub Actions passes full paths like 'e2e/dashboards-suite' but run-suite script expects just 'dashboards-suite'
* Infrastructure: Wholesale copy pkg/build/ from main
COMPLETE DAGGERBUILD SYSTEM UPDATE:
- Modern E2E system with CLI framework and --flags support
- New accessibility testing system (a11y/)
- New Playwright E2E testing system (e2e-playwright/)
- External infrastructure improvements (musl.cc → dl.grafana.com/ci)
- Updated daggerbuild core components with latest fixes
- Updated Go dependencies and wire modules
ARCHITECTURAL COMPATIBILITY VERIFIED:
- Modern pkg/build calls: ./e2e-runner cypress --start-grafana=false --cypress-video
- Our e2e runner supports: All required parameters including --suite, --env flags
- GitHub Actions workflows: Pass compatible arguments
- Binary builds: Successfully creates working e2e-runner
RESOLVES ISSUES:
- Fixes --flags parameter compatibility with GitHub Actions
- Includes all follow-up infrastructure improvements
- Provides complete, tested system with modern CLI framework
- Eliminates external dependency failures (musl.cc timeouts)
- Removes need for path doubling workarounds (modern system handles full paths correctly)
Replaces incremental cherry-picking with complete, tested system from main.
* Dependencies: Update Go modules after pkg/build wholesale copy
DEPENDENCY UPDATES:
- Updated go.work.sum with new dependencies from modern pkg/build system
- Updated all workspace module dependencies (go.mod/go.sum files)
- Removed pkg/build/cmd/enterprise.go (enterprise-only file, gets copied during enterprise development)
ENTERPRISE INTEGRATION FIX:
- enterprise.go file doesn't belong in OSS repository
- Gets copied from grafana-enterprise during development mode
- Main branch doesn't have this file, explaining module compatibility
All Go modules now properly resolved and compatible with modern pkg/build architecture.
* Dependencies: Update workspace Go module checksums after pkg/build wholesale copy
- Synchronizes all go.sum files across workspace modules
- Adds missing .mod.h1 entries that were required after infrastructure update
- Resolves Go Workspace Check CI failures
- Updates 22 modules: .citools/, apps/, pkg/ subdirectories plus go.work.sum
Addresses CI error: 'Please run make update-workspace and commit the changes'
* Infrastructure: Revert to pre-Playwright E2E system for release branch compatibility
Strategic combination of modern daggerbuild with stable E2E infrastructure:
**Modern Daggerbuild (from main):**
- Latest CLI framework (github.com/urfave/cli/v3)
- External infrastructure fixes (musl.cc → dl.grafana.com/ci)
- Complete pkg/build/ system with all enhancements
- Updated dependencies and architecture improvements
**Stable E2E Infrastructure (pre-Playwright):**
- pkg/build/e2e/service.go: Reverted to version before commit b6580ccb103942d3ea26c52fac320810aa93fa1e
- pkg/build/a11y/: Reverted to stable version compatible with existing infrastructure
- Removed experimental pkg/build/e2e-playwright/ system
- Removed experimental e2e-playwright/ test infrastructure
**Why This Approach:**
- GitHub Actions workflows call 'go run ./pkg/build/e2e' (modern system)
- Modern system now expects only standard e2e/ directory (compatible)
- Release branches have standard e2e/ infrastructure (dashboards-suite, various-suite, etc.)
- Eliminates dependency on experimental Playwright infrastructure
**Key Dependencies Met:**
- e2e/pa11yci.conf.js: Added for a11y test compatibility
- /src/e2e directory: Standard directory structure (no e2e-playwright needed)
- Existing test plugins: Uses stable e2e/test-plugins/
**Result:**
Best of both worlds - modern, reliable daggerbuild infrastructure with
proven E2E testing that works across all release branches without
requiring experimental dependencies.
* Fix: Remove unused embed.go file causing golangci-lint failure
- Removes pkg/build/daggerbuild/msi/embed.go with unused embed.FS variable
- MSI build process uses directory mounting instead of embedded filesystem
- Resolves 'var resources is unused (unused)' linting error
* Fix: Update Node.js version to match working E2E configuration
- Changes from v22.11.0 to v22.16.0 to match commit 17952d45e4e406ca7c6f5f441e4ce3ca9d20982a
- Working commit had all E2E tests passing with same daggerbuild infrastructure
- Node.js version differences can affect frontend builds and UI rendering
- Ensures consistent environment between working reference and current branch
* Fix: Use conditional container base for E2E compatibility
- Alpine for OSS tests (better old arch dashboardScene=false compatibility)
- Ubuntu for Enterprise tests (when image renderer needed)
- Restores original release-12.0.3 Alpine behavior for OSS
- Should resolve old arch E2E test failures
* Fix: Go fmt formatting for conditional container logic
* Revert: Remove unnecessary Alpine/Ubuntu conditional logic
- Real issue was wrong environment variable name (dashboardScene vs DISABLE_SCENES)
- Keep Ubuntu base (original main branch behavior) for simplicity
- Container base was not the root cause of old arch failures
* Experiment: Copy scripts/ from pre-Playwright commit (ea0ddb3fc95)
- Copied scripts directory from commit ea0ddb3fc95 (just before Playwright migration)
- This overwrites some CI migration fixes but testing if it's actually needed
- Can revert back to b9b4602dbd5 if CI breaks
Test commit to see real impact on GitHub Actions workflows.
* trigger ci 01
* Fix: Copy .drone.star from main to match scripts structure
- Resolves Starlark evaluation error for missing integration_test_pipelines
- Aligns .drone.star with main branch scripts structure
- Same fix applied to both OSS and Enterprise repositories
* make drone
* Fix ARM/v7 Docker build failures by using dagger run for cross-compilation
- Change artifacts_cmd() in scripts/drone/steps/rgm.star to use 'dagger run go run' instead of 'go run'
- Add --max-execution-steps 100000 to make drone target in Makefile to properly regenerate .drone.yml
- This fixes CGO cross-compilation issues with SQLite for ARM/v7 Docker builds
- Matches the approach already used successfully in Enterprise builds
* Fix Docker base image references in rgm build steps
- Change from symbolic names (alpine-base, ubuntu-base) to actual Docker images
- alpine-base → alpine:3.21.3
- ubuntu-base → ubuntu:22.04
- Add ubuntu and alpine parameters to rgm_artifacts_step and rgm_build_docker_step functions
- Fixes Docker pull errors: 'repository does not exist or may require authorization'
- Aligns OSS configuration with Enterprise approach
---------
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2025-07-18 23:14:14 +08:00
|
|
|
"scripts/drone/events/release.star",
|
|
|
|
|
"verify_release_pipeline",
|
2023-09-12 23:19:06 +08:00
|
|
|
)
|
2024-11-21 23:08:02 +08:00
|
|
|
load(
|
|
|
|
|
"scripts/drone/steps/github.star",
|
|
|
|
|
"github_app_generate_token_step",
|
2025-02-25 02:36:13 +08:00
|
|
|
"github_app_pipeline_volumes",
|
2024-11-21 23:08:02 +08:00
|
|
|
"github_app_step_volumes",
|
|
|
|
|
)
|
2023-10-05 00:55:43 +08:00
|
|
|
load(
|
|
|
|
|
"scripts/drone/utils/images.star",
|
|
|
|
|
"images",
|
|
|
|
|
)
|
2023-09-12 23:19:06 +08:00
|
|
|
load(
|
|
|
|
|
"scripts/drone/utils/utils.star",
|
|
|
|
|
"pipeline",
|
2023-10-05 00:55:43 +08:00
|
|
|
"with_deps",
|
2023-09-12 23:19:06 +08:00
|
|
|
)
|
|
|
|
|
load(
|
|
|
|
|
"scripts/drone/variables.star",
|
CI Migration: Backport pkg/build (daggerbuild) and GHAs to `release-12.0.3` (#107997)
* CI: move grafana-build into pkg/build (#105640)
* move grafana-build into pkg/build
* Update go.mod/go.sum files after cherry-pick build
- Updates from workspace sync after cherry-picking daggerbuild package
- Resolves dependency conflicts from pkg/build integration
- Required for successful build after CI migration backport
* CI Migration: Replace .github with main branch version
- Complete replacement of .github directory from main branch
- Includes updated workflows, actions, and configuration files
- Ensures all CI improvements from main are included
- Next step: fix branch-specific issues in separate commits
* Fix branch triggers: Update workflows to target release branches
- Update 8 workflows to trigger on release-* instead of main
- Ensures workflows run on pull requests to release branches
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* Fix branch triggers: Update workflows to target both main and release branches
- CORRECTED: Include both main and release-* branch patterns
- Ensures workflows run on both main branch (original functionality) and release branches (needed for backport)
- Previous commit incorrectly removed main branch support
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* CI Migration: Update .gitignore to allow OSS wire file to be committed
- Remove **/wire_gen.go (allow pkg/server/wire_gen.go to be committed)
- Add /pkg/server/enterprise_wire_gen.go (keep enterprise wire file ignored)
- This enables the new committed wire files architecture for CI
* CI Migration: Add enhanced wire tool with automatic build constraints
- Backport enhanced wire tool from main branch with -gen_tags flag
- This enables automatic regeneration with proper constraints to prevent conflicts
- Wire file contains all required functions: Initialize, InitializeDocumentBuilders, etc.
- Solves the missing wire functions issue causing CI failures
- Enhanced tool ensures build constraints persist on regeneration
* CI Migration: Update Makefile to use enhanced wire tool with build constraints
- Update gen-go target to use -gen_tags flag for automatic build constraints
- Ensures future engineers get proper build constraints when running 'make gen-go'
- Matches main branch approach for consistent wire file generation
- Removes dependency on WIRE_TAGS variable and GO_RACE_FLAG for simplicity
* Add gen-enterprise-go target to Makefile for release-12.0.3
- Backports gen-enterprise-go target from main branch
- Enables enterprise wire file generation in release branches
- Part of CI migration backport wire infrastructure fixes
- Resolves CI issues where enterprise wire functions were missing
* Fix wire tool golden file format for Drone CI compatibility
- Update all 43 golden test files to match main branch format
- Change go:generate command from github.com/google/wire/cmd/wire to ./pkg/build/wire/cmd/wire/main.go
- Remove legacy '// +build !wireinject' constraints
- Fixes Drone CI test failures that were blocking OSS PR merge
- All wire tests now pass successfully
This aligns the backport branch with the golden file format updates
that were made in main branch when the wire tool was enhanced.
* Update swagger specs to include enterprise APIs
- Regenerated api-enterprise-spec.json with enterprise API definitions
- Updated api-merged.json with merged OSS and enterprise specs
- Regenerated openapi3.json with complete API specifications
- Fixes enterprise CI swagger generation validation failures
- Enterprise APIs now properly detected and documented
* Fix OSS integration tests missing enterprise build tags in Drone CI
- Add -tags=enterprise to all integration test steps in lib.star
- Fixes test-backend-integration, postgres-integration-tests, and mysql-integration-tests
- Regenerate .drone.yml with proper enterprise build tags
- Resolves 'server could not find the requested resource' errors for enterprise APIs
- Ensures enterprise APIs (querylibrary, reporting, banners, scim) are registered during tests
- Aligns OSS Drone CI with GitHub Actions behavior and enterprise repository
* Fix CODEOWNERS for release-12.0.3 compatibility
- Remove 21 entries that reference files/directories not present in release branch
- Resolves File Exist Checker failures in codeowners-validator workflow
- Maintains team ownership assignments from main branch for existing files
- Lines removed: .air.toml, apps/secret/, apps/iam/, e2e-playwright/, packages/grafana-alerting/, etc.
* baldm0mma/ update releasefinder
* Add i18n-extract script for release branch compatibility
- Add 'i18n-extract': 'make i18n-extract' to package.json scripts
- Resolves i18n-verify workflow failure that expects this script
- The make target already exists and handles OSS + enterprise i18n extraction
- Maintains i18n verification functionality from main branch workflows
- Simple safe addition that calls existing make infrastructure
* Phase 4: Fix GitHub Actions workflow branch triggers
- Add release-*.*.* pattern to 8 workflows missing it
- Fix duplicate release branch patterns in 3 workflows
- Ensure consistent branch trigger format across all workflows
- Critical workflows now properly trigger on release branches
Fixes workflows: actionlint, backend-code-checks, go-lint, reject-gh-secrets,
run-schema-v2-e2e, shellcheck, swagger-gen, trivy-scan
* Fix: Backport E2E runner infrastructure for Enterprise CI
- Add e2e/main.go and e2e/internal/ directory from main branch
- Add urfave/cli/v3 dependency required by E2E runner
- Fixes Enterprise CI failure: 'Build E2E test runner' and 'Build & package Grafana for e2e tests'
- Root cause: E2E runner infrastructure was added to main after release-12.0.3 branch creation
- Solution: Backport missing E2E runner files to enable Enterprise CI completion
Resolves: no Go files in /opt/actions-runner/_work/grafana-enterprise/grafana-enterprise/grafana/e2e
* Fix: Update go.mod dependency classification for urfave/cli/v3
- Change urfave/cli/v3 from indirect to direct dependency
- Fixes Go Workspace Check failure in CI
- Required after adding E2E runner infrastructure that directly imports urfave/cli/v3
- Resolves: make update-workspace corrects dependency classification
* Fix: Add team ownership for urfave/cli/v3 dependency
- Assign @grafana/grafana-backend-group as owner for github.com/urfave/cli/v3@v3.3.8
- Follows existing pattern: urfave/cli v1 and v2 also owned by grafana-backend-group
- Resolves Backend Code Checks / Validate Backend Configs CI failure
- Required for E2E runner infrastructure dependency ownership compliance
Fixes: modowners check requiring team assignment for newly added dependencies
* Fix: Revert experimental E2E playwright infrastructure to stable version
- Revert pr-e2e-tests.yml to stable Cypress-based E2E testing
- Remove experimental storybook-verification-playwright.yml workflow
- Revert run-dashboard-search-e2e.yml and release-pr.yml to use e2e/test-plugins/
- Keep stable E2E runner infrastructure (e2e/main.go + e2e/internal/)
- Remove experimental playwright features per team recommendation
Team feedback: Playwright tests are experimental and shouldn't be backported to stable release branches
* Fix: Complete cleanup of experimental playwright dependencies
- Revert package.json to stable version (remove e2e-playwright scripts and path references)
- Revert playwright.config.ts to stable plugin-e2e configuration
- Remove all experimental playwright infrastructure dependencies
- Ensure clean stable E2E testing environment
All experimental features removed per team recommendation for stable release branches
* Fix: Restore working package.json configuration
- Revert package.json to version 12.0.3 (working release branch version)
- Fix workspace dependency resolution issues caused by incorrect revert to main branch version
- FE tests, betterer, and linting should now work correctly
Issue was caused by reverting package.json to main branch (12.1.0-pre) instead of keeping
the working release branch configuration (12.0.3)
* CI: mirror some CI dependencies (#106148)
* mirror some CI dependencies
* remove -v from go build
* Fix: Backport missing e2e/run-suite script for daggerbuild E2E system
The daggerbuild E2E system (used by OSS workflows) expects ./e2e/run-suite
to exist, but we only backported the new E2E runner infrastructure.
This script is needed for:
- OSS workflow: 'go run ./pkg/build/e2e --suite=dashboards-suite'
- Legacy Cypress configuration with video support
- Integration between daggerbuild and existing Cypress test suites
Resolves E2E test failures in OSS workflows where videos directory
cannot be found because run-suite script was missing.
* Fix: Resolve daggerbuild E2E path doubling issue
- Extract just suite name from full path using filepath.Base()
- Prevents doubled paths like './e2e/e2e/dashboards-suite/videos'
- Resolves 'no spec files found' and 'no such file or directory' errors
- GitHub Actions passes full paths like 'e2e/dashboards-suite' but run-suite script expects just 'dashboards-suite'
* Infrastructure: Wholesale copy pkg/build/ from main
COMPLETE DAGGERBUILD SYSTEM UPDATE:
- Modern E2E system with CLI framework and --flags support
- New accessibility testing system (a11y/)
- New Playwright E2E testing system (e2e-playwright/)
- External infrastructure improvements (musl.cc → dl.grafana.com/ci)
- Updated daggerbuild core components with latest fixes
- Updated Go dependencies and wire modules
ARCHITECTURAL COMPATIBILITY VERIFIED:
- Modern pkg/build calls: ./e2e-runner cypress --start-grafana=false --cypress-video
- Our e2e runner supports: All required parameters including --suite, --env flags
- GitHub Actions workflows: Pass compatible arguments
- Binary builds: Successfully creates working e2e-runner
RESOLVES ISSUES:
- Fixes --flags parameter compatibility with GitHub Actions
- Includes all follow-up infrastructure improvements
- Provides complete, tested system with modern CLI framework
- Eliminates external dependency failures (musl.cc timeouts)
- Removes need for path doubling workarounds (modern system handles full paths correctly)
Replaces incremental cherry-picking with complete, tested system from main.
* Dependencies: Update Go modules after pkg/build wholesale copy
DEPENDENCY UPDATES:
- Updated go.work.sum with new dependencies from modern pkg/build system
- Updated all workspace module dependencies (go.mod/go.sum files)
- Removed pkg/build/cmd/enterprise.go (enterprise-only file, gets copied during enterprise development)
ENTERPRISE INTEGRATION FIX:
- enterprise.go file doesn't belong in OSS repository
- Gets copied from grafana-enterprise during development mode
- Main branch doesn't have this file, explaining module compatibility
All Go modules now properly resolved and compatible with modern pkg/build architecture.
* Dependencies: Update workspace Go module checksums after pkg/build wholesale copy
- Synchronizes all go.sum files across workspace modules
- Adds missing .mod.h1 entries that were required after infrastructure update
- Resolves Go Workspace Check CI failures
- Updates 22 modules: .citools/, apps/, pkg/ subdirectories plus go.work.sum
Addresses CI error: 'Please run make update-workspace and commit the changes'
* Infrastructure: Revert to pre-Playwright E2E system for release branch compatibility
Strategic combination of modern daggerbuild with stable E2E infrastructure:
**Modern Daggerbuild (from main):**
- Latest CLI framework (github.com/urfave/cli/v3)
- External infrastructure fixes (musl.cc → dl.grafana.com/ci)
- Complete pkg/build/ system with all enhancements
- Updated dependencies and architecture improvements
**Stable E2E Infrastructure (pre-Playwright):**
- pkg/build/e2e/service.go: Reverted to version before commit b6580ccb103942d3ea26c52fac320810aa93fa1e
- pkg/build/a11y/: Reverted to stable version compatible with existing infrastructure
- Removed experimental pkg/build/e2e-playwright/ system
- Removed experimental e2e-playwright/ test infrastructure
**Why This Approach:**
- GitHub Actions workflows call 'go run ./pkg/build/e2e' (modern system)
- Modern system now expects only standard e2e/ directory (compatible)
- Release branches have standard e2e/ infrastructure (dashboards-suite, various-suite, etc.)
- Eliminates dependency on experimental Playwright infrastructure
**Key Dependencies Met:**
- e2e/pa11yci.conf.js: Added for a11y test compatibility
- /src/e2e directory: Standard directory structure (no e2e-playwright needed)
- Existing test plugins: Uses stable e2e/test-plugins/
**Result:**
Best of both worlds - modern, reliable daggerbuild infrastructure with
proven E2E testing that works across all release branches without
requiring experimental dependencies.
* Fix: Remove unused embed.go file causing golangci-lint failure
- Removes pkg/build/daggerbuild/msi/embed.go with unused embed.FS variable
- MSI build process uses directory mounting instead of embedded filesystem
- Resolves 'var resources is unused (unused)' linting error
* Fix: Update Node.js version to match working E2E configuration
- Changes from v22.11.0 to v22.16.0 to match commit 17952d45e4e406ca7c6f5f441e4ce3ca9d20982a
- Working commit had all E2E tests passing with same daggerbuild infrastructure
- Node.js version differences can affect frontend builds and UI rendering
- Ensures consistent environment between working reference and current branch
* Fix: Use conditional container base for E2E compatibility
- Alpine for OSS tests (better old arch dashboardScene=false compatibility)
- Ubuntu for Enterprise tests (when image renderer needed)
- Restores original release-12.0.3 Alpine behavior for OSS
- Should resolve old arch E2E test failures
* Fix: Go fmt formatting for conditional container logic
* Revert: Remove unnecessary Alpine/Ubuntu conditional logic
- Real issue was wrong environment variable name (dashboardScene vs DISABLE_SCENES)
- Keep Ubuntu base (original main branch behavior) for simplicity
- Container base was not the root cause of old arch failures
* Experiment: Copy scripts/ from pre-Playwright commit (ea0ddb3fc95)
- Copied scripts directory from commit ea0ddb3fc95 (just before Playwright migration)
- This overwrites some CI migration fixes but testing if it's actually needed
- Can revert back to b9b4602dbd5 if CI breaks
Test commit to see real impact on GitHub Actions workflows.
* trigger ci 01
* Fix: Copy .drone.star from main to match scripts structure
- Resolves Starlark evaluation error for missing integration_test_pipelines
- Aligns .drone.star with main branch scripts structure
- Same fix applied to both OSS and Enterprise repositories
* make drone
* Fix ARM/v7 Docker build failures by using dagger run for cross-compilation
- Change artifacts_cmd() in scripts/drone/steps/rgm.star to use 'dagger run go run' instead of 'go run'
- Add --max-execution-steps 100000 to make drone target in Makefile to properly regenerate .drone.yml
- This fixes CGO cross-compilation issues with SQLite for ARM/v7 Docker builds
- Matches the approach already used successfully in Enterprise builds
* Fix Docker base image references in rgm build steps
- Change from symbolic names (alpine-base, ubuntu-base) to actual Docker images
- alpine-base → alpine:3.21.3
- ubuntu-base → ubuntu:22.04
- Add ubuntu and alpine parameters to rgm_artifacts_step and rgm_build_docker_step functions
- Fixes Docker pull errors: 'repository does not exist or may require authorization'
- Aligns OSS configuration with Enterprise approach
---------
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2025-07-18 23:14:14 +08:00
|
|
|
"dagger_version",
|
2023-09-12 23:19:06 +08:00
|
|
|
)
|
2023-05-04 02:56:02 +08:00
|
|
|
load(
|
|
|
|
|
"scripts/drone/vault.star",
|
|
|
|
|
"from_secret",
|
2023-10-05 00:55:43 +08:00
|
|
|
"npm_token",
|
|
|
|
|
"rgm_cdn_destination",
|
2023-05-18 01:19:53 +08:00
|
|
|
"rgm_dagger_token",
|
2023-05-04 02:56:02 +08:00
|
|
|
"rgm_destination",
|
2023-10-05 00:55:43 +08:00
|
|
|
"rgm_downloads_destination",
|
2023-05-04 02:56:02 +08:00
|
|
|
"rgm_gcp_key_base64",
|
2023-10-05 00:55:43 +08:00
|
|
|
"rgm_storybook_destination",
|
2023-05-04 02:56:02 +08:00
|
|
|
)
|
|
|
|
|
|
2023-07-28 22:58:22 +08:00
|
|
|
docs_paths = {
|
|
|
|
|
"exclude": [
|
|
|
|
|
"*.md",
|
|
|
|
|
"docs/**",
|
|
|
|
|
"packages/**/*.md",
|
|
|
|
|
"latest.json",
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tag_trigger = {
|
|
|
|
|
"event": {
|
|
|
|
|
"exclude": [
|
|
|
|
|
"promote",
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
"ref": {
|
|
|
|
|
"include": [
|
|
|
|
|
"refs/tags/v*",
|
|
|
|
|
],
|
|
|
|
|
"exclude": [
|
|
|
|
|
"refs/tags/*-cloud*",
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-17 22:13:14 +08:00
|
|
|
main_trigger = {
|
|
|
|
|
"event": [
|
|
|
|
|
"push",
|
|
|
|
|
],
|
|
|
|
|
"branch": "main",
|
|
|
|
|
"paths": docs_paths,
|
|
|
|
|
"repo": [
|
|
|
|
|
"grafana/grafana",
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-05 00:55:43 +08:00
|
|
|
nightly_trigger = {
|
|
|
|
|
"event": {
|
|
|
|
|
"include": [
|
|
|
|
|
"cron",
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
"cron": {
|
|
|
|
|
"include": [
|
2023-10-05 13:44:24 +08:00
|
|
|
"nightly-release",
|
2023-10-05 00:55:43 +08:00
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-12 23:19:06 +08:00
|
|
|
version_branch_trigger = {"ref": ["refs/heads/v[0-9]*"]}
|
|
|
|
|
|
2023-10-05 00:55:43 +08:00
|
|
|
def rgm_env_secrets(env):
|
|
|
|
|
"""Adds the rgm secret ENV variables to the given env arg
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
env: A map of environment varables. This function will adds the necessary secrets to it (and potentially overwrite them).
|
|
|
|
|
Returns:
|
|
|
|
|
Drone step.
|
|
|
|
|
"""
|
|
|
|
|
env["DESTINATION"] = from_secret(rgm_destination)
|
|
|
|
|
env["STORYBOOK_DESTINATION"] = from_secret(rgm_storybook_destination)
|
|
|
|
|
env["CDN_DESTINATION"] = from_secret(rgm_cdn_destination)
|
|
|
|
|
env["DOWNLOADS_DESTINATION"] = from_secret(rgm_downloads_destination)
|
|
|
|
|
|
|
|
|
|
env["GCP_KEY_BASE64"] = from_secret(rgm_gcp_key_base64)
|
|
|
|
|
env["_EXPERIMENTAL_DAGGER_CLOUD_TOKEN"] = from_secret(rgm_dagger_token)
|
|
|
|
|
env["GPG_PRIVATE_KEY"] = from_secret("packages_gpg_private_key")
|
|
|
|
|
env["GPG_PUBLIC_KEY"] = from_secret("packages_gpg_public_key")
|
|
|
|
|
env["GPG_PASSPHRASE"] = from_secret("packages_gpg_passphrase")
|
|
|
|
|
env["DOCKER_USERNAME"] = from_secret("docker_username")
|
|
|
|
|
env["DOCKER_PASSWORD"] = from_secret("docker_password")
|
|
|
|
|
env["NPM_TOKEN"] = from_secret(npm_token)
|
2023-10-09 23:55:15 +08:00
|
|
|
env["GCOM_API_KEY"] = from_secret("grafana_api_key")
|
2023-10-05 00:55:43 +08:00
|
|
|
return env
|
|
|
|
|
|
|
|
|
|
def rgm_run(name, script):
|
2023-09-12 23:19:06 +08:00
|
|
|
"""Returns a pipeline that does a full build & package of Grafana.
|
|
|
|
|
|
|
|
|
|
Args:
|
2023-10-05 00:55:43 +08:00
|
|
|
name: The name of the pipeline step.
|
2023-09-12 23:19:06 +08:00
|
|
|
script: The script in the container to run.
|
|
|
|
|
Returns:
|
|
|
|
|
Drone step.
|
|
|
|
|
"""
|
|
|
|
|
env = {
|
2023-11-01 04:52:09 +08:00
|
|
|
"ALPINE_BASE": images["alpine"],
|
|
|
|
|
"UBUNTU_BASE": images["ubuntu"],
|
2023-09-12 23:19:06 +08:00
|
|
|
}
|
2023-10-05 00:55:43 +08:00
|
|
|
rgm_run_step = {
|
|
|
|
|
"name": name,
|
CI Migration: Backport pkg/build (daggerbuild) and GHAs to `release-12.0.3` (#107997)
* CI: move grafana-build into pkg/build (#105640)
* move grafana-build into pkg/build
* Update go.mod/go.sum files after cherry-pick build
- Updates from workspace sync after cherry-picking daggerbuild package
- Resolves dependency conflicts from pkg/build integration
- Required for successful build after CI migration backport
* CI Migration: Replace .github with main branch version
- Complete replacement of .github directory from main branch
- Includes updated workflows, actions, and configuration files
- Ensures all CI improvements from main are included
- Next step: fix branch-specific issues in separate commits
* Fix branch triggers: Update workflows to target release branches
- Update 8 workflows to trigger on release-* instead of main
- Ensures workflows run on pull requests to release branches
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* Fix branch triggers: Update workflows to target both main and release branches
- CORRECTED: Include both main and release-* branch patterns
- Ensures workflows run on both main branch (original functionality) and release branches (needed for backport)
- Previous commit incorrectly removed main branch support
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* CI Migration: Update .gitignore to allow OSS wire file to be committed
- Remove **/wire_gen.go (allow pkg/server/wire_gen.go to be committed)
- Add /pkg/server/enterprise_wire_gen.go (keep enterprise wire file ignored)
- This enables the new committed wire files architecture for CI
* CI Migration: Add enhanced wire tool with automatic build constraints
- Backport enhanced wire tool from main branch with -gen_tags flag
- This enables automatic regeneration with proper constraints to prevent conflicts
- Wire file contains all required functions: Initialize, InitializeDocumentBuilders, etc.
- Solves the missing wire functions issue causing CI failures
- Enhanced tool ensures build constraints persist on regeneration
* CI Migration: Update Makefile to use enhanced wire tool with build constraints
- Update gen-go target to use -gen_tags flag for automatic build constraints
- Ensures future engineers get proper build constraints when running 'make gen-go'
- Matches main branch approach for consistent wire file generation
- Removes dependency on WIRE_TAGS variable and GO_RACE_FLAG for simplicity
* Add gen-enterprise-go target to Makefile for release-12.0.3
- Backports gen-enterprise-go target from main branch
- Enables enterprise wire file generation in release branches
- Part of CI migration backport wire infrastructure fixes
- Resolves CI issues where enterprise wire functions were missing
* Fix wire tool golden file format for Drone CI compatibility
- Update all 43 golden test files to match main branch format
- Change go:generate command from github.com/google/wire/cmd/wire to ./pkg/build/wire/cmd/wire/main.go
- Remove legacy '// +build !wireinject' constraints
- Fixes Drone CI test failures that were blocking OSS PR merge
- All wire tests now pass successfully
This aligns the backport branch with the golden file format updates
that were made in main branch when the wire tool was enhanced.
* Update swagger specs to include enterprise APIs
- Regenerated api-enterprise-spec.json with enterprise API definitions
- Updated api-merged.json with merged OSS and enterprise specs
- Regenerated openapi3.json with complete API specifications
- Fixes enterprise CI swagger generation validation failures
- Enterprise APIs now properly detected and documented
* Fix OSS integration tests missing enterprise build tags in Drone CI
- Add -tags=enterprise to all integration test steps in lib.star
- Fixes test-backend-integration, postgres-integration-tests, and mysql-integration-tests
- Regenerate .drone.yml with proper enterprise build tags
- Resolves 'server could not find the requested resource' errors for enterprise APIs
- Ensures enterprise APIs (querylibrary, reporting, banners, scim) are registered during tests
- Aligns OSS Drone CI with GitHub Actions behavior and enterprise repository
* Fix CODEOWNERS for release-12.0.3 compatibility
- Remove 21 entries that reference files/directories not present in release branch
- Resolves File Exist Checker failures in codeowners-validator workflow
- Maintains team ownership assignments from main branch for existing files
- Lines removed: .air.toml, apps/secret/, apps/iam/, e2e-playwright/, packages/grafana-alerting/, etc.
* baldm0mma/ update releasefinder
* Add i18n-extract script for release branch compatibility
- Add 'i18n-extract': 'make i18n-extract' to package.json scripts
- Resolves i18n-verify workflow failure that expects this script
- The make target already exists and handles OSS + enterprise i18n extraction
- Maintains i18n verification functionality from main branch workflows
- Simple safe addition that calls existing make infrastructure
* Phase 4: Fix GitHub Actions workflow branch triggers
- Add release-*.*.* pattern to 8 workflows missing it
- Fix duplicate release branch patterns in 3 workflows
- Ensure consistent branch trigger format across all workflows
- Critical workflows now properly trigger on release branches
Fixes workflows: actionlint, backend-code-checks, go-lint, reject-gh-secrets,
run-schema-v2-e2e, shellcheck, swagger-gen, trivy-scan
* Fix: Backport E2E runner infrastructure for Enterprise CI
- Add e2e/main.go and e2e/internal/ directory from main branch
- Add urfave/cli/v3 dependency required by E2E runner
- Fixes Enterprise CI failure: 'Build E2E test runner' and 'Build & package Grafana for e2e tests'
- Root cause: E2E runner infrastructure was added to main after release-12.0.3 branch creation
- Solution: Backport missing E2E runner files to enable Enterprise CI completion
Resolves: no Go files in /opt/actions-runner/_work/grafana-enterprise/grafana-enterprise/grafana/e2e
* Fix: Update go.mod dependency classification for urfave/cli/v3
- Change urfave/cli/v3 from indirect to direct dependency
- Fixes Go Workspace Check failure in CI
- Required after adding E2E runner infrastructure that directly imports urfave/cli/v3
- Resolves: make update-workspace corrects dependency classification
* Fix: Add team ownership for urfave/cli/v3 dependency
- Assign @grafana/grafana-backend-group as owner for github.com/urfave/cli/v3@v3.3.8
- Follows existing pattern: urfave/cli v1 and v2 also owned by grafana-backend-group
- Resolves Backend Code Checks / Validate Backend Configs CI failure
- Required for E2E runner infrastructure dependency ownership compliance
Fixes: modowners check requiring team assignment for newly added dependencies
* Fix: Revert experimental E2E playwright infrastructure to stable version
- Revert pr-e2e-tests.yml to stable Cypress-based E2E testing
- Remove experimental storybook-verification-playwright.yml workflow
- Revert run-dashboard-search-e2e.yml and release-pr.yml to use e2e/test-plugins/
- Keep stable E2E runner infrastructure (e2e/main.go + e2e/internal/)
- Remove experimental playwright features per team recommendation
Team feedback: Playwright tests are experimental and shouldn't be backported to stable release branches
* Fix: Complete cleanup of experimental playwright dependencies
- Revert package.json to stable version (remove e2e-playwright scripts and path references)
- Revert playwright.config.ts to stable plugin-e2e configuration
- Remove all experimental playwright infrastructure dependencies
- Ensure clean stable E2E testing environment
All experimental features removed per team recommendation for stable release branches
* Fix: Restore working package.json configuration
- Revert package.json to version 12.0.3 (working release branch version)
- Fix workspace dependency resolution issues caused by incorrect revert to main branch version
- FE tests, betterer, and linting should now work correctly
Issue was caused by reverting package.json to main branch (12.1.0-pre) instead of keeping
the working release branch configuration (12.0.3)
* CI: mirror some CI dependencies (#106148)
* mirror some CI dependencies
* remove -v from go build
* Fix: Backport missing e2e/run-suite script for daggerbuild E2E system
The daggerbuild E2E system (used by OSS workflows) expects ./e2e/run-suite
to exist, but we only backported the new E2E runner infrastructure.
This script is needed for:
- OSS workflow: 'go run ./pkg/build/e2e --suite=dashboards-suite'
- Legacy Cypress configuration with video support
- Integration between daggerbuild and existing Cypress test suites
Resolves E2E test failures in OSS workflows where videos directory
cannot be found because run-suite script was missing.
* Fix: Resolve daggerbuild E2E path doubling issue
- Extract just suite name from full path using filepath.Base()
- Prevents doubled paths like './e2e/e2e/dashboards-suite/videos'
- Resolves 'no spec files found' and 'no such file or directory' errors
- GitHub Actions passes full paths like 'e2e/dashboards-suite' but run-suite script expects just 'dashboards-suite'
* Infrastructure: Wholesale copy pkg/build/ from main
COMPLETE DAGGERBUILD SYSTEM UPDATE:
- Modern E2E system with CLI framework and --flags support
- New accessibility testing system (a11y/)
- New Playwright E2E testing system (e2e-playwright/)
- External infrastructure improvements (musl.cc → dl.grafana.com/ci)
- Updated daggerbuild core components with latest fixes
- Updated Go dependencies and wire modules
ARCHITECTURAL COMPATIBILITY VERIFIED:
- Modern pkg/build calls: ./e2e-runner cypress --start-grafana=false --cypress-video
- Our e2e runner supports: All required parameters including --suite, --env flags
- GitHub Actions workflows: Pass compatible arguments
- Binary builds: Successfully creates working e2e-runner
RESOLVES ISSUES:
- Fixes --flags parameter compatibility with GitHub Actions
- Includes all follow-up infrastructure improvements
- Provides complete, tested system with modern CLI framework
- Eliminates external dependency failures (musl.cc timeouts)
- Removes need for path doubling workarounds (modern system handles full paths correctly)
Replaces incremental cherry-picking with complete, tested system from main.
* Dependencies: Update Go modules after pkg/build wholesale copy
DEPENDENCY UPDATES:
- Updated go.work.sum with new dependencies from modern pkg/build system
- Updated all workspace module dependencies (go.mod/go.sum files)
- Removed pkg/build/cmd/enterprise.go (enterprise-only file, gets copied during enterprise development)
ENTERPRISE INTEGRATION FIX:
- enterprise.go file doesn't belong in OSS repository
- Gets copied from grafana-enterprise during development mode
- Main branch doesn't have this file, explaining module compatibility
All Go modules now properly resolved and compatible with modern pkg/build architecture.
* Dependencies: Update workspace Go module checksums after pkg/build wholesale copy
- Synchronizes all go.sum files across workspace modules
- Adds missing .mod.h1 entries that were required after infrastructure update
- Resolves Go Workspace Check CI failures
- Updates 22 modules: .citools/, apps/, pkg/ subdirectories plus go.work.sum
Addresses CI error: 'Please run make update-workspace and commit the changes'
* Infrastructure: Revert to pre-Playwright E2E system for release branch compatibility
Strategic combination of modern daggerbuild with stable E2E infrastructure:
**Modern Daggerbuild (from main):**
- Latest CLI framework (github.com/urfave/cli/v3)
- External infrastructure fixes (musl.cc → dl.grafana.com/ci)
- Complete pkg/build/ system with all enhancements
- Updated dependencies and architecture improvements
**Stable E2E Infrastructure (pre-Playwright):**
- pkg/build/e2e/service.go: Reverted to version before commit b6580ccb103942d3ea26c52fac320810aa93fa1e
- pkg/build/a11y/: Reverted to stable version compatible with existing infrastructure
- Removed experimental pkg/build/e2e-playwright/ system
- Removed experimental e2e-playwright/ test infrastructure
**Why This Approach:**
- GitHub Actions workflows call 'go run ./pkg/build/e2e' (modern system)
- Modern system now expects only standard e2e/ directory (compatible)
- Release branches have standard e2e/ infrastructure (dashboards-suite, various-suite, etc.)
- Eliminates dependency on experimental Playwright infrastructure
**Key Dependencies Met:**
- e2e/pa11yci.conf.js: Added for a11y test compatibility
- /src/e2e directory: Standard directory structure (no e2e-playwright needed)
- Existing test plugins: Uses stable e2e/test-plugins/
**Result:**
Best of both worlds - modern, reliable daggerbuild infrastructure with
proven E2E testing that works across all release branches without
requiring experimental dependencies.
* Fix: Remove unused embed.go file causing golangci-lint failure
- Removes pkg/build/daggerbuild/msi/embed.go with unused embed.FS variable
- MSI build process uses directory mounting instead of embedded filesystem
- Resolves 'var resources is unused (unused)' linting error
* Fix: Update Node.js version to match working E2E configuration
- Changes from v22.11.0 to v22.16.0 to match commit 17952d45e4e406ca7c6f5f441e4ce3ca9d20982a
- Working commit had all E2E tests passing with same daggerbuild infrastructure
- Node.js version differences can affect frontend builds and UI rendering
- Ensures consistent environment between working reference and current branch
* Fix: Use conditional container base for E2E compatibility
- Alpine for OSS tests (better old arch dashboardScene=false compatibility)
- Ubuntu for Enterprise tests (when image renderer needed)
- Restores original release-12.0.3 Alpine behavior for OSS
- Should resolve old arch E2E test failures
* Fix: Go fmt formatting for conditional container logic
* Revert: Remove unnecessary Alpine/Ubuntu conditional logic
- Real issue was wrong environment variable name (dashboardScene vs DISABLE_SCENES)
- Keep Ubuntu base (original main branch behavior) for simplicity
- Container base was not the root cause of old arch failures
* Experiment: Copy scripts/ from pre-Playwright commit (ea0ddb3fc95)
- Copied scripts directory from commit ea0ddb3fc95 (just before Playwright migration)
- This overwrites some CI migration fixes but testing if it's actually needed
- Can revert back to b9b4602dbd5 if CI breaks
Test commit to see real impact on GitHub Actions workflows.
* trigger ci 01
* Fix: Copy .drone.star from main to match scripts structure
- Resolves Starlark evaluation error for missing integration_test_pipelines
- Aligns .drone.star with main branch scripts structure
- Same fix applied to both OSS and Enterprise repositories
* make drone
* Fix ARM/v7 Docker build failures by using dagger run for cross-compilation
- Change artifacts_cmd() in scripts/drone/steps/rgm.star to use 'dagger run go run' instead of 'go run'
- Add --max-execution-steps 100000 to make drone target in Makefile to properly regenerate .drone.yml
- This fixes CGO cross-compilation issues with SQLite for ARM/v7 Docker builds
- Matches the approach already used successfully in Enterprise builds
* Fix Docker base image references in rgm build steps
- Change from symbolic names (alpine-base, ubuntu-base) to actual Docker images
- alpine-base → alpine:3.21.3
- ubuntu-base → ubuntu:22.04
- Add ubuntu and alpine parameters to rgm_artifacts_step and rgm_build_docker_step functions
- Fixes Docker pull errors: 'repository does not exist or may require authorization'
- Aligns OSS configuration with Enterprise approach
---------
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2025-07-18 23:14:14 +08:00
|
|
|
"image": images["go"],
|
2023-09-13 01:59:02 +08:00
|
|
|
"pull": "always",
|
CI Migration: Backport pkg/build (daggerbuild) and GHAs to `release-12.0.3` (#107997)
* CI: move grafana-build into pkg/build (#105640)
* move grafana-build into pkg/build
* Update go.mod/go.sum files after cherry-pick build
- Updates from workspace sync after cherry-picking daggerbuild package
- Resolves dependency conflicts from pkg/build integration
- Required for successful build after CI migration backport
* CI Migration: Replace .github with main branch version
- Complete replacement of .github directory from main branch
- Includes updated workflows, actions, and configuration files
- Ensures all CI improvements from main are included
- Next step: fix branch-specific issues in separate commits
* Fix branch triggers: Update workflows to target release branches
- Update 8 workflows to trigger on release-* instead of main
- Ensures workflows run on pull requests to release branches
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* Fix branch triggers: Update workflows to target both main and release branches
- CORRECTED: Include both main and release-* branch patterns
- Ensures workflows run on both main branch (original functionality) and release branches (needed for backport)
- Previous commit incorrectly removed main branch support
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* CI Migration: Update .gitignore to allow OSS wire file to be committed
- Remove **/wire_gen.go (allow pkg/server/wire_gen.go to be committed)
- Add /pkg/server/enterprise_wire_gen.go (keep enterprise wire file ignored)
- This enables the new committed wire files architecture for CI
* CI Migration: Add enhanced wire tool with automatic build constraints
- Backport enhanced wire tool from main branch with -gen_tags flag
- This enables automatic regeneration with proper constraints to prevent conflicts
- Wire file contains all required functions: Initialize, InitializeDocumentBuilders, etc.
- Solves the missing wire functions issue causing CI failures
- Enhanced tool ensures build constraints persist on regeneration
* CI Migration: Update Makefile to use enhanced wire tool with build constraints
- Update gen-go target to use -gen_tags flag for automatic build constraints
- Ensures future engineers get proper build constraints when running 'make gen-go'
- Matches main branch approach for consistent wire file generation
- Removes dependency on WIRE_TAGS variable and GO_RACE_FLAG for simplicity
* Add gen-enterprise-go target to Makefile for release-12.0.3
- Backports gen-enterprise-go target from main branch
- Enables enterprise wire file generation in release branches
- Part of CI migration backport wire infrastructure fixes
- Resolves CI issues where enterprise wire functions were missing
* Fix wire tool golden file format for Drone CI compatibility
- Update all 43 golden test files to match main branch format
- Change go:generate command from github.com/google/wire/cmd/wire to ./pkg/build/wire/cmd/wire/main.go
- Remove legacy '// +build !wireinject' constraints
- Fixes Drone CI test failures that were blocking OSS PR merge
- All wire tests now pass successfully
This aligns the backport branch with the golden file format updates
that were made in main branch when the wire tool was enhanced.
* Update swagger specs to include enterprise APIs
- Regenerated api-enterprise-spec.json with enterprise API definitions
- Updated api-merged.json with merged OSS and enterprise specs
- Regenerated openapi3.json with complete API specifications
- Fixes enterprise CI swagger generation validation failures
- Enterprise APIs now properly detected and documented
* Fix OSS integration tests missing enterprise build tags in Drone CI
- Add -tags=enterprise to all integration test steps in lib.star
- Fixes test-backend-integration, postgres-integration-tests, and mysql-integration-tests
- Regenerate .drone.yml with proper enterprise build tags
- Resolves 'server could not find the requested resource' errors for enterprise APIs
- Ensures enterprise APIs (querylibrary, reporting, banners, scim) are registered during tests
- Aligns OSS Drone CI with GitHub Actions behavior and enterprise repository
* Fix CODEOWNERS for release-12.0.3 compatibility
- Remove 21 entries that reference files/directories not present in release branch
- Resolves File Exist Checker failures in codeowners-validator workflow
- Maintains team ownership assignments from main branch for existing files
- Lines removed: .air.toml, apps/secret/, apps/iam/, e2e-playwright/, packages/grafana-alerting/, etc.
* baldm0mma/ update releasefinder
* Add i18n-extract script for release branch compatibility
- Add 'i18n-extract': 'make i18n-extract' to package.json scripts
- Resolves i18n-verify workflow failure that expects this script
- The make target already exists and handles OSS + enterprise i18n extraction
- Maintains i18n verification functionality from main branch workflows
- Simple safe addition that calls existing make infrastructure
* Phase 4: Fix GitHub Actions workflow branch triggers
- Add release-*.*.* pattern to 8 workflows missing it
- Fix duplicate release branch patterns in 3 workflows
- Ensure consistent branch trigger format across all workflows
- Critical workflows now properly trigger on release branches
Fixes workflows: actionlint, backend-code-checks, go-lint, reject-gh-secrets,
run-schema-v2-e2e, shellcheck, swagger-gen, trivy-scan
* Fix: Backport E2E runner infrastructure for Enterprise CI
- Add e2e/main.go and e2e/internal/ directory from main branch
- Add urfave/cli/v3 dependency required by E2E runner
- Fixes Enterprise CI failure: 'Build E2E test runner' and 'Build & package Grafana for e2e tests'
- Root cause: E2E runner infrastructure was added to main after release-12.0.3 branch creation
- Solution: Backport missing E2E runner files to enable Enterprise CI completion
Resolves: no Go files in /opt/actions-runner/_work/grafana-enterprise/grafana-enterprise/grafana/e2e
* Fix: Update go.mod dependency classification for urfave/cli/v3
- Change urfave/cli/v3 from indirect to direct dependency
- Fixes Go Workspace Check failure in CI
- Required after adding E2E runner infrastructure that directly imports urfave/cli/v3
- Resolves: make update-workspace corrects dependency classification
* Fix: Add team ownership for urfave/cli/v3 dependency
- Assign @grafana/grafana-backend-group as owner for github.com/urfave/cli/v3@v3.3.8
- Follows existing pattern: urfave/cli v1 and v2 also owned by grafana-backend-group
- Resolves Backend Code Checks / Validate Backend Configs CI failure
- Required for E2E runner infrastructure dependency ownership compliance
Fixes: modowners check requiring team assignment for newly added dependencies
* Fix: Revert experimental E2E playwright infrastructure to stable version
- Revert pr-e2e-tests.yml to stable Cypress-based E2E testing
- Remove experimental storybook-verification-playwright.yml workflow
- Revert run-dashboard-search-e2e.yml and release-pr.yml to use e2e/test-plugins/
- Keep stable E2E runner infrastructure (e2e/main.go + e2e/internal/)
- Remove experimental playwright features per team recommendation
Team feedback: Playwright tests are experimental and shouldn't be backported to stable release branches
* Fix: Complete cleanup of experimental playwright dependencies
- Revert package.json to stable version (remove e2e-playwright scripts and path references)
- Revert playwright.config.ts to stable plugin-e2e configuration
- Remove all experimental playwright infrastructure dependencies
- Ensure clean stable E2E testing environment
All experimental features removed per team recommendation for stable release branches
* Fix: Restore working package.json configuration
- Revert package.json to version 12.0.3 (working release branch version)
- Fix workspace dependency resolution issues caused by incorrect revert to main branch version
- FE tests, betterer, and linting should now work correctly
Issue was caused by reverting package.json to main branch (12.1.0-pre) instead of keeping
the working release branch configuration (12.0.3)
* CI: mirror some CI dependencies (#106148)
* mirror some CI dependencies
* remove -v from go build
* Fix: Backport missing e2e/run-suite script for daggerbuild E2E system
The daggerbuild E2E system (used by OSS workflows) expects ./e2e/run-suite
to exist, but we only backported the new E2E runner infrastructure.
This script is needed for:
- OSS workflow: 'go run ./pkg/build/e2e --suite=dashboards-suite'
- Legacy Cypress configuration with video support
- Integration between daggerbuild and existing Cypress test suites
Resolves E2E test failures in OSS workflows where videos directory
cannot be found because run-suite script was missing.
* Fix: Resolve daggerbuild E2E path doubling issue
- Extract just suite name from full path using filepath.Base()
- Prevents doubled paths like './e2e/e2e/dashboards-suite/videos'
- Resolves 'no spec files found' and 'no such file or directory' errors
- GitHub Actions passes full paths like 'e2e/dashboards-suite' but run-suite script expects just 'dashboards-suite'
* Infrastructure: Wholesale copy pkg/build/ from main
COMPLETE DAGGERBUILD SYSTEM UPDATE:
- Modern E2E system with CLI framework and --flags support
- New accessibility testing system (a11y/)
- New Playwright E2E testing system (e2e-playwright/)
- External infrastructure improvements (musl.cc → dl.grafana.com/ci)
- Updated daggerbuild core components with latest fixes
- Updated Go dependencies and wire modules
ARCHITECTURAL COMPATIBILITY VERIFIED:
- Modern pkg/build calls: ./e2e-runner cypress --start-grafana=false --cypress-video
- Our e2e runner supports: All required parameters including --suite, --env flags
- GitHub Actions workflows: Pass compatible arguments
- Binary builds: Successfully creates working e2e-runner
RESOLVES ISSUES:
- Fixes --flags parameter compatibility with GitHub Actions
- Includes all follow-up infrastructure improvements
- Provides complete, tested system with modern CLI framework
- Eliminates external dependency failures (musl.cc timeouts)
- Removes need for path doubling workarounds (modern system handles full paths correctly)
Replaces incremental cherry-picking with complete, tested system from main.
* Dependencies: Update Go modules after pkg/build wholesale copy
DEPENDENCY UPDATES:
- Updated go.work.sum with new dependencies from modern pkg/build system
- Updated all workspace module dependencies (go.mod/go.sum files)
- Removed pkg/build/cmd/enterprise.go (enterprise-only file, gets copied during enterprise development)
ENTERPRISE INTEGRATION FIX:
- enterprise.go file doesn't belong in OSS repository
- Gets copied from grafana-enterprise during development mode
- Main branch doesn't have this file, explaining module compatibility
All Go modules now properly resolved and compatible with modern pkg/build architecture.
* Dependencies: Update workspace Go module checksums after pkg/build wholesale copy
- Synchronizes all go.sum files across workspace modules
- Adds missing .mod.h1 entries that were required after infrastructure update
- Resolves Go Workspace Check CI failures
- Updates 22 modules: .citools/, apps/, pkg/ subdirectories plus go.work.sum
Addresses CI error: 'Please run make update-workspace and commit the changes'
* Infrastructure: Revert to pre-Playwright E2E system for release branch compatibility
Strategic combination of modern daggerbuild with stable E2E infrastructure:
**Modern Daggerbuild (from main):**
- Latest CLI framework (github.com/urfave/cli/v3)
- External infrastructure fixes (musl.cc → dl.grafana.com/ci)
- Complete pkg/build/ system with all enhancements
- Updated dependencies and architecture improvements
**Stable E2E Infrastructure (pre-Playwright):**
- pkg/build/e2e/service.go: Reverted to version before commit b6580ccb103942d3ea26c52fac320810aa93fa1e
- pkg/build/a11y/: Reverted to stable version compatible with existing infrastructure
- Removed experimental pkg/build/e2e-playwright/ system
- Removed experimental e2e-playwright/ test infrastructure
**Why This Approach:**
- GitHub Actions workflows call 'go run ./pkg/build/e2e' (modern system)
- Modern system now expects only standard e2e/ directory (compatible)
- Release branches have standard e2e/ infrastructure (dashboards-suite, various-suite, etc.)
- Eliminates dependency on experimental Playwright infrastructure
**Key Dependencies Met:**
- e2e/pa11yci.conf.js: Added for a11y test compatibility
- /src/e2e directory: Standard directory structure (no e2e-playwright needed)
- Existing test plugins: Uses stable e2e/test-plugins/
**Result:**
Best of both worlds - modern, reliable daggerbuild infrastructure with
proven E2E testing that works across all release branches without
requiring experimental dependencies.
* Fix: Remove unused embed.go file causing golangci-lint failure
- Removes pkg/build/daggerbuild/msi/embed.go with unused embed.FS variable
- MSI build process uses directory mounting instead of embedded filesystem
- Resolves 'var resources is unused (unused)' linting error
* Fix: Update Node.js version to match working E2E configuration
- Changes from v22.11.0 to v22.16.0 to match commit 17952d45e4e406ca7c6f5f441e4ce3ca9d20982a
- Working commit had all E2E tests passing with same daggerbuild infrastructure
- Node.js version differences can affect frontend builds and UI rendering
- Ensures consistent environment between working reference and current branch
* Fix: Use conditional container base for E2E compatibility
- Alpine for OSS tests (better old arch dashboardScene=false compatibility)
- Ubuntu for Enterprise tests (when image renderer needed)
- Restores original release-12.0.3 Alpine behavior for OSS
- Should resolve old arch E2E test failures
* Fix: Go fmt formatting for conditional container logic
* Revert: Remove unnecessary Alpine/Ubuntu conditional logic
- Real issue was wrong environment variable name (dashboardScene vs DISABLE_SCENES)
- Keep Ubuntu base (original main branch behavior) for simplicity
- Container base was not the root cause of old arch failures
* Experiment: Copy scripts/ from pre-Playwright commit (ea0ddb3fc95)
- Copied scripts directory from commit ea0ddb3fc95 (just before Playwright migration)
- This overwrites some CI migration fixes but testing if it's actually needed
- Can revert back to b9b4602dbd5 if CI breaks
Test commit to see real impact on GitHub Actions workflows.
* trigger ci 01
* Fix: Copy .drone.star from main to match scripts structure
- Resolves Starlark evaluation error for missing integration_test_pipelines
- Aligns .drone.star with main branch scripts structure
- Same fix applied to both OSS and Enterprise repositories
* make drone
* Fix ARM/v7 Docker build failures by using dagger run for cross-compilation
- Change artifacts_cmd() in scripts/drone/steps/rgm.star to use 'dagger run go run' instead of 'go run'
- Add --max-execution-steps 100000 to make drone target in Makefile to properly regenerate .drone.yml
- This fixes CGO cross-compilation issues with SQLite for ARM/v7 Docker builds
- Matches the approach already used successfully in Enterprise builds
* Fix Docker base image references in rgm build steps
- Change from symbolic names (alpine-base, ubuntu-base) to actual Docker images
- alpine-base → alpine:3.21.3
- ubuntu-base → ubuntu:22.04
- Add ubuntu and alpine parameters to rgm_artifacts_step and rgm_build_docker_step functions
- Fixes Docker pull errors: 'repository does not exist or may require authorization'
- Aligns OSS configuration with Enterprise approach
---------
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2025-07-18 23:14:14 +08:00
|
|
|
"commands": with_dagger_install([
|
2023-05-04 02:56:02 +08:00
|
|
|
"export GRAFANA_DIR=$$(pwd)",
|
2024-11-21 23:08:02 +08:00
|
|
|
"export GITHUB_TOKEN=$(cat /github-app/token)",
|
CI Migration: Backport pkg/build (daggerbuild) and GHAs to `release-12.0.3` (#107997)
* CI: move grafana-build into pkg/build (#105640)
* move grafana-build into pkg/build
* Update go.mod/go.sum files after cherry-pick build
- Updates from workspace sync after cherry-picking daggerbuild package
- Resolves dependency conflicts from pkg/build integration
- Required for successful build after CI migration backport
* CI Migration: Replace .github with main branch version
- Complete replacement of .github directory from main branch
- Includes updated workflows, actions, and configuration files
- Ensures all CI improvements from main are included
- Next step: fix branch-specific issues in separate commits
* Fix branch triggers: Update workflows to target release branches
- Update 8 workflows to trigger on release-* instead of main
- Ensures workflows run on pull requests to release branches
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* Fix branch triggers: Update workflows to target both main and release branches
- CORRECTED: Include both main and release-* branch patterns
- Ensures workflows run on both main branch (original functionality) and release branches (needed for backport)
- Previous commit incorrectly removed main branch support
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* CI Migration: Update .gitignore to allow OSS wire file to be committed
- Remove **/wire_gen.go (allow pkg/server/wire_gen.go to be committed)
- Add /pkg/server/enterprise_wire_gen.go (keep enterprise wire file ignored)
- This enables the new committed wire files architecture for CI
* CI Migration: Add enhanced wire tool with automatic build constraints
- Backport enhanced wire tool from main branch with -gen_tags flag
- This enables automatic regeneration with proper constraints to prevent conflicts
- Wire file contains all required functions: Initialize, InitializeDocumentBuilders, etc.
- Solves the missing wire functions issue causing CI failures
- Enhanced tool ensures build constraints persist on regeneration
* CI Migration: Update Makefile to use enhanced wire tool with build constraints
- Update gen-go target to use -gen_tags flag for automatic build constraints
- Ensures future engineers get proper build constraints when running 'make gen-go'
- Matches main branch approach for consistent wire file generation
- Removes dependency on WIRE_TAGS variable and GO_RACE_FLAG for simplicity
* Add gen-enterprise-go target to Makefile for release-12.0.3
- Backports gen-enterprise-go target from main branch
- Enables enterprise wire file generation in release branches
- Part of CI migration backport wire infrastructure fixes
- Resolves CI issues where enterprise wire functions were missing
* Fix wire tool golden file format for Drone CI compatibility
- Update all 43 golden test files to match main branch format
- Change go:generate command from github.com/google/wire/cmd/wire to ./pkg/build/wire/cmd/wire/main.go
- Remove legacy '// +build !wireinject' constraints
- Fixes Drone CI test failures that were blocking OSS PR merge
- All wire tests now pass successfully
This aligns the backport branch with the golden file format updates
that were made in main branch when the wire tool was enhanced.
* Update swagger specs to include enterprise APIs
- Regenerated api-enterprise-spec.json with enterprise API definitions
- Updated api-merged.json with merged OSS and enterprise specs
- Regenerated openapi3.json with complete API specifications
- Fixes enterprise CI swagger generation validation failures
- Enterprise APIs now properly detected and documented
* Fix OSS integration tests missing enterprise build tags in Drone CI
- Add -tags=enterprise to all integration test steps in lib.star
- Fixes test-backend-integration, postgres-integration-tests, and mysql-integration-tests
- Regenerate .drone.yml with proper enterprise build tags
- Resolves 'server could not find the requested resource' errors for enterprise APIs
- Ensures enterprise APIs (querylibrary, reporting, banners, scim) are registered during tests
- Aligns OSS Drone CI with GitHub Actions behavior and enterprise repository
* Fix CODEOWNERS for release-12.0.3 compatibility
- Remove 21 entries that reference files/directories not present in release branch
- Resolves File Exist Checker failures in codeowners-validator workflow
- Maintains team ownership assignments from main branch for existing files
- Lines removed: .air.toml, apps/secret/, apps/iam/, e2e-playwright/, packages/grafana-alerting/, etc.
* baldm0mma/ update releasefinder
* Add i18n-extract script for release branch compatibility
- Add 'i18n-extract': 'make i18n-extract' to package.json scripts
- Resolves i18n-verify workflow failure that expects this script
- The make target already exists and handles OSS + enterprise i18n extraction
- Maintains i18n verification functionality from main branch workflows
- Simple safe addition that calls existing make infrastructure
* Phase 4: Fix GitHub Actions workflow branch triggers
- Add release-*.*.* pattern to 8 workflows missing it
- Fix duplicate release branch patterns in 3 workflows
- Ensure consistent branch trigger format across all workflows
- Critical workflows now properly trigger on release branches
Fixes workflows: actionlint, backend-code-checks, go-lint, reject-gh-secrets,
run-schema-v2-e2e, shellcheck, swagger-gen, trivy-scan
* Fix: Backport E2E runner infrastructure for Enterprise CI
- Add e2e/main.go and e2e/internal/ directory from main branch
- Add urfave/cli/v3 dependency required by E2E runner
- Fixes Enterprise CI failure: 'Build E2E test runner' and 'Build & package Grafana for e2e tests'
- Root cause: E2E runner infrastructure was added to main after release-12.0.3 branch creation
- Solution: Backport missing E2E runner files to enable Enterprise CI completion
Resolves: no Go files in /opt/actions-runner/_work/grafana-enterprise/grafana-enterprise/grafana/e2e
* Fix: Update go.mod dependency classification for urfave/cli/v3
- Change urfave/cli/v3 from indirect to direct dependency
- Fixes Go Workspace Check failure in CI
- Required after adding E2E runner infrastructure that directly imports urfave/cli/v3
- Resolves: make update-workspace corrects dependency classification
* Fix: Add team ownership for urfave/cli/v3 dependency
- Assign @grafana/grafana-backend-group as owner for github.com/urfave/cli/v3@v3.3.8
- Follows existing pattern: urfave/cli v1 and v2 also owned by grafana-backend-group
- Resolves Backend Code Checks / Validate Backend Configs CI failure
- Required for E2E runner infrastructure dependency ownership compliance
Fixes: modowners check requiring team assignment for newly added dependencies
* Fix: Revert experimental E2E playwright infrastructure to stable version
- Revert pr-e2e-tests.yml to stable Cypress-based E2E testing
- Remove experimental storybook-verification-playwright.yml workflow
- Revert run-dashboard-search-e2e.yml and release-pr.yml to use e2e/test-plugins/
- Keep stable E2E runner infrastructure (e2e/main.go + e2e/internal/)
- Remove experimental playwright features per team recommendation
Team feedback: Playwright tests are experimental and shouldn't be backported to stable release branches
* Fix: Complete cleanup of experimental playwright dependencies
- Revert package.json to stable version (remove e2e-playwright scripts and path references)
- Revert playwright.config.ts to stable plugin-e2e configuration
- Remove all experimental playwright infrastructure dependencies
- Ensure clean stable E2E testing environment
All experimental features removed per team recommendation for stable release branches
* Fix: Restore working package.json configuration
- Revert package.json to version 12.0.3 (working release branch version)
- Fix workspace dependency resolution issues caused by incorrect revert to main branch version
- FE tests, betterer, and linting should now work correctly
Issue was caused by reverting package.json to main branch (12.1.0-pre) instead of keeping
the working release branch configuration (12.0.3)
* CI: mirror some CI dependencies (#106148)
* mirror some CI dependencies
* remove -v from go build
* Fix: Backport missing e2e/run-suite script for daggerbuild E2E system
The daggerbuild E2E system (used by OSS workflows) expects ./e2e/run-suite
to exist, but we only backported the new E2E runner infrastructure.
This script is needed for:
- OSS workflow: 'go run ./pkg/build/e2e --suite=dashboards-suite'
- Legacy Cypress configuration with video support
- Integration between daggerbuild and existing Cypress test suites
Resolves E2E test failures in OSS workflows where videos directory
cannot be found because run-suite script was missing.
* Fix: Resolve daggerbuild E2E path doubling issue
- Extract just suite name from full path using filepath.Base()
- Prevents doubled paths like './e2e/e2e/dashboards-suite/videos'
- Resolves 'no spec files found' and 'no such file or directory' errors
- GitHub Actions passes full paths like 'e2e/dashboards-suite' but run-suite script expects just 'dashboards-suite'
* Infrastructure: Wholesale copy pkg/build/ from main
COMPLETE DAGGERBUILD SYSTEM UPDATE:
- Modern E2E system with CLI framework and --flags support
- New accessibility testing system (a11y/)
- New Playwright E2E testing system (e2e-playwright/)
- External infrastructure improvements (musl.cc → dl.grafana.com/ci)
- Updated daggerbuild core components with latest fixes
- Updated Go dependencies and wire modules
ARCHITECTURAL COMPATIBILITY VERIFIED:
- Modern pkg/build calls: ./e2e-runner cypress --start-grafana=false --cypress-video
- Our e2e runner supports: All required parameters including --suite, --env flags
- GitHub Actions workflows: Pass compatible arguments
- Binary builds: Successfully creates working e2e-runner
RESOLVES ISSUES:
- Fixes --flags parameter compatibility with GitHub Actions
- Includes all follow-up infrastructure improvements
- Provides complete, tested system with modern CLI framework
- Eliminates external dependency failures (musl.cc timeouts)
- Removes need for path doubling workarounds (modern system handles full paths correctly)
Replaces incremental cherry-picking with complete, tested system from main.
* Dependencies: Update Go modules after pkg/build wholesale copy
DEPENDENCY UPDATES:
- Updated go.work.sum with new dependencies from modern pkg/build system
- Updated all workspace module dependencies (go.mod/go.sum files)
- Removed pkg/build/cmd/enterprise.go (enterprise-only file, gets copied during enterprise development)
ENTERPRISE INTEGRATION FIX:
- enterprise.go file doesn't belong in OSS repository
- Gets copied from grafana-enterprise during development mode
- Main branch doesn't have this file, explaining module compatibility
All Go modules now properly resolved and compatible with modern pkg/build architecture.
* Dependencies: Update workspace Go module checksums after pkg/build wholesale copy
- Synchronizes all go.sum files across workspace modules
- Adds missing .mod.h1 entries that were required after infrastructure update
- Resolves Go Workspace Check CI failures
- Updates 22 modules: .citools/, apps/, pkg/ subdirectories plus go.work.sum
Addresses CI error: 'Please run make update-workspace and commit the changes'
* Infrastructure: Revert to pre-Playwright E2E system for release branch compatibility
Strategic combination of modern daggerbuild with stable E2E infrastructure:
**Modern Daggerbuild (from main):**
- Latest CLI framework (github.com/urfave/cli/v3)
- External infrastructure fixes (musl.cc → dl.grafana.com/ci)
- Complete pkg/build/ system with all enhancements
- Updated dependencies and architecture improvements
**Stable E2E Infrastructure (pre-Playwright):**
- pkg/build/e2e/service.go: Reverted to version before commit b6580ccb103942d3ea26c52fac320810aa93fa1e
- pkg/build/a11y/: Reverted to stable version compatible with existing infrastructure
- Removed experimental pkg/build/e2e-playwright/ system
- Removed experimental e2e-playwright/ test infrastructure
**Why This Approach:**
- GitHub Actions workflows call 'go run ./pkg/build/e2e' (modern system)
- Modern system now expects only standard e2e/ directory (compatible)
- Release branches have standard e2e/ infrastructure (dashboards-suite, various-suite, etc.)
- Eliminates dependency on experimental Playwright infrastructure
**Key Dependencies Met:**
- e2e/pa11yci.conf.js: Added for a11y test compatibility
- /src/e2e directory: Standard directory structure (no e2e-playwright needed)
- Existing test plugins: Uses stable e2e/test-plugins/
**Result:**
Best of both worlds - modern, reliable daggerbuild infrastructure with
proven E2E testing that works across all release branches without
requiring experimental dependencies.
* Fix: Remove unused embed.go file causing golangci-lint failure
- Removes pkg/build/daggerbuild/msi/embed.go with unused embed.FS variable
- MSI build process uses directory mounting instead of embedded filesystem
- Resolves 'var resources is unused (unused)' linting error
* Fix: Update Node.js version to match working E2E configuration
- Changes from v22.11.0 to v22.16.0 to match commit 17952d45e4e406ca7c6f5f441e4ce3ca9d20982a
- Working commit had all E2E tests passing with same daggerbuild infrastructure
- Node.js version differences can affect frontend builds and UI rendering
- Ensures consistent environment between working reference and current branch
* Fix: Use conditional container base for E2E compatibility
- Alpine for OSS tests (better old arch dashboardScene=false compatibility)
- Ubuntu for Enterprise tests (when image renderer needed)
- Restores original release-12.0.3 Alpine behavior for OSS
- Should resolve old arch E2E test failures
* Fix: Go fmt formatting for conditional container logic
* Revert: Remove unnecessary Alpine/Ubuntu conditional logic
- Real issue was wrong environment variable name (dashboardScene vs DISABLE_SCENES)
- Keep Ubuntu base (original main branch behavior) for simplicity
- Container base was not the root cause of old arch failures
* Experiment: Copy scripts/ from pre-Playwright commit (ea0ddb3fc95)
- Copied scripts directory from commit ea0ddb3fc95 (just before Playwright migration)
- This overwrites some CI migration fixes but testing if it's actually needed
- Can revert back to b9b4602dbd5 if CI breaks
Test commit to see real impact on GitHub Actions workflows.
* trigger ci 01
* Fix: Copy .drone.star from main to match scripts structure
- Resolves Starlark evaluation error for missing integration_test_pipelines
- Aligns .drone.star with main branch scripts structure
- Same fix applied to both OSS and Enterprise repositories
* make drone
* Fix ARM/v7 Docker build failures by using dagger run for cross-compilation
- Change artifacts_cmd() in scripts/drone/steps/rgm.star to use 'dagger run go run' instead of 'go run'
- Add --max-execution-steps 100000 to make drone target in Makefile to properly regenerate .drone.yml
- This fixes CGO cross-compilation issues with SQLite for ARM/v7 Docker builds
- Matches the approach already used successfully in Enterprise builds
* Fix Docker base image references in rgm build steps
- Change from symbolic names (alpine-base, ubuntu-base) to actual Docker images
- alpine-base → alpine:3.21.3
- ubuntu-base → ubuntu:22.04
- Add ubuntu and alpine parameters to rgm_artifacts_step and rgm_build_docker_step functions
- Fixes Docker pull errors: 'repository does not exist or may require authorization'
- Aligns OSS configuration with Enterprise approach
---------
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2025-07-18 23:14:14 +08:00
|
|
|
"./pkg/build/daggerbuild/scripts/{}".format(script),
|
|
|
|
|
], dagger_version),
|
2023-09-12 23:19:06 +08:00
|
|
|
"environment": rgm_env_secrets(env),
|
2023-05-04 02:56:02 +08:00
|
|
|
# The docker socket is a requirement for running dagger programs
|
|
|
|
|
# In the future we should find a way to use dagger without mounting the docker socket.
|
2024-11-21 23:08:02 +08:00
|
|
|
"volumes": [{"name": "docker", "path": "/var/run/docker.sock"}] + github_app_step_volumes(),
|
2023-05-04 02:56:02 +08:00
|
|
|
}
|
2023-09-12 23:19:06 +08:00
|
|
|
|
2023-10-05 00:55:43 +08:00
|
|
|
return [
|
|
|
|
|
rgm_run_step,
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
def rgm_copy(src, dst):
|
|
|
|
|
"""Copies file from/to GCS.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
src: source of the files.
|
|
|
|
|
dst: destination of the files.
|
|
|
|
|
|
|
|
|
|
Returns:
|
2024-01-11 23:22:14 +08:00
|
|
|
Drone step.
|
2023-10-05 00:55:43 +08:00
|
|
|
"""
|
|
|
|
|
commands = [
|
|
|
|
|
"printenv GCP_KEY_BASE64 | base64 -d > /tmp/key.json",
|
|
|
|
|
"gcloud auth activate-service-account --key-file=/tmp/key.json",
|
|
|
|
|
"gcloud storage cp -r {} {}".format(src, dst),
|
|
|
|
|
]
|
|
|
|
|
|
2024-01-11 23:22:14 +08:00
|
|
|
return {
|
2023-10-05 00:55:43 +08:00
|
|
|
"name": "rgm-copy",
|
|
|
|
|
"image": "google/cloud-sdk:alpine",
|
|
|
|
|
"commands": commands,
|
|
|
|
|
"environment": rgm_env_secrets({}),
|
|
|
|
|
}
|
2023-05-04 02:56:02 +08:00
|
|
|
|
2023-10-05 00:55:43 +08:00
|
|
|
def rgm_publish_packages(bucket = "grafana-packages"):
|
|
|
|
|
"""Publish deb and rpm packages.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
bucket: target bucket to publish the packages.
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
Drone steps.
|
|
|
|
|
"""
|
|
|
|
|
steps = []
|
|
|
|
|
for package_manager in ["deb", "rpm"]:
|
|
|
|
|
steps.append({
|
|
|
|
|
"name": "publish-{}".format(package_manager),
|
|
|
|
|
# See https://github.com/grafana/deployment_tools/blob/master/docker/package-publish/README.md for docs on that image
|
|
|
|
|
"image": images["package_publish"],
|
|
|
|
|
"privileged": True,
|
|
|
|
|
"settings": {
|
|
|
|
|
"access_key_id": from_secret("packages_access_key_id"),
|
|
|
|
|
"secret_access_key": from_secret("packages_secret_access_key"),
|
|
|
|
|
"service_account_json": from_secret("packages_service_account"),
|
|
|
|
|
"target_bucket": bucket,
|
|
|
|
|
"gpg_passphrase": from_secret("packages_gpg_passphrase"),
|
|
|
|
|
"gpg_public_key": from_secret("packages_gpg_public_key"),
|
|
|
|
|
"gpg_private_key": from_secret("packages_gpg_private_key"),
|
|
|
|
|
"package_path": "file:///drone/src/dist/*.{}".format(package_manager),
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return steps
|
|
|
|
|
|
2023-05-04 02:56:02 +08:00
|
|
|
def rgm_main():
|
2023-10-05 00:55:43 +08:00
|
|
|
# Runs a package / build process (with some distros) when commits are merged to main
|
2023-05-04 02:56:02 +08:00
|
|
|
return pipeline(
|
2023-05-23 16:01:09 +08:00
|
|
|
name = "rgm-main-prerelease",
|
2023-10-17 22:13:14 +08:00
|
|
|
trigger = main_trigger,
|
2023-10-24 07:14:12 +08:00
|
|
|
steps = rgm_run("rgm-build", "drone_build_main.sh"),
|
2023-05-04 02:56:02 +08:00
|
|
|
)
|
|
|
|
|
|
2023-05-23 16:01:09 +08:00
|
|
|
def rgm_tag():
|
2025-07-19 03:13:06 +08:00
|
|
|
"""Tag release pipeline that builds and packages all distributions.
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
Drone pipeline.
|
|
|
|
|
"""
|
|
|
|
|
generate_token_step = github_app_generate_token_step()
|
|
|
|
|
build_steps = rgm_run("rgm-build", "drone_build_tag_grafana.sh")
|
|
|
|
|
|
|
|
|
|
# Add dependency on token generation step
|
|
|
|
|
for step in build_steps:
|
|
|
|
|
step["depends_on"] = [generate_token_step["name"]]
|
|
|
|
|
|
|
|
|
|
steps = [generate_token_step] + build_steps
|
|
|
|
|
|
2023-05-04 02:56:02 +08:00
|
|
|
return pipeline(
|
2023-05-23 16:01:09 +08:00
|
|
|
name = "rgm-tag-prerelease",
|
|
|
|
|
trigger = tag_trigger,
|
2025-07-19 03:13:06 +08:00
|
|
|
steps = steps,
|
|
|
|
|
volumes = github_app_step_volumes() + github_app_pipeline_volumes(),
|
2023-05-04 02:56:02 +08:00
|
|
|
)
|
|
|
|
|
|
2023-09-12 23:19:06 +08:00
|
|
|
def rgm_version_branch():
|
2023-10-05 00:55:43 +08:00
|
|
|
# Runs a package / build proces (with all distros) when a commit lands on a version branch
|
2023-09-12 23:19:06 +08:00
|
|
|
return pipeline(
|
|
|
|
|
name = "rgm-version-branch-prerelease",
|
|
|
|
|
trigger = version_branch_trigger,
|
2023-10-24 07:14:12 +08:00
|
|
|
steps = rgm_run("rgm-build", "drone_build_tag_grafana.sh"),
|
2023-09-12 23:19:06 +08:00
|
|
|
)
|
|
|
|
|
|
2023-10-05 00:55:43 +08:00
|
|
|
def rgm_nightly_build():
|
2024-01-11 23:22:14 +08:00
|
|
|
"""Nightly build pipeline.
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
Drone pipeline.
|
|
|
|
|
"""
|
2023-10-05 00:55:43 +08:00
|
|
|
src = "$${DRONE_WORKSPACE}/dist/*"
|
|
|
|
|
dst = "$${DESTINATION}/$${DRONE_BUILD_EVENT}"
|
2024-01-11 23:22:14 +08:00
|
|
|
copy_step = rgm_copy(src, dst)
|
|
|
|
|
if not dst.startswith("gs://"):
|
|
|
|
|
copy_step["commands"].insert(0, "mkdir -p {}".format(dst))
|
2023-10-05 00:55:43 +08:00
|
|
|
|
2024-01-11 23:22:14 +08:00
|
|
|
copy_steps = with_deps([copy_step], ["rgm-build"])
|
2023-10-05 00:55:43 +08:00
|
|
|
|
|
|
|
|
return pipeline(
|
|
|
|
|
name = "rgm-nightly-build",
|
|
|
|
|
trigger = nightly_trigger,
|
|
|
|
|
steps = rgm_run("rgm-build", "drone_build_nightly_grafana.sh") + copy_steps,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
def rgm_nightly_publish():
|
|
|
|
|
"""Nightly publish pipeline.
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
Drone pipeline.
|
|
|
|
|
"""
|
|
|
|
|
src = "$${DESTINATION}/$${DRONE_BUILD_EVENT}/*_$${DRONE_BUILD_NUMBER}_*"
|
|
|
|
|
dst = "$${DRONE_WORKSPACE}/dist"
|
|
|
|
|
|
|
|
|
|
publish_steps = with_deps(rgm_run("rgm-publish", "drone_publish_nightly_grafana.sh"), ["rgm-copy"])
|
2023-10-09 23:55:15 +08:00
|
|
|
package_steps = with_deps(rgm_publish_packages(), ["rgm-publish"])
|
2024-01-11 23:22:14 +08:00
|
|
|
copy_step = rgm_copy(src, dst)
|
|
|
|
|
if not dst.startswith("gs://"):
|
|
|
|
|
copy_step["commands"].insert(0, "mkdir -p {}".format(dst))
|
2023-10-05 00:55:43 +08:00
|
|
|
return pipeline(
|
|
|
|
|
name = "rgm-nightly-publish",
|
|
|
|
|
trigger = nightly_trigger,
|
2024-01-11 23:22:14 +08:00
|
|
|
steps = [copy_step] + publish_steps + package_steps,
|
2023-10-05 00:55:43 +08:00
|
|
|
depends_on = ["rgm-nightly-build"],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
def rgm_nightly_pipeline():
|
|
|
|
|
return [
|
|
|
|
|
rgm_nightly_build(),
|
|
|
|
|
rgm_nightly_publish(),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
def rgm_tag_pipeline():
|
2024-10-24 03:26:52 +08:00
|
|
|
build = rgm_tag()
|
|
|
|
|
|
2023-05-04 02:56:02 +08:00
|
|
|
return [
|
2024-10-24 03:26:52 +08:00
|
|
|
build,
|
2023-05-23 16:01:09 +08:00
|
|
|
verify_release_pipeline(
|
|
|
|
|
trigger = tag_trigger,
|
2023-07-19 04:09:08 +08:00
|
|
|
name = "rgm-tag-verify-prerelease-assets",
|
2023-07-28 22:58:22 +08:00
|
|
|
bucket = "grafana-prerelease",
|
2023-07-19 04:09:08 +08:00
|
|
|
depends_on = [
|
2024-10-24 03:26:52 +08:00
|
|
|
build["name"],
|
2023-07-19 04:09:08 +08:00
|
|
|
],
|
2023-05-23 16:01:09 +08:00
|
|
|
),
|
2023-10-05 00:55:43 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
def rgm_version_branch_pipeline():
|
|
|
|
|
return [
|
|
|
|
|
rgm_version_branch(),
|
2023-09-12 23:19:06 +08:00
|
|
|
verify_release_pipeline(
|
|
|
|
|
trigger = version_branch_trigger,
|
|
|
|
|
name = "rgm-prerelease-verify-prerelease-assets",
|
|
|
|
|
bucket = "grafana-prerelease",
|
|
|
|
|
depends_on = [
|
|
|
|
|
"rgm-version-branch-prerelease",
|
|
|
|
|
],
|
|
|
|
|
),
|
2023-05-04 02:56:02 +08:00
|
|
|
]
|
2023-10-05 00:55:43 +08:00
|
|
|
|
|
|
|
|
def rgm_main_pipeline():
|
|
|
|
|
return [
|
|
|
|
|
rgm_main(),
|
|
|
|
|
]
|
|
|
|
|
|
2024-01-11 23:22:14 +08:00
|
|
|
def rgm_promotion_pipeline():
|
|
|
|
|
"""Promotion build pipeline.
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
Drone pipeline.
|
|
|
|
|
"""
|
|
|
|
|
promotion_trigger = {
|
|
|
|
|
"event": ["promote"],
|
|
|
|
|
"target": "upload-packages",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
env = {
|
|
|
|
|
"ALPINE_BASE": images["alpine"],
|
|
|
|
|
"UBUNTU_BASE": images["ubuntu"],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Expected promotion args:
|
|
|
|
|
# * GRAFANA_REF = commit hash, branch name, or tag name
|
|
|
|
|
# * ENTERPRISE_REF = commit hash, branch name, or tag name. If not building an enterprise artifact, then this can be
|
|
|
|
|
# left empty.
|
|
|
|
|
# * ARTIFACTS = comma delimited list of artifacts (ex: "targz:grafana:linux/amd64,rpm:grafana:linux/amd64")
|
|
|
|
|
# * VERSION = version string of Grafana that is being built (ex: v10.0.0)
|
|
|
|
|
# * UPLOAD_TO = Google Cloud Storage URL to upload the built artifacts to. (ex: gs://some-bucket/path)
|
|
|
|
|
build_step = {
|
|
|
|
|
"name": "rgm-build",
|
CI Migration: Backport pkg/build (daggerbuild) and GHAs to `release-12.0.3` (#107997)
* CI: move grafana-build into pkg/build (#105640)
* move grafana-build into pkg/build
* Update go.mod/go.sum files after cherry-pick build
- Updates from workspace sync after cherry-picking daggerbuild package
- Resolves dependency conflicts from pkg/build integration
- Required for successful build after CI migration backport
* CI Migration: Replace .github with main branch version
- Complete replacement of .github directory from main branch
- Includes updated workflows, actions, and configuration files
- Ensures all CI improvements from main are included
- Next step: fix branch-specific issues in separate commits
* Fix branch triggers: Update workflows to target release branches
- Update 8 workflows to trigger on release-* instead of main
- Ensures workflows run on pull requests to release branches
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* Fix branch triggers: Update workflows to target both main and release branches
- CORRECTED: Include both main and release-* branch patterns
- Ensures workflows run on both main branch (original functionality) and release branches (needed for backport)
- Previous commit incorrectly removed main branch support
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* CI Migration: Update .gitignore to allow OSS wire file to be committed
- Remove **/wire_gen.go (allow pkg/server/wire_gen.go to be committed)
- Add /pkg/server/enterprise_wire_gen.go (keep enterprise wire file ignored)
- This enables the new committed wire files architecture for CI
* CI Migration: Add enhanced wire tool with automatic build constraints
- Backport enhanced wire tool from main branch with -gen_tags flag
- This enables automatic regeneration with proper constraints to prevent conflicts
- Wire file contains all required functions: Initialize, InitializeDocumentBuilders, etc.
- Solves the missing wire functions issue causing CI failures
- Enhanced tool ensures build constraints persist on regeneration
* CI Migration: Update Makefile to use enhanced wire tool with build constraints
- Update gen-go target to use -gen_tags flag for automatic build constraints
- Ensures future engineers get proper build constraints when running 'make gen-go'
- Matches main branch approach for consistent wire file generation
- Removes dependency on WIRE_TAGS variable and GO_RACE_FLAG for simplicity
* Add gen-enterprise-go target to Makefile for release-12.0.3
- Backports gen-enterprise-go target from main branch
- Enables enterprise wire file generation in release branches
- Part of CI migration backport wire infrastructure fixes
- Resolves CI issues where enterprise wire functions were missing
* Fix wire tool golden file format for Drone CI compatibility
- Update all 43 golden test files to match main branch format
- Change go:generate command from github.com/google/wire/cmd/wire to ./pkg/build/wire/cmd/wire/main.go
- Remove legacy '// +build !wireinject' constraints
- Fixes Drone CI test failures that were blocking OSS PR merge
- All wire tests now pass successfully
This aligns the backport branch with the golden file format updates
that were made in main branch when the wire tool was enhanced.
* Update swagger specs to include enterprise APIs
- Regenerated api-enterprise-spec.json with enterprise API definitions
- Updated api-merged.json with merged OSS and enterprise specs
- Regenerated openapi3.json with complete API specifications
- Fixes enterprise CI swagger generation validation failures
- Enterprise APIs now properly detected and documented
* Fix OSS integration tests missing enterprise build tags in Drone CI
- Add -tags=enterprise to all integration test steps in lib.star
- Fixes test-backend-integration, postgres-integration-tests, and mysql-integration-tests
- Regenerate .drone.yml with proper enterprise build tags
- Resolves 'server could not find the requested resource' errors for enterprise APIs
- Ensures enterprise APIs (querylibrary, reporting, banners, scim) are registered during tests
- Aligns OSS Drone CI with GitHub Actions behavior and enterprise repository
* Fix CODEOWNERS for release-12.0.3 compatibility
- Remove 21 entries that reference files/directories not present in release branch
- Resolves File Exist Checker failures in codeowners-validator workflow
- Maintains team ownership assignments from main branch for existing files
- Lines removed: .air.toml, apps/secret/, apps/iam/, e2e-playwright/, packages/grafana-alerting/, etc.
* baldm0mma/ update releasefinder
* Add i18n-extract script for release branch compatibility
- Add 'i18n-extract': 'make i18n-extract' to package.json scripts
- Resolves i18n-verify workflow failure that expects this script
- The make target already exists and handles OSS + enterprise i18n extraction
- Maintains i18n verification functionality from main branch workflows
- Simple safe addition that calls existing make infrastructure
* Phase 4: Fix GitHub Actions workflow branch triggers
- Add release-*.*.* pattern to 8 workflows missing it
- Fix duplicate release branch patterns in 3 workflows
- Ensure consistent branch trigger format across all workflows
- Critical workflows now properly trigger on release branches
Fixes workflows: actionlint, backend-code-checks, go-lint, reject-gh-secrets,
run-schema-v2-e2e, shellcheck, swagger-gen, trivy-scan
* Fix: Backport E2E runner infrastructure for Enterprise CI
- Add e2e/main.go and e2e/internal/ directory from main branch
- Add urfave/cli/v3 dependency required by E2E runner
- Fixes Enterprise CI failure: 'Build E2E test runner' and 'Build & package Grafana for e2e tests'
- Root cause: E2E runner infrastructure was added to main after release-12.0.3 branch creation
- Solution: Backport missing E2E runner files to enable Enterprise CI completion
Resolves: no Go files in /opt/actions-runner/_work/grafana-enterprise/grafana-enterprise/grafana/e2e
* Fix: Update go.mod dependency classification for urfave/cli/v3
- Change urfave/cli/v3 from indirect to direct dependency
- Fixes Go Workspace Check failure in CI
- Required after adding E2E runner infrastructure that directly imports urfave/cli/v3
- Resolves: make update-workspace corrects dependency classification
* Fix: Add team ownership for urfave/cli/v3 dependency
- Assign @grafana/grafana-backend-group as owner for github.com/urfave/cli/v3@v3.3.8
- Follows existing pattern: urfave/cli v1 and v2 also owned by grafana-backend-group
- Resolves Backend Code Checks / Validate Backend Configs CI failure
- Required for E2E runner infrastructure dependency ownership compliance
Fixes: modowners check requiring team assignment for newly added dependencies
* Fix: Revert experimental E2E playwright infrastructure to stable version
- Revert pr-e2e-tests.yml to stable Cypress-based E2E testing
- Remove experimental storybook-verification-playwright.yml workflow
- Revert run-dashboard-search-e2e.yml and release-pr.yml to use e2e/test-plugins/
- Keep stable E2E runner infrastructure (e2e/main.go + e2e/internal/)
- Remove experimental playwright features per team recommendation
Team feedback: Playwright tests are experimental and shouldn't be backported to stable release branches
* Fix: Complete cleanup of experimental playwright dependencies
- Revert package.json to stable version (remove e2e-playwright scripts and path references)
- Revert playwright.config.ts to stable plugin-e2e configuration
- Remove all experimental playwright infrastructure dependencies
- Ensure clean stable E2E testing environment
All experimental features removed per team recommendation for stable release branches
* Fix: Restore working package.json configuration
- Revert package.json to version 12.0.3 (working release branch version)
- Fix workspace dependency resolution issues caused by incorrect revert to main branch version
- FE tests, betterer, and linting should now work correctly
Issue was caused by reverting package.json to main branch (12.1.0-pre) instead of keeping
the working release branch configuration (12.0.3)
* CI: mirror some CI dependencies (#106148)
* mirror some CI dependencies
* remove -v from go build
* Fix: Backport missing e2e/run-suite script for daggerbuild E2E system
The daggerbuild E2E system (used by OSS workflows) expects ./e2e/run-suite
to exist, but we only backported the new E2E runner infrastructure.
This script is needed for:
- OSS workflow: 'go run ./pkg/build/e2e --suite=dashboards-suite'
- Legacy Cypress configuration with video support
- Integration between daggerbuild and existing Cypress test suites
Resolves E2E test failures in OSS workflows where videos directory
cannot be found because run-suite script was missing.
* Fix: Resolve daggerbuild E2E path doubling issue
- Extract just suite name from full path using filepath.Base()
- Prevents doubled paths like './e2e/e2e/dashboards-suite/videos'
- Resolves 'no spec files found' and 'no such file or directory' errors
- GitHub Actions passes full paths like 'e2e/dashboards-suite' but run-suite script expects just 'dashboards-suite'
* Infrastructure: Wholesale copy pkg/build/ from main
COMPLETE DAGGERBUILD SYSTEM UPDATE:
- Modern E2E system with CLI framework and --flags support
- New accessibility testing system (a11y/)
- New Playwright E2E testing system (e2e-playwright/)
- External infrastructure improvements (musl.cc → dl.grafana.com/ci)
- Updated daggerbuild core components with latest fixes
- Updated Go dependencies and wire modules
ARCHITECTURAL COMPATIBILITY VERIFIED:
- Modern pkg/build calls: ./e2e-runner cypress --start-grafana=false --cypress-video
- Our e2e runner supports: All required parameters including --suite, --env flags
- GitHub Actions workflows: Pass compatible arguments
- Binary builds: Successfully creates working e2e-runner
RESOLVES ISSUES:
- Fixes --flags parameter compatibility with GitHub Actions
- Includes all follow-up infrastructure improvements
- Provides complete, tested system with modern CLI framework
- Eliminates external dependency failures (musl.cc timeouts)
- Removes need for path doubling workarounds (modern system handles full paths correctly)
Replaces incremental cherry-picking with complete, tested system from main.
* Dependencies: Update Go modules after pkg/build wholesale copy
DEPENDENCY UPDATES:
- Updated go.work.sum with new dependencies from modern pkg/build system
- Updated all workspace module dependencies (go.mod/go.sum files)
- Removed pkg/build/cmd/enterprise.go (enterprise-only file, gets copied during enterprise development)
ENTERPRISE INTEGRATION FIX:
- enterprise.go file doesn't belong in OSS repository
- Gets copied from grafana-enterprise during development mode
- Main branch doesn't have this file, explaining module compatibility
All Go modules now properly resolved and compatible with modern pkg/build architecture.
* Dependencies: Update workspace Go module checksums after pkg/build wholesale copy
- Synchronizes all go.sum files across workspace modules
- Adds missing .mod.h1 entries that were required after infrastructure update
- Resolves Go Workspace Check CI failures
- Updates 22 modules: .citools/, apps/, pkg/ subdirectories plus go.work.sum
Addresses CI error: 'Please run make update-workspace and commit the changes'
* Infrastructure: Revert to pre-Playwright E2E system for release branch compatibility
Strategic combination of modern daggerbuild with stable E2E infrastructure:
**Modern Daggerbuild (from main):**
- Latest CLI framework (github.com/urfave/cli/v3)
- External infrastructure fixes (musl.cc → dl.grafana.com/ci)
- Complete pkg/build/ system with all enhancements
- Updated dependencies and architecture improvements
**Stable E2E Infrastructure (pre-Playwright):**
- pkg/build/e2e/service.go: Reverted to version before commit b6580ccb103942d3ea26c52fac320810aa93fa1e
- pkg/build/a11y/: Reverted to stable version compatible with existing infrastructure
- Removed experimental pkg/build/e2e-playwright/ system
- Removed experimental e2e-playwright/ test infrastructure
**Why This Approach:**
- GitHub Actions workflows call 'go run ./pkg/build/e2e' (modern system)
- Modern system now expects only standard e2e/ directory (compatible)
- Release branches have standard e2e/ infrastructure (dashboards-suite, various-suite, etc.)
- Eliminates dependency on experimental Playwright infrastructure
**Key Dependencies Met:**
- e2e/pa11yci.conf.js: Added for a11y test compatibility
- /src/e2e directory: Standard directory structure (no e2e-playwright needed)
- Existing test plugins: Uses stable e2e/test-plugins/
**Result:**
Best of both worlds - modern, reliable daggerbuild infrastructure with
proven E2E testing that works across all release branches without
requiring experimental dependencies.
* Fix: Remove unused embed.go file causing golangci-lint failure
- Removes pkg/build/daggerbuild/msi/embed.go with unused embed.FS variable
- MSI build process uses directory mounting instead of embedded filesystem
- Resolves 'var resources is unused (unused)' linting error
* Fix: Update Node.js version to match working E2E configuration
- Changes from v22.11.0 to v22.16.0 to match commit 17952d45e4e406ca7c6f5f441e4ce3ca9d20982a
- Working commit had all E2E tests passing with same daggerbuild infrastructure
- Node.js version differences can affect frontend builds and UI rendering
- Ensures consistent environment between working reference and current branch
* Fix: Use conditional container base for E2E compatibility
- Alpine for OSS tests (better old arch dashboardScene=false compatibility)
- Ubuntu for Enterprise tests (when image renderer needed)
- Restores original release-12.0.3 Alpine behavior for OSS
- Should resolve old arch E2E test failures
* Fix: Go fmt formatting for conditional container logic
* Revert: Remove unnecessary Alpine/Ubuntu conditional logic
- Real issue was wrong environment variable name (dashboardScene vs DISABLE_SCENES)
- Keep Ubuntu base (original main branch behavior) for simplicity
- Container base was not the root cause of old arch failures
* Experiment: Copy scripts/ from pre-Playwright commit (ea0ddb3fc95)
- Copied scripts directory from commit ea0ddb3fc95 (just before Playwright migration)
- This overwrites some CI migration fixes but testing if it's actually needed
- Can revert back to b9b4602dbd5 if CI breaks
Test commit to see real impact on GitHub Actions workflows.
* trigger ci 01
* Fix: Copy .drone.star from main to match scripts structure
- Resolves Starlark evaluation error for missing integration_test_pipelines
- Aligns .drone.star with main branch scripts structure
- Same fix applied to both OSS and Enterprise repositories
* make drone
* Fix ARM/v7 Docker build failures by using dagger run for cross-compilation
- Change artifacts_cmd() in scripts/drone/steps/rgm.star to use 'dagger run go run' instead of 'go run'
- Add --max-execution-steps 100000 to make drone target in Makefile to properly regenerate .drone.yml
- This fixes CGO cross-compilation issues with SQLite for ARM/v7 Docker builds
- Matches the approach already used successfully in Enterprise builds
* Fix Docker base image references in rgm build steps
- Change from symbolic names (alpine-base, ubuntu-base) to actual Docker images
- alpine-base → alpine:3.21.3
- ubuntu-base → ubuntu:22.04
- Add ubuntu and alpine parameters to rgm_artifacts_step and rgm_build_docker_step functions
- Fixes Docker pull errors: 'repository does not exist or may require authorization'
- Aligns OSS configuration with Enterprise approach
---------
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2025-07-18 23:14:14 +08:00
|
|
|
"image": images["go"],
|
2024-01-11 23:22:14 +08:00
|
|
|
"pull": "always",
|
CI Migration: Backport pkg/build (daggerbuild) and GHAs to `release-12.0.3` (#107997)
* CI: move grafana-build into pkg/build (#105640)
* move grafana-build into pkg/build
* Update go.mod/go.sum files after cherry-pick build
- Updates from workspace sync after cherry-picking daggerbuild package
- Resolves dependency conflicts from pkg/build integration
- Required for successful build after CI migration backport
* CI Migration: Replace .github with main branch version
- Complete replacement of .github directory from main branch
- Includes updated workflows, actions, and configuration files
- Ensures all CI improvements from main are included
- Next step: fix branch-specific issues in separate commits
* Fix branch triggers: Update workflows to target release branches
- Update 8 workflows to trigger on release-* instead of main
- Ensures workflows run on pull requests to release branches
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* Fix branch triggers: Update workflows to target both main and release branches
- CORRECTED: Include both main and release-* branch patterns
- Ensures workflows run on both main branch (original functionality) and release branches (needed for backport)
- Previous commit incorrectly removed main branch support
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* CI Migration: Update .gitignore to allow OSS wire file to be committed
- Remove **/wire_gen.go (allow pkg/server/wire_gen.go to be committed)
- Add /pkg/server/enterprise_wire_gen.go (keep enterprise wire file ignored)
- This enables the new committed wire files architecture for CI
* CI Migration: Add enhanced wire tool with automatic build constraints
- Backport enhanced wire tool from main branch with -gen_tags flag
- This enables automatic regeneration with proper constraints to prevent conflicts
- Wire file contains all required functions: Initialize, InitializeDocumentBuilders, etc.
- Solves the missing wire functions issue causing CI failures
- Enhanced tool ensures build constraints persist on regeneration
* CI Migration: Update Makefile to use enhanced wire tool with build constraints
- Update gen-go target to use -gen_tags flag for automatic build constraints
- Ensures future engineers get proper build constraints when running 'make gen-go'
- Matches main branch approach for consistent wire file generation
- Removes dependency on WIRE_TAGS variable and GO_RACE_FLAG for simplicity
* Add gen-enterprise-go target to Makefile for release-12.0.3
- Backports gen-enterprise-go target from main branch
- Enables enterprise wire file generation in release branches
- Part of CI migration backport wire infrastructure fixes
- Resolves CI issues where enterprise wire functions were missing
* Fix wire tool golden file format for Drone CI compatibility
- Update all 43 golden test files to match main branch format
- Change go:generate command from github.com/google/wire/cmd/wire to ./pkg/build/wire/cmd/wire/main.go
- Remove legacy '// +build !wireinject' constraints
- Fixes Drone CI test failures that were blocking OSS PR merge
- All wire tests now pass successfully
This aligns the backport branch with the golden file format updates
that were made in main branch when the wire tool was enhanced.
* Update swagger specs to include enterprise APIs
- Regenerated api-enterprise-spec.json with enterprise API definitions
- Updated api-merged.json with merged OSS and enterprise specs
- Regenerated openapi3.json with complete API specifications
- Fixes enterprise CI swagger generation validation failures
- Enterprise APIs now properly detected and documented
* Fix OSS integration tests missing enterprise build tags in Drone CI
- Add -tags=enterprise to all integration test steps in lib.star
- Fixes test-backend-integration, postgres-integration-tests, and mysql-integration-tests
- Regenerate .drone.yml with proper enterprise build tags
- Resolves 'server could not find the requested resource' errors for enterprise APIs
- Ensures enterprise APIs (querylibrary, reporting, banners, scim) are registered during tests
- Aligns OSS Drone CI with GitHub Actions behavior and enterprise repository
* Fix CODEOWNERS for release-12.0.3 compatibility
- Remove 21 entries that reference files/directories not present in release branch
- Resolves File Exist Checker failures in codeowners-validator workflow
- Maintains team ownership assignments from main branch for existing files
- Lines removed: .air.toml, apps/secret/, apps/iam/, e2e-playwright/, packages/grafana-alerting/, etc.
* baldm0mma/ update releasefinder
* Add i18n-extract script for release branch compatibility
- Add 'i18n-extract': 'make i18n-extract' to package.json scripts
- Resolves i18n-verify workflow failure that expects this script
- The make target already exists and handles OSS + enterprise i18n extraction
- Maintains i18n verification functionality from main branch workflows
- Simple safe addition that calls existing make infrastructure
* Phase 4: Fix GitHub Actions workflow branch triggers
- Add release-*.*.* pattern to 8 workflows missing it
- Fix duplicate release branch patterns in 3 workflows
- Ensure consistent branch trigger format across all workflows
- Critical workflows now properly trigger on release branches
Fixes workflows: actionlint, backend-code-checks, go-lint, reject-gh-secrets,
run-schema-v2-e2e, shellcheck, swagger-gen, trivy-scan
* Fix: Backport E2E runner infrastructure for Enterprise CI
- Add e2e/main.go and e2e/internal/ directory from main branch
- Add urfave/cli/v3 dependency required by E2E runner
- Fixes Enterprise CI failure: 'Build E2E test runner' and 'Build & package Grafana for e2e tests'
- Root cause: E2E runner infrastructure was added to main after release-12.0.3 branch creation
- Solution: Backport missing E2E runner files to enable Enterprise CI completion
Resolves: no Go files in /opt/actions-runner/_work/grafana-enterprise/grafana-enterprise/grafana/e2e
* Fix: Update go.mod dependency classification for urfave/cli/v3
- Change urfave/cli/v3 from indirect to direct dependency
- Fixes Go Workspace Check failure in CI
- Required after adding E2E runner infrastructure that directly imports urfave/cli/v3
- Resolves: make update-workspace corrects dependency classification
* Fix: Add team ownership for urfave/cli/v3 dependency
- Assign @grafana/grafana-backend-group as owner for github.com/urfave/cli/v3@v3.3.8
- Follows existing pattern: urfave/cli v1 and v2 also owned by grafana-backend-group
- Resolves Backend Code Checks / Validate Backend Configs CI failure
- Required for E2E runner infrastructure dependency ownership compliance
Fixes: modowners check requiring team assignment for newly added dependencies
* Fix: Revert experimental E2E playwright infrastructure to stable version
- Revert pr-e2e-tests.yml to stable Cypress-based E2E testing
- Remove experimental storybook-verification-playwright.yml workflow
- Revert run-dashboard-search-e2e.yml and release-pr.yml to use e2e/test-plugins/
- Keep stable E2E runner infrastructure (e2e/main.go + e2e/internal/)
- Remove experimental playwright features per team recommendation
Team feedback: Playwright tests are experimental and shouldn't be backported to stable release branches
* Fix: Complete cleanup of experimental playwright dependencies
- Revert package.json to stable version (remove e2e-playwright scripts and path references)
- Revert playwright.config.ts to stable plugin-e2e configuration
- Remove all experimental playwright infrastructure dependencies
- Ensure clean stable E2E testing environment
All experimental features removed per team recommendation for stable release branches
* Fix: Restore working package.json configuration
- Revert package.json to version 12.0.3 (working release branch version)
- Fix workspace dependency resolution issues caused by incorrect revert to main branch version
- FE tests, betterer, and linting should now work correctly
Issue was caused by reverting package.json to main branch (12.1.0-pre) instead of keeping
the working release branch configuration (12.0.3)
* CI: mirror some CI dependencies (#106148)
* mirror some CI dependencies
* remove -v from go build
* Fix: Backport missing e2e/run-suite script for daggerbuild E2E system
The daggerbuild E2E system (used by OSS workflows) expects ./e2e/run-suite
to exist, but we only backported the new E2E runner infrastructure.
This script is needed for:
- OSS workflow: 'go run ./pkg/build/e2e --suite=dashboards-suite'
- Legacy Cypress configuration with video support
- Integration between daggerbuild and existing Cypress test suites
Resolves E2E test failures in OSS workflows where videos directory
cannot be found because run-suite script was missing.
* Fix: Resolve daggerbuild E2E path doubling issue
- Extract just suite name from full path using filepath.Base()
- Prevents doubled paths like './e2e/e2e/dashboards-suite/videos'
- Resolves 'no spec files found' and 'no such file or directory' errors
- GitHub Actions passes full paths like 'e2e/dashboards-suite' but run-suite script expects just 'dashboards-suite'
* Infrastructure: Wholesale copy pkg/build/ from main
COMPLETE DAGGERBUILD SYSTEM UPDATE:
- Modern E2E system with CLI framework and --flags support
- New accessibility testing system (a11y/)
- New Playwright E2E testing system (e2e-playwright/)
- External infrastructure improvements (musl.cc → dl.grafana.com/ci)
- Updated daggerbuild core components with latest fixes
- Updated Go dependencies and wire modules
ARCHITECTURAL COMPATIBILITY VERIFIED:
- Modern pkg/build calls: ./e2e-runner cypress --start-grafana=false --cypress-video
- Our e2e runner supports: All required parameters including --suite, --env flags
- GitHub Actions workflows: Pass compatible arguments
- Binary builds: Successfully creates working e2e-runner
RESOLVES ISSUES:
- Fixes --flags parameter compatibility with GitHub Actions
- Includes all follow-up infrastructure improvements
- Provides complete, tested system with modern CLI framework
- Eliminates external dependency failures (musl.cc timeouts)
- Removes need for path doubling workarounds (modern system handles full paths correctly)
Replaces incremental cherry-picking with complete, tested system from main.
* Dependencies: Update Go modules after pkg/build wholesale copy
DEPENDENCY UPDATES:
- Updated go.work.sum with new dependencies from modern pkg/build system
- Updated all workspace module dependencies (go.mod/go.sum files)
- Removed pkg/build/cmd/enterprise.go (enterprise-only file, gets copied during enterprise development)
ENTERPRISE INTEGRATION FIX:
- enterprise.go file doesn't belong in OSS repository
- Gets copied from grafana-enterprise during development mode
- Main branch doesn't have this file, explaining module compatibility
All Go modules now properly resolved and compatible with modern pkg/build architecture.
* Dependencies: Update workspace Go module checksums after pkg/build wholesale copy
- Synchronizes all go.sum files across workspace modules
- Adds missing .mod.h1 entries that were required after infrastructure update
- Resolves Go Workspace Check CI failures
- Updates 22 modules: .citools/, apps/, pkg/ subdirectories plus go.work.sum
Addresses CI error: 'Please run make update-workspace and commit the changes'
* Infrastructure: Revert to pre-Playwright E2E system for release branch compatibility
Strategic combination of modern daggerbuild with stable E2E infrastructure:
**Modern Daggerbuild (from main):**
- Latest CLI framework (github.com/urfave/cli/v3)
- External infrastructure fixes (musl.cc → dl.grafana.com/ci)
- Complete pkg/build/ system with all enhancements
- Updated dependencies and architecture improvements
**Stable E2E Infrastructure (pre-Playwright):**
- pkg/build/e2e/service.go: Reverted to version before commit b6580ccb103942d3ea26c52fac320810aa93fa1e
- pkg/build/a11y/: Reverted to stable version compatible with existing infrastructure
- Removed experimental pkg/build/e2e-playwright/ system
- Removed experimental e2e-playwright/ test infrastructure
**Why This Approach:**
- GitHub Actions workflows call 'go run ./pkg/build/e2e' (modern system)
- Modern system now expects only standard e2e/ directory (compatible)
- Release branches have standard e2e/ infrastructure (dashboards-suite, various-suite, etc.)
- Eliminates dependency on experimental Playwright infrastructure
**Key Dependencies Met:**
- e2e/pa11yci.conf.js: Added for a11y test compatibility
- /src/e2e directory: Standard directory structure (no e2e-playwright needed)
- Existing test plugins: Uses stable e2e/test-plugins/
**Result:**
Best of both worlds - modern, reliable daggerbuild infrastructure with
proven E2E testing that works across all release branches without
requiring experimental dependencies.
* Fix: Remove unused embed.go file causing golangci-lint failure
- Removes pkg/build/daggerbuild/msi/embed.go with unused embed.FS variable
- MSI build process uses directory mounting instead of embedded filesystem
- Resolves 'var resources is unused (unused)' linting error
* Fix: Update Node.js version to match working E2E configuration
- Changes from v22.11.0 to v22.16.0 to match commit 17952d45e4e406ca7c6f5f441e4ce3ca9d20982a
- Working commit had all E2E tests passing with same daggerbuild infrastructure
- Node.js version differences can affect frontend builds and UI rendering
- Ensures consistent environment between working reference and current branch
* Fix: Use conditional container base for E2E compatibility
- Alpine for OSS tests (better old arch dashboardScene=false compatibility)
- Ubuntu for Enterprise tests (when image renderer needed)
- Restores original release-12.0.3 Alpine behavior for OSS
- Should resolve old arch E2E test failures
* Fix: Go fmt formatting for conditional container logic
* Revert: Remove unnecessary Alpine/Ubuntu conditional logic
- Real issue was wrong environment variable name (dashboardScene vs DISABLE_SCENES)
- Keep Ubuntu base (original main branch behavior) for simplicity
- Container base was not the root cause of old arch failures
* Experiment: Copy scripts/ from pre-Playwright commit (ea0ddb3fc95)
- Copied scripts directory from commit ea0ddb3fc95 (just before Playwright migration)
- This overwrites some CI migration fixes but testing if it's actually needed
- Can revert back to b9b4602dbd5 if CI breaks
Test commit to see real impact on GitHub Actions workflows.
* trigger ci 01
* Fix: Copy .drone.star from main to match scripts structure
- Resolves Starlark evaluation error for missing integration_test_pipelines
- Aligns .drone.star with main branch scripts structure
- Same fix applied to both OSS and Enterprise repositories
* make drone
* Fix ARM/v7 Docker build failures by using dagger run for cross-compilation
- Change artifacts_cmd() in scripts/drone/steps/rgm.star to use 'dagger run go run' instead of 'go run'
- Add --max-execution-steps 100000 to make drone target in Makefile to properly regenerate .drone.yml
- This fixes CGO cross-compilation issues with SQLite for ARM/v7 Docker builds
- Matches the approach already used successfully in Enterprise builds
* Fix Docker base image references in rgm build steps
- Change from symbolic names (alpine-base, ubuntu-base) to actual Docker images
- alpine-base → alpine:3.21.3
- ubuntu-base → ubuntu:22.04
- Add ubuntu and alpine parameters to rgm_artifacts_step and rgm_build_docker_step functions
- Fixes Docker pull errors: 'repository does not exist or may require authorization'
- Aligns OSS configuration with Enterprise approach
---------
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2025-07-18 23:14:14 +08:00
|
|
|
"commands": with_dagger_install([
|
2024-11-21 23:08:02 +08:00
|
|
|
"export GITHUB_TOKEN=$(cat /github-app/token)",
|
CI Migration: Backport pkg/build (daggerbuild) and GHAs to `release-12.0.3` (#107997)
* CI: move grafana-build into pkg/build (#105640)
* move grafana-build into pkg/build
* Update go.mod/go.sum files after cherry-pick build
- Updates from workspace sync after cherry-picking daggerbuild package
- Resolves dependency conflicts from pkg/build integration
- Required for successful build after CI migration backport
* CI Migration: Replace .github with main branch version
- Complete replacement of .github directory from main branch
- Includes updated workflows, actions, and configuration files
- Ensures all CI improvements from main are included
- Next step: fix branch-specific issues in separate commits
* Fix branch triggers: Update workflows to target release branches
- Update 8 workflows to trigger on release-* instead of main
- Ensures workflows run on pull requests to release branches
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* Fix branch triggers: Update workflows to target both main and release branches
- CORRECTED: Include both main and release-* branch patterns
- Ensures workflows run on both main branch (original functionality) and release branches (needed for backport)
- Previous commit incorrectly removed main branch support
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* CI Migration: Update .gitignore to allow OSS wire file to be committed
- Remove **/wire_gen.go (allow pkg/server/wire_gen.go to be committed)
- Add /pkg/server/enterprise_wire_gen.go (keep enterprise wire file ignored)
- This enables the new committed wire files architecture for CI
* CI Migration: Add enhanced wire tool with automatic build constraints
- Backport enhanced wire tool from main branch with -gen_tags flag
- This enables automatic regeneration with proper constraints to prevent conflicts
- Wire file contains all required functions: Initialize, InitializeDocumentBuilders, etc.
- Solves the missing wire functions issue causing CI failures
- Enhanced tool ensures build constraints persist on regeneration
* CI Migration: Update Makefile to use enhanced wire tool with build constraints
- Update gen-go target to use -gen_tags flag for automatic build constraints
- Ensures future engineers get proper build constraints when running 'make gen-go'
- Matches main branch approach for consistent wire file generation
- Removes dependency on WIRE_TAGS variable and GO_RACE_FLAG for simplicity
* Add gen-enterprise-go target to Makefile for release-12.0.3
- Backports gen-enterprise-go target from main branch
- Enables enterprise wire file generation in release branches
- Part of CI migration backport wire infrastructure fixes
- Resolves CI issues where enterprise wire functions were missing
* Fix wire tool golden file format for Drone CI compatibility
- Update all 43 golden test files to match main branch format
- Change go:generate command from github.com/google/wire/cmd/wire to ./pkg/build/wire/cmd/wire/main.go
- Remove legacy '// +build !wireinject' constraints
- Fixes Drone CI test failures that were blocking OSS PR merge
- All wire tests now pass successfully
This aligns the backport branch with the golden file format updates
that were made in main branch when the wire tool was enhanced.
* Update swagger specs to include enterprise APIs
- Regenerated api-enterprise-spec.json with enterprise API definitions
- Updated api-merged.json with merged OSS and enterprise specs
- Regenerated openapi3.json with complete API specifications
- Fixes enterprise CI swagger generation validation failures
- Enterprise APIs now properly detected and documented
* Fix OSS integration tests missing enterprise build tags in Drone CI
- Add -tags=enterprise to all integration test steps in lib.star
- Fixes test-backend-integration, postgres-integration-tests, and mysql-integration-tests
- Regenerate .drone.yml with proper enterprise build tags
- Resolves 'server could not find the requested resource' errors for enterprise APIs
- Ensures enterprise APIs (querylibrary, reporting, banners, scim) are registered during tests
- Aligns OSS Drone CI with GitHub Actions behavior and enterprise repository
* Fix CODEOWNERS for release-12.0.3 compatibility
- Remove 21 entries that reference files/directories not present in release branch
- Resolves File Exist Checker failures in codeowners-validator workflow
- Maintains team ownership assignments from main branch for existing files
- Lines removed: .air.toml, apps/secret/, apps/iam/, e2e-playwright/, packages/grafana-alerting/, etc.
* baldm0mma/ update releasefinder
* Add i18n-extract script for release branch compatibility
- Add 'i18n-extract': 'make i18n-extract' to package.json scripts
- Resolves i18n-verify workflow failure that expects this script
- The make target already exists and handles OSS + enterprise i18n extraction
- Maintains i18n verification functionality from main branch workflows
- Simple safe addition that calls existing make infrastructure
* Phase 4: Fix GitHub Actions workflow branch triggers
- Add release-*.*.* pattern to 8 workflows missing it
- Fix duplicate release branch patterns in 3 workflows
- Ensure consistent branch trigger format across all workflows
- Critical workflows now properly trigger on release branches
Fixes workflows: actionlint, backend-code-checks, go-lint, reject-gh-secrets,
run-schema-v2-e2e, shellcheck, swagger-gen, trivy-scan
* Fix: Backport E2E runner infrastructure for Enterprise CI
- Add e2e/main.go and e2e/internal/ directory from main branch
- Add urfave/cli/v3 dependency required by E2E runner
- Fixes Enterprise CI failure: 'Build E2E test runner' and 'Build & package Grafana for e2e tests'
- Root cause: E2E runner infrastructure was added to main after release-12.0.3 branch creation
- Solution: Backport missing E2E runner files to enable Enterprise CI completion
Resolves: no Go files in /opt/actions-runner/_work/grafana-enterprise/grafana-enterprise/grafana/e2e
* Fix: Update go.mod dependency classification for urfave/cli/v3
- Change urfave/cli/v3 from indirect to direct dependency
- Fixes Go Workspace Check failure in CI
- Required after adding E2E runner infrastructure that directly imports urfave/cli/v3
- Resolves: make update-workspace corrects dependency classification
* Fix: Add team ownership for urfave/cli/v3 dependency
- Assign @grafana/grafana-backend-group as owner for github.com/urfave/cli/v3@v3.3.8
- Follows existing pattern: urfave/cli v1 and v2 also owned by grafana-backend-group
- Resolves Backend Code Checks / Validate Backend Configs CI failure
- Required for E2E runner infrastructure dependency ownership compliance
Fixes: modowners check requiring team assignment for newly added dependencies
* Fix: Revert experimental E2E playwright infrastructure to stable version
- Revert pr-e2e-tests.yml to stable Cypress-based E2E testing
- Remove experimental storybook-verification-playwright.yml workflow
- Revert run-dashboard-search-e2e.yml and release-pr.yml to use e2e/test-plugins/
- Keep stable E2E runner infrastructure (e2e/main.go + e2e/internal/)
- Remove experimental playwright features per team recommendation
Team feedback: Playwright tests are experimental and shouldn't be backported to stable release branches
* Fix: Complete cleanup of experimental playwright dependencies
- Revert package.json to stable version (remove e2e-playwright scripts and path references)
- Revert playwright.config.ts to stable plugin-e2e configuration
- Remove all experimental playwright infrastructure dependencies
- Ensure clean stable E2E testing environment
All experimental features removed per team recommendation for stable release branches
* Fix: Restore working package.json configuration
- Revert package.json to version 12.0.3 (working release branch version)
- Fix workspace dependency resolution issues caused by incorrect revert to main branch version
- FE tests, betterer, and linting should now work correctly
Issue was caused by reverting package.json to main branch (12.1.0-pre) instead of keeping
the working release branch configuration (12.0.3)
* CI: mirror some CI dependencies (#106148)
* mirror some CI dependencies
* remove -v from go build
* Fix: Backport missing e2e/run-suite script for daggerbuild E2E system
The daggerbuild E2E system (used by OSS workflows) expects ./e2e/run-suite
to exist, but we only backported the new E2E runner infrastructure.
This script is needed for:
- OSS workflow: 'go run ./pkg/build/e2e --suite=dashboards-suite'
- Legacy Cypress configuration with video support
- Integration between daggerbuild and existing Cypress test suites
Resolves E2E test failures in OSS workflows where videos directory
cannot be found because run-suite script was missing.
* Fix: Resolve daggerbuild E2E path doubling issue
- Extract just suite name from full path using filepath.Base()
- Prevents doubled paths like './e2e/e2e/dashboards-suite/videos'
- Resolves 'no spec files found' and 'no such file or directory' errors
- GitHub Actions passes full paths like 'e2e/dashboards-suite' but run-suite script expects just 'dashboards-suite'
* Infrastructure: Wholesale copy pkg/build/ from main
COMPLETE DAGGERBUILD SYSTEM UPDATE:
- Modern E2E system with CLI framework and --flags support
- New accessibility testing system (a11y/)
- New Playwright E2E testing system (e2e-playwright/)
- External infrastructure improvements (musl.cc → dl.grafana.com/ci)
- Updated daggerbuild core components with latest fixes
- Updated Go dependencies and wire modules
ARCHITECTURAL COMPATIBILITY VERIFIED:
- Modern pkg/build calls: ./e2e-runner cypress --start-grafana=false --cypress-video
- Our e2e runner supports: All required parameters including --suite, --env flags
- GitHub Actions workflows: Pass compatible arguments
- Binary builds: Successfully creates working e2e-runner
RESOLVES ISSUES:
- Fixes --flags parameter compatibility with GitHub Actions
- Includes all follow-up infrastructure improvements
- Provides complete, tested system with modern CLI framework
- Eliminates external dependency failures (musl.cc timeouts)
- Removes need for path doubling workarounds (modern system handles full paths correctly)
Replaces incremental cherry-picking with complete, tested system from main.
* Dependencies: Update Go modules after pkg/build wholesale copy
DEPENDENCY UPDATES:
- Updated go.work.sum with new dependencies from modern pkg/build system
- Updated all workspace module dependencies (go.mod/go.sum files)
- Removed pkg/build/cmd/enterprise.go (enterprise-only file, gets copied during enterprise development)
ENTERPRISE INTEGRATION FIX:
- enterprise.go file doesn't belong in OSS repository
- Gets copied from grafana-enterprise during development mode
- Main branch doesn't have this file, explaining module compatibility
All Go modules now properly resolved and compatible with modern pkg/build architecture.
* Dependencies: Update workspace Go module checksums after pkg/build wholesale copy
- Synchronizes all go.sum files across workspace modules
- Adds missing .mod.h1 entries that were required after infrastructure update
- Resolves Go Workspace Check CI failures
- Updates 22 modules: .citools/, apps/, pkg/ subdirectories plus go.work.sum
Addresses CI error: 'Please run make update-workspace and commit the changes'
* Infrastructure: Revert to pre-Playwright E2E system for release branch compatibility
Strategic combination of modern daggerbuild with stable E2E infrastructure:
**Modern Daggerbuild (from main):**
- Latest CLI framework (github.com/urfave/cli/v3)
- External infrastructure fixes (musl.cc → dl.grafana.com/ci)
- Complete pkg/build/ system with all enhancements
- Updated dependencies and architecture improvements
**Stable E2E Infrastructure (pre-Playwright):**
- pkg/build/e2e/service.go: Reverted to version before commit b6580ccb103942d3ea26c52fac320810aa93fa1e
- pkg/build/a11y/: Reverted to stable version compatible with existing infrastructure
- Removed experimental pkg/build/e2e-playwright/ system
- Removed experimental e2e-playwright/ test infrastructure
**Why This Approach:**
- GitHub Actions workflows call 'go run ./pkg/build/e2e' (modern system)
- Modern system now expects only standard e2e/ directory (compatible)
- Release branches have standard e2e/ infrastructure (dashboards-suite, various-suite, etc.)
- Eliminates dependency on experimental Playwright infrastructure
**Key Dependencies Met:**
- e2e/pa11yci.conf.js: Added for a11y test compatibility
- /src/e2e directory: Standard directory structure (no e2e-playwright needed)
- Existing test plugins: Uses stable e2e/test-plugins/
**Result:**
Best of both worlds - modern, reliable daggerbuild infrastructure with
proven E2E testing that works across all release branches without
requiring experimental dependencies.
* Fix: Remove unused embed.go file causing golangci-lint failure
- Removes pkg/build/daggerbuild/msi/embed.go with unused embed.FS variable
- MSI build process uses directory mounting instead of embedded filesystem
- Resolves 'var resources is unused (unused)' linting error
* Fix: Update Node.js version to match working E2E configuration
- Changes from v22.11.0 to v22.16.0 to match commit 17952d45e4e406ca7c6f5f441e4ce3ca9d20982a
- Working commit had all E2E tests passing with same daggerbuild infrastructure
- Node.js version differences can affect frontend builds and UI rendering
- Ensures consistent environment between working reference and current branch
* Fix: Use conditional container base for E2E compatibility
- Alpine for OSS tests (better old arch dashboardScene=false compatibility)
- Ubuntu for Enterprise tests (when image renderer needed)
- Restores original release-12.0.3 Alpine behavior for OSS
- Should resolve old arch E2E test failures
* Fix: Go fmt formatting for conditional container logic
* Revert: Remove unnecessary Alpine/Ubuntu conditional logic
- Real issue was wrong environment variable name (dashboardScene vs DISABLE_SCENES)
- Keep Ubuntu base (original main branch behavior) for simplicity
- Container base was not the root cause of old arch failures
* Experiment: Copy scripts/ from pre-Playwright commit (ea0ddb3fc95)
- Copied scripts directory from commit ea0ddb3fc95 (just before Playwright migration)
- This overwrites some CI migration fixes but testing if it's actually needed
- Can revert back to b9b4602dbd5 if CI breaks
Test commit to see real impact on GitHub Actions workflows.
* trigger ci 01
* Fix: Copy .drone.star from main to match scripts structure
- Resolves Starlark evaluation error for missing integration_test_pipelines
- Aligns .drone.star with main branch scripts structure
- Same fix applied to both OSS and Enterprise repositories
* make drone
* Fix ARM/v7 Docker build failures by using dagger run for cross-compilation
- Change artifacts_cmd() in scripts/drone/steps/rgm.star to use 'dagger run go run' instead of 'go run'
- Add --max-execution-steps 100000 to make drone target in Makefile to properly regenerate .drone.yml
- This fixes CGO cross-compilation issues with SQLite for ARM/v7 Docker builds
- Matches the approach already used successfully in Enterprise builds
* Fix Docker base image references in rgm build steps
- Change from symbolic names (alpine-base, ubuntu-base) to actual Docker images
- alpine-base → alpine:3.21.3
- ubuntu-base → ubuntu:22.04
- Add ubuntu and alpine parameters to rgm_artifacts_step and rgm_build_docker_step functions
- Fixes Docker pull errors: 'repository does not exist or may require authorization'
- Aligns OSS configuration with Enterprise approach
---------
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2025-07-18 23:14:14 +08:00
|
|
|
"dagger run --silent go run ./pkg/build/cmd artifacts " +
|
2024-01-11 23:22:14 +08:00
|
|
|
"-a $${ARTIFACTS} " +
|
|
|
|
|
"--grafana-ref=$${GRAFANA_REF} " +
|
|
|
|
|
"--enterprise-ref=$${ENTERPRISE_REF} " +
|
2024-01-11 23:53:02 +08:00
|
|
|
"--grafana-repo=$${GRAFANA_REPO} " +
|
CI Migration: Backport pkg/build (daggerbuild) and GHAs to `release-12.0.3` (#107997)
* CI: move grafana-build into pkg/build (#105640)
* move grafana-build into pkg/build
* Update go.mod/go.sum files after cherry-pick build
- Updates from workspace sync after cherry-picking daggerbuild package
- Resolves dependency conflicts from pkg/build integration
- Required for successful build after CI migration backport
* CI Migration: Replace .github with main branch version
- Complete replacement of .github directory from main branch
- Includes updated workflows, actions, and configuration files
- Ensures all CI improvements from main are included
- Next step: fix branch-specific issues in separate commits
* Fix branch triggers: Update workflows to target release branches
- Update 8 workflows to trigger on release-* instead of main
- Ensures workflows run on pull requests to release branches
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* Fix branch triggers: Update workflows to target both main and release branches
- CORRECTED: Include both main and release-* branch patterns
- Ensures workflows run on both main branch (original functionality) and release branches (needed for backport)
- Previous commit incorrectly removed main branch support
- Workflows updated: documentation-ci, pr-codeql-analysis-*, pr-dependabot-update-go-workspace, pr-go-workspace-check, pr-k8s-codegen-check, verify-kinds, codeowners-validator
* CI Migration: Update .gitignore to allow OSS wire file to be committed
- Remove **/wire_gen.go (allow pkg/server/wire_gen.go to be committed)
- Add /pkg/server/enterprise_wire_gen.go (keep enterprise wire file ignored)
- This enables the new committed wire files architecture for CI
* CI Migration: Add enhanced wire tool with automatic build constraints
- Backport enhanced wire tool from main branch with -gen_tags flag
- This enables automatic regeneration with proper constraints to prevent conflicts
- Wire file contains all required functions: Initialize, InitializeDocumentBuilders, etc.
- Solves the missing wire functions issue causing CI failures
- Enhanced tool ensures build constraints persist on regeneration
* CI Migration: Update Makefile to use enhanced wire tool with build constraints
- Update gen-go target to use -gen_tags flag for automatic build constraints
- Ensures future engineers get proper build constraints when running 'make gen-go'
- Matches main branch approach for consistent wire file generation
- Removes dependency on WIRE_TAGS variable and GO_RACE_FLAG for simplicity
* Add gen-enterprise-go target to Makefile for release-12.0.3
- Backports gen-enterprise-go target from main branch
- Enables enterprise wire file generation in release branches
- Part of CI migration backport wire infrastructure fixes
- Resolves CI issues where enterprise wire functions were missing
* Fix wire tool golden file format for Drone CI compatibility
- Update all 43 golden test files to match main branch format
- Change go:generate command from github.com/google/wire/cmd/wire to ./pkg/build/wire/cmd/wire/main.go
- Remove legacy '// +build !wireinject' constraints
- Fixes Drone CI test failures that were blocking OSS PR merge
- All wire tests now pass successfully
This aligns the backport branch with the golden file format updates
that were made in main branch when the wire tool was enhanced.
* Update swagger specs to include enterprise APIs
- Regenerated api-enterprise-spec.json with enterprise API definitions
- Updated api-merged.json with merged OSS and enterprise specs
- Regenerated openapi3.json with complete API specifications
- Fixes enterprise CI swagger generation validation failures
- Enterprise APIs now properly detected and documented
* Fix OSS integration tests missing enterprise build tags in Drone CI
- Add -tags=enterprise to all integration test steps in lib.star
- Fixes test-backend-integration, postgres-integration-tests, and mysql-integration-tests
- Regenerate .drone.yml with proper enterprise build tags
- Resolves 'server could not find the requested resource' errors for enterprise APIs
- Ensures enterprise APIs (querylibrary, reporting, banners, scim) are registered during tests
- Aligns OSS Drone CI with GitHub Actions behavior and enterprise repository
* Fix CODEOWNERS for release-12.0.3 compatibility
- Remove 21 entries that reference files/directories not present in release branch
- Resolves File Exist Checker failures in codeowners-validator workflow
- Maintains team ownership assignments from main branch for existing files
- Lines removed: .air.toml, apps/secret/, apps/iam/, e2e-playwright/, packages/grafana-alerting/, etc.
* baldm0mma/ update releasefinder
* Add i18n-extract script for release branch compatibility
- Add 'i18n-extract': 'make i18n-extract' to package.json scripts
- Resolves i18n-verify workflow failure that expects this script
- The make target already exists and handles OSS + enterprise i18n extraction
- Maintains i18n verification functionality from main branch workflows
- Simple safe addition that calls existing make infrastructure
* Phase 4: Fix GitHub Actions workflow branch triggers
- Add release-*.*.* pattern to 8 workflows missing it
- Fix duplicate release branch patterns in 3 workflows
- Ensure consistent branch trigger format across all workflows
- Critical workflows now properly trigger on release branches
Fixes workflows: actionlint, backend-code-checks, go-lint, reject-gh-secrets,
run-schema-v2-e2e, shellcheck, swagger-gen, trivy-scan
* Fix: Backport E2E runner infrastructure for Enterprise CI
- Add e2e/main.go and e2e/internal/ directory from main branch
- Add urfave/cli/v3 dependency required by E2E runner
- Fixes Enterprise CI failure: 'Build E2E test runner' and 'Build & package Grafana for e2e tests'
- Root cause: E2E runner infrastructure was added to main after release-12.0.3 branch creation
- Solution: Backport missing E2E runner files to enable Enterprise CI completion
Resolves: no Go files in /opt/actions-runner/_work/grafana-enterprise/grafana-enterprise/grafana/e2e
* Fix: Update go.mod dependency classification for urfave/cli/v3
- Change urfave/cli/v3 from indirect to direct dependency
- Fixes Go Workspace Check failure in CI
- Required after adding E2E runner infrastructure that directly imports urfave/cli/v3
- Resolves: make update-workspace corrects dependency classification
* Fix: Add team ownership for urfave/cli/v3 dependency
- Assign @grafana/grafana-backend-group as owner for github.com/urfave/cli/v3@v3.3.8
- Follows existing pattern: urfave/cli v1 and v2 also owned by grafana-backend-group
- Resolves Backend Code Checks / Validate Backend Configs CI failure
- Required for E2E runner infrastructure dependency ownership compliance
Fixes: modowners check requiring team assignment for newly added dependencies
* Fix: Revert experimental E2E playwright infrastructure to stable version
- Revert pr-e2e-tests.yml to stable Cypress-based E2E testing
- Remove experimental storybook-verification-playwright.yml workflow
- Revert run-dashboard-search-e2e.yml and release-pr.yml to use e2e/test-plugins/
- Keep stable E2E runner infrastructure (e2e/main.go + e2e/internal/)
- Remove experimental playwright features per team recommendation
Team feedback: Playwright tests are experimental and shouldn't be backported to stable release branches
* Fix: Complete cleanup of experimental playwright dependencies
- Revert package.json to stable version (remove e2e-playwright scripts and path references)
- Revert playwright.config.ts to stable plugin-e2e configuration
- Remove all experimental playwright infrastructure dependencies
- Ensure clean stable E2E testing environment
All experimental features removed per team recommendation for stable release branches
* Fix: Restore working package.json configuration
- Revert package.json to version 12.0.3 (working release branch version)
- Fix workspace dependency resolution issues caused by incorrect revert to main branch version
- FE tests, betterer, and linting should now work correctly
Issue was caused by reverting package.json to main branch (12.1.0-pre) instead of keeping
the working release branch configuration (12.0.3)
* CI: mirror some CI dependencies (#106148)
* mirror some CI dependencies
* remove -v from go build
* Fix: Backport missing e2e/run-suite script for daggerbuild E2E system
The daggerbuild E2E system (used by OSS workflows) expects ./e2e/run-suite
to exist, but we only backported the new E2E runner infrastructure.
This script is needed for:
- OSS workflow: 'go run ./pkg/build/e2e --suite=dashboards-suite'
- Legacy Cypress configuration with video support
- Integration between daggerbuild and existing Cypress test suites
Resolves E2E test failures in OSS workflows where videos directory
cannot be found because run-suite script was missing.
* Fix: Resolve daggerbuild E2E path doubling issue
- Extract just suite name from full path using filepath.Base()
- Prevents doubled paths like './e2e/e2e/dashboards-suite/videos'
- Resolves 'no spec files found' and 'no such file or directory' errors
- GitHub Actions passes full paths like 'e2e/dashboards-suite' but run-suite script expects just 'dashboards-suite'
* Infrastructure: Wholesale copy pkg/build/ from main
COMPLETE DAGGERBUILD SYSTEM UPDATE:
- Modern E2E system with CLI framework and --flags support
- New accessibility testing system (a11y/)
- New Playwright E2E testing system (e2e-playwright/)
- External infrastructure improvements (musl.cc → dl.grafana.com/ci)
- Updated daggerbuild core components with latest fixes
- Updated Go dependencies and wire modules
ARCHITECTURAL COMPATIBILITY VERIFIED:
- Modern pkg/build calls: ./e2e-runner cypress --start-grafana=false --cypress-video
- Our e2e runner supports: All required parameters including --suite, --env flags
- GitHub Actions workflows: Pass compatible arguments
- Binary builds: Successfully creates working e2e-runner
RESOLVES ISSUES:
- Fixes --flags parameter compatibility with GitHub Actions
- Includes all follow-up infrastructure improvements
- Provides complete, tested system with modern CLI framework
- Eliminates external dependency failures (musl.cc timeouts)
- Removes need for path doubling workarounds (modern system handles full paths correctly)
Replaces incremental cherry-picking with complete, tested system from main.
* Dependencies: Update Go modules after pkg/build wholesale copy
DEPENDENCY UPDATES:
- Updated go.work.sum with new dependencies from modern pkg/build system
- Updated all workspace module dependencies (go.mod/go.sum files)
- Removed pkg/build/cmd/enterprise.go (enterprise-only file, gets copied during enterprise development)
ENTERPRISE INTEGRATION FIX:
- enterprise.go file doesn't belong in OSS repository
- Gets copied from grafana-enterprise during development mode
- Main branch doesn't have this file, explaining module compatibility
All Go modules now properly resolved and compatible with modern pkg/build architecture.
* Dependencies: Update workspace Go module checksums after pkg/build wholesale copy
- Synchronizes all go.sum files across workspace modules
- Adds missing .mod.h1 entries that were required after infrastructure update
- Resolves Go Workspace Check CI failures
- Updates 22 modules: .citools/, apps/, pkg/ subdirectories plus go.work.sum
Addresses CI error: 'Please run make update-workspace and commit the changes'
* Infrastructure: Revert to pre-Playwright E2E system for release branch compatibility
Strategic combination of modern daggerbuild with stable E2E infrastructure:
**Modern Daggerbuild (from main):**
- Latest CLI framework (github.com/urfave/cli/v3)
- External infrastructure fixes (musl.cc → dl.grafana.com/ci)
- Complete pkg/build/ system with all enhancements
- Updated dependencies and architecture improvements
**Stable E2E Infrastructure (pre-Playwright):**
- pkg/build/e2e/service.go: Reverted to version before commit b6580ccb103942d3ea26c52fac320810aa93fa1e
- pkg/build/a11y/: Reverted to stable version compatible with existing infrastructure
- Removed experimental pkg/build/e2e-playwright/ system
- Removed experimental e2e-playwright/ test infrastructure
**Why This Approach:**
- GitHub Actions workflows call 'go run ./pkg/build/e2e' (modern system)
- Modern system now expects only standard e2e/ directory (compatible)
- Release branches have standard e2e/ infrastructure (dashboards-suite, various-suite, etc.)
- Eliminates dependency on experimental Playwright infrastructure
**Key Dependencies Met:**
- e2e/pa11yci.conf.js: Added for a11y test compatibility
- /src/e2e directory: Standard directory structure (no e2e-playwright needed)
- Existing test plugins: Uses stable e2e/test-plugins/
**Result:**
Best of both worlds - modern, reliable daggerbuild infrastructure with
proven E2E testing that works across all release branches without
requiring experimental dependencies.
* Fix: Remove unused embed.go file causing golangci-lint failure
- Removes pkg/build/daggerbuild/msi/embed.go with unused embed.FS variable
- MSI build process uses directory mounting instead of embedded filesystem
- Resolves 'var resources is unused (unused)' linting error
* Fix: Update Node.js version to match working E2E configuration
- Changes from v22.11.0 to v22.16.0 to match commit 17952d45e4e406ca7c6f5f441e4ce3ca9d20982a
- Working commit had all E2E tests passing with same daggerbuild infrastructure
- Node.js version differences can affect frontend builds and UI rendering
- Ensures consistent environment between working reference and current branch
* Fix: Use conditional container base for E2E compatibility
- Alpine for OSS tests (better old arch dashboardScene=false compatibility)
- Ubuntu for Enterprise tests (when image renderer needed)
- Restores original release-12.0.3 Alpine behavior for OSS
- Should resolve old arch E2E test failures
* Fix: Go fmt formatting for conditional container logic
* Revert: Remove unnecessary Alpine/Ubuntu conditional logic
- Real issue was wrong environment variable name (dashboardScene vs DISABLE_SCENES)
- Keep Ubuntu base (original main branch behavior) for simplicity
- Container base was not the root cause of old arch failures
* Experiment: Copy scripts/ from pre-Playwright commit (ea0ddb3fc95)
- Copied scripts directory from commit ea0ddb3fc95 (just before Playwright migration)
- This overwrites some CI migration fixes but testing if it's actually needed
- Can revert back to b9b4602dbd5 if CI breaks
Test commit to see real impact on GitHub Actions workflows.
* trigger ci 01
* Fix: Copy .drone.star from main to match scripts structure
- Resolves Starlark evaluation error for missing integration_test_pipelines
- Aligns .drone.star with main branch scripts structure
- Same fix applied to both OSS and Enterprise repositories
* make drone
* Fix ARM/v7 Docker build failures by using dagger run for cross-compilation
- Change artifacts_cmd() in scripts/drone/steps/rgm.star to use 'dagger run go run' instead of 'go run'
- Add --max-execution-steps 100000 to make drone target in Makefile to properly regenerate .drone.yml
- This fixes CGO cross-compilation issues with SQLite for ARM/v7 Docker builds
- Matches the approach already used successfully in Enterprise builds
* Fix Docker base image references in rgm build steps
- Change from symbolic names (alpine-base, ubuntu-base) to actual Docker images
- alpine-base → alpine:3.21.3
- ubuntu-base → ubuntu:22.04
- Add ubuntu and alpine parameters to rgm_artifacts_step and rgm_build_docker_step functions
- Fixes Docker pull errors: 'repository does not exist or may require authorization'
- Aligns OSS configuration with Enterprise approach
---------
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2025-07-18 23:14:14 +08:00
|
|
|
"--build-id=$${DRONE_BUILD_NUMBER} " +
|
|
|
|
|
"--version=$${VERSION}",
|
|
|
|
|
], dagger_version),
|
2024-01-11 23:22:14 +08:00
|
|
|
"environment": rgm_env_secrets(env),
|
|
|
|
|
# The docker socket is a requirement for running dagger programs
|
|
|
|
|
# In the future we should find a way to use dagger without mounting the docker socket.
|
2024-11-21 23:08:02 +08:00
|
|
|
"volumes": [{"name": "docker", "path": "/var/run/docker.sock"}] + github_app_step_volumes(),
|
2024-01-11 23:22:14 +08:00
|
|
|
}
|
|
|
|
|
|
2024-11-21 23:08:02 +08:00
|
|
|
generate_token_step = github_app_generate_token_step()
|
2024-01-11 23:22:14 +08:00
|
|
|
publish_step = rgm_copy("dist/*", "$${UPLOAD_TO}")
|
2024-11-21 23:08:02 +08:00
|
|
|
build_step["depends_on"] = [
|
|
|
|
|
generate_token_step["name"],
|
|
|
|
|
]
|
2025-02-25 02:36:13 +08:00
|
|
|
|
|
|
|
|
publish_step["depends_on"] = [
|
|
|
|
|
build_step["name"],
|
|
|
|
|
]
|
|
|
|
|
|
2024-01-11 23:22:14 +08:00
|
|
|
steps = [
|
2024-11-21 23:08:02 +08:00
|
|
|
generate_token_step,
|
2024-01-11 23:22:14 +08:00
|
|
|
build_step,
|
|
|
|
|
publish_step,
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
pipeline(
|
|
|
|
|
name = "rgm-promotion",
|
|
|
|
|
trigger = promotion_trigger,
|
|
|
|
|
steps = steps,
|
2025-02-25 02:36:13 +08:00
|
|
|
volumes = github_app_step_volumes() + github_app_pipeline_volumes(),
|
2024-01-11 23:22:14 +08:00
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
|
2023-10-05 00:55:43 +08:00
|
|
|
def rgm():
|
|
|
|
|
return (
|
|
|
|
|
rgm_main_pipeline() +
|
|
|
|
|
rgm_tag_pipeline() +
|
|
|
|
|
rgm_version_branch_pipeline() +
|
2024-01-11 23:22:14 +08:00
|
|
|
rgm_nightly_pipeline() +
|
|
|
|
|
rgm_promotion_pipeline()
|
2023-10-05 00:55:43 +08:00
|
|
|
)
|