* Levitate: Pin dev dep and group workflow scripts
- Move all levitate scripts to .github/workflows/scripts/levitate/
- Pin @grafana/levitate to 0.17.2 (was npm exec @latest)
- Use yarn exec levitate so CI uses the version in yarn.lock
* chore: testing some breaking changes
* chore: testing levitate changes
* chore: testing levitate changes
* chore: revert all tests
* Chore: Upgrade to Go 1.26.3
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* trigger ci
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* fix: never include enterprise imports
The imports only need to exist for tooling's sake. It doesn't actually help the binary at all: the code that actually needs it will import it already, and thus bring it into the binary. This means we can persist all the import usage locations' build tags and similar by simply never using the actual imports files in OSS.
* fix: include Grafana imports as well
In some cases, Grafana Enterprise depends on code from apps in Grafana.
This means we need to keep imports from Grafana as well, otherwise go.mod will be inconsistent depending on whether you
have Enterprise linked.
* fix: module is now fully tidy
* fix: update enterprise_imports
* fix: make update-workspace
* fix: own the code
* fix: update CI check to check for enterprise imports
* fix: own dependencies
* bump promlib v0.0.11 and fix other dependency issues along the way
* remove memcache pin and run make update-workspace
* fix compile errors
* pin apimachinery to v0.35.3
* make update-workspace
* run gofmt
* proper tidy each module + bump azure
* also need to bump tempo
* fix test
* fix tempo test
* handle omitzero since labels became a new type
* more fixes to tests and linter
* fix conflicts
* merge main
---------
Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
The DES (Developer Enablement Squad) and GBS (Grafana Backend Services Squad)
teams merged months ago. This updates CODEOWNERS, go.mod annotations,
the security-patch workflow comment, and modowners docs to reflect
grafana-backend-services-squad as the owner.
No functional change. The DES and release-guild GitHub teams still exist
as fallback during the broader cleanup.
* build(webpack): add tsconfig.json for Node strip-types compliance
* build(webpack): extract shared esbuild options to esbuild.ts
* build(webpack): add package.json to declare ESM module type
* build(webpack): convert sass.rule to TypeScript
* build(webpack): convert CorsWorkerPlugin to TypeScript
* build(webpack): convert FeatureFlaggedSriPlugin to TypeScript
* build(webpack): convert webpack.common to TypeScript, add theme entries
* build(webpack): convert webpack.dev to TypeScript, remove esbuild duplication
* build(webpack): convert webpack.prod to TypeScript, remove esbuild duplication
* build(webpack): fix TypeScript types in webpack.prod transform callback
* build(webpack): convert webpack.stats to TypeScript
* build(webpack): update scripts to use TypeScript webpack configs
* build(webpack): simplify env-util to use import.meta.dirname directly
* build(webpack): tidy up plugins
* build(webpack): move rules for ts and sass into single module
* build(webpack): consolidate shared config into common, move splitChunks to prod
- Move MiniCssExtractPlugin, esbuildRule and sassRule into common so both
dev and prod configs share them without duplication
- Move splitChunks/runtimeChunk optimisation to webpack.prod only (not
needed in dev)
- Use require() for SubresourceIntegrityPlugin to work around broken ESM
build (waysact/webpack-subresource-integrity#236)
- Refactor conditional plugin logic in dev from ternary to if-blocks
* build(webpack): remove dead import and clarify webpack destructure pattern
- Remove unused MiniCssExtractPlugin import from webpack.prod (moved to common)
- Add comment explaining why DefinePlugin/EnvironmentPlugin are destructured
from the default webpack import rather than using named ESM imports
* style(webpack): reorder consts
* chore(env-util): fix up env-util and webpack configs so tests continue to run
* refactor(env-util): accept grafanaRoot param instead of relying on __dirname
Removes the global.__dirname mutation hack in webpack.common.ts by making
the grafana root path an explicit argument to getEnvConfig. Each caller
resolves its own root and passes it in, removing the implicit path-depth
contract and the CJS/ESM compatibility workaround.
* build(webpack): remove unused angular chunk group
* refactor(frontend): rename assetSriChecks and generate go
* feat(frontend-service): pass sri checks feature flag to frontend html template
* feat(backend): pass asset sri check feature flag to st frontend template
* build(webpack): use global __grafanaAssetSriChecksEnabled var to control sri checks in async loading
* chore(frontend-service): add assetSriChecks to goff-flags.yaml
* docs(webpack): add more info on what and why to featureflaggedsriplugin
The migration from husky to lefthook happened in #66608 almost 3 years
ago. The .husky directory and cleanup scripts were kept as a temporary
transitional aid but have outlived their purpose.
Additionally, Claude Code's --worktree mode has a bug
(anthropics/claude-code#27474) that sets core.hooksPath to .husky on
every session startup, causing a spurious "Pre-commit hooks are now
opt-in" warning on every commit for anyone using Claude Code worktrees.
Removing these files eliminates that issue and cleans up dead code.
* Build: Upgrade TypeScript to 6.0 beta
Update typescript from 5.9.2 to 6.0.0-beta across all packages. Configure tsconfig to handle TS 6.0 breaking changes: add `ignoreDeprecations: "6.0"` to suppress warnings for deprecated options, disable `noUncheckedSideEffectImports` to allow CSS side-effect imports, explicitly configure `types` field since TS 6.0 no longer auto-includes all @types packages, set appropriate `rootDir` in packages that include files outside their directory, and update `@ts-ignore` comment placement in Table utils to match where TS 6.0 now reports the type error.
All typecheck tests pass with 0 errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add explicit rootDir to root tsconfig for ts-jest compatibility
TS 6.0 requires rootDir to be explicitly set when it differs from the
inferred common source directory. Without this, ts-jest fails with
TS5011 when running unit tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix package builds: add rootDir and jquery types for TS 6.0
TS 6.0 requires explicit rootDir in tsconfigs that emit output. Add
rootDir to all package build configs that were missing it. Also add
jquery to the base types array since @types/jquery is no longer
auto-included.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix TS 6.0 errors in e2e and plugin tsconfigs
- e2e/tsconfig.json: Add moduleResolution: "bundler" to fix TS5098
(customConditions requires bundler/node16/nodenext moduleResolution)
- packages/grafana-plugin-configs/tsconfig.json: Add ignoreDeprecations: "6.0"
to fix TS5101 (downlevelIteration deprecated) inherited from @grafana/tsconfig,
cascading to all 15 datasource plugins and 3 e2e-playwright test plugins
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix package build output: use rootDir: "./src" instead of "."
rootDir: "." caused type declarations to emit to dist/types/src/
instead of dist/types/, breaking the published package types paths.
Using rootDir: "./src" preserves the correct output structure while
satisfying TS 6.0's requirement for an explicit rootDir.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Align TS 6.0 changes with tsgo PR (#114643)
- Remove baseUrl in favor of path mapping ("*": ["./public/*"])
- Add rootDir: "./src" to grafana-sql and grafana-test-utils tsconfigs
- Add explicit Size type annotations to AutoSizer callbacks
- Add explicit type params to MultiSelect<string> in LokiContextUi
- Update @ts-ignore comments for TS5/TS6/TS7 compatibility
- Switch JS files to @ts-nocheck (eslint.config.js, env-util.js)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Build: Upgrade TypeScript from 6.0.0-beta to 6.0.1-rc
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Build: Upgrade TypeScript from 6.0.1-rc to 6.0.2 stable
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix o11y-ds-frontend package build: add rootDir to build config
Same fix as other packages — the build config was inheriting
rootDir: "../../" from tsconfig.json, causing type declarations
to emit to the wrong path.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* build(frontend-service): update webpack and ts configs for boot script
* feat(frontend): add types to window for boot/index.ts
* feat(frontend-service): copy JS from index.html to boot/index.ts, add types and refactor guards
* chore(codeowners): add public/boot
* chore(frontend-service): copy boot.js into dockerfile for dev
* docs(boot): add a readme to briefly explain the purpose
* feat(splash-screen): enable splashScreen flag by default for OSS
* Splash Screen: Update copy, use theme tokens for accent colors, add hero images
- Replace hardcoded hex accent colors with theme tokens (visualization/semantic)
- Update copy for all 4 slides with new titles, subtitles, and bullets
- Rename library and explore slides to dynamic-dashboards and library-of-things
- Add hero images for git-sync and library-of-things slides
- Remove ai-sparkle icon from assistant badge, move it to the slide icon
- Reset version to 13.0.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Revert "Splash Screen: Update copy, use theme tokens for accent colors, add hero images"
This reverts commit a574e5a428.
* disable ff for e2e tests
---------
Co-authored-by: mary-sitzenstatter <mary.sitzenstatter@grafana.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* add ubuntu and alpine specific targets instead of bash if statements; use make instead of dagger for docker builds
* fix docker build and grafana-rpi name
* fix artifact paths
* fix workflow
* dont dockerignore dist/tar.gz
* fix verify
* Add build-deb and build-rpm
* Use make build-deb and rpm in release-build
* add setup-fpm action
* specify specific ruby version
* set GEM_HOME
* rpm and deb in parallel on io runner
* run deb and rpm in parallel
* fix package name
* use zstd compresion; hopefully faster?
* fix compression and make -j2
* Parameterize license
* Add missing CODEOWNERS entries
* Add compare targz builds
* fix actionlint and zizmor errors
* More parity between the two
* dont print file contents, sheesh
* use better runners for these
* Add missing conf & data directories
* bundled plugins
* Update Makefile
* fix scripts
* fix download catalog plugins script
* improve the comparison logic because build hashes are different between dagger (docker) and github host
* Fix comparison and missing dir
* Update CODEOWNERS
* Use self-hosted runner on build-go-matrix
* add build-targz Makefile target, and make the Makefile more idiomatic
* build-go depends on generated themes file, not on phony target
* update script doc
* Update CODEOWNERS
* Run make build-go matrix if the Makefile changed
* dont-set-arch-in-run-schema-v2
* Skip flaky encryption test
* Update Makefile
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Preserve removing trimpath if GO_BUILD_DEV=1
* It's OS and ARCH
* Fix e2e path
* remove t.skip
* Support GOOS/GOARCH env variables, which can be overridden by OS and ARCH makefile vars
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* remove grafana-cli and grafana-server and update references
* remove circle-ci scripts
* Remove circle-\* from CODEOWNERS
* copy grafana wrapper script to /sbin on deb installs
* call grafana wrapper from grafana-cli and grafana-server wrappers
* Update packaging/wrappers to use grafana instead of grafana-cli and grafana-server
* Apply suggestions from code review
Co-authored-by: Dave Henderson <dhenderson@gmail.com>
---------
Co-authored-by: Dave Henderson <dhenderson@gmail.com>