Resolves enterprise build failures caused by dependency cascade requiring Go 1.24.5.
Updates all workspace modules and build configuration for consistency.
- Update go.work, go.mod, and 29 workspace modules from Go 1.24.4 to Go 1.24.5
- Update Dockerfile: golang:1.24.4-alpine → golang:1.24.5-alpine
- Update Makefile and drone variables to Go 1.24.5
- Aligns with main branch (commit 52f6104230)
- Prevents GOTOOLCHAIN=local build failures in CI environments
- Tested: go mod tidy, workspace sync, and enterprise builds all work
Fixes issue where enterprise drone builds failed with:
'go: go.work requires go >= 1.24.5 (running go 1.24.4; GOTOOLCHAIN=local)'
Related to release-12.0.3 tagging requirements.
* baldm0mma/ fix deps
* Fix: Restore external dependencies for external consumers while preserving local development
- Add back external grafana module dependencies needed for external consumers
- Keep replace directives to ensure local development uses workspace modules
- Restore storage package external dependencies in main go.mod and apistore go.mod
- Update workspace synchronization to handle hybrid dependency approach
This enables both:
- External consumers: can import grafana modules at release tags (v12.0.3)
- Local development: uses workspace modules via replace directives
Fixes CI workspace validation while maintaining go mod tidy and build functionality.
* Fix: Move promlib and semconv to external consumer section
- promlib and semconv belong in the commented section for external consumers
- These dependencies are specifically mentioned as needed for external projects
- Maintains proper organization between regular deps and external consumer deps
* baldm0mma/ add bash to dagger download and github app pipeline volumes
* baldm0mma/ run drone starlark convert
* baldm0mma/ run make drone
* Add docstring and fix formatting for rgm_tag function
- Add proper docstring to rgm_tag() function per Starlark linting requirements
- Fix formatting with buildifier
- Resolves pr-verify-starlark linting issues
* 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 b6580ccb10
- 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 17952d45e4
- 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 (ea0ddb3fc9)
- Copied scripts directory from commit ea0ddb3fc9 (just before Playwright migration)
- This overwrites some CI migration fixes but testing if it's actually needed
- Can revert back to b9b4602dbd 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>
Docs: Updated the Graphite data source docs (#105426)
* initial edits
* edits to config doc
* query editor updates
* ran prettier
* updates
* made more updates
* final edits
* ran prettier, updated some descriptions
* a few more quick edits
* one more definition
(cherry picked from commit dec2df8379)
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
IAM: Return 401 if identity type is not valid in GetUserPreferences (#107760)
fix(GetUserPreferences): Return 401 if identity type is not valid
(cherry picked from commit e4743a9092)
Unified storage: Respect GF_DATABASE_URL override (#105331)
* Database for unified storage resources now reuses DB code that respects URL override.
Access instrument_queries via section getter.
(cherry picked from commit 041c343a86)
Graphite: Fix recursion (#106983)
* Fix for repeated row variables
* Add unit tests
* Do not recursively replace queries that self-reference
---------
(cherry picked from commit 7135832fff)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Graphite: Fix date mutation (#107414)
* Fix date mutation
- Add unit test
- Improve types
* Add invalid test and minor cleanup
* Review
(cherry picked from commit a01b1536f9)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
docs(alerting): clarify usage of different Alertmanagers and fix misleading details (#107498)
* docs(alerting): clarify usage of different Alertmanagers and fix misleading details
* address review changes
(cherry picked from commit 61efc8b609)
Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
* docs(alerting): Add `Detect missing series in Prometheus` section to the MissingData guide (#107329)
(cherry picked from commit 2f1a6ae171)
* fix ref link
InfluxDB: Fix regex for finding regexes in frontend code (#105194)
When interpolating variables in the frontend, we want to be sure to
escape special characters if the variable is used in a regex.
We used a regex to find regexes in raw queries, which contained a bug.
The regex treated any `/` character as the start of a regex. However,
InfluxQL (and most sql dialects) support using `/` as a division
operator.
This PR adds a check for `=~` or `!~` immediately preceding `/` as the
beginning of a regex, as per the InfluxQL spec for regexes:
https://docs.influxdata.com/influxdb/v2/reference/syntax/influxql/spec/#regular-expressions
Fixes https://github.com/grafana/support-escalations/issues/16219
(cherry picked from commit 8f4b2bbece)
Co-authored-by: beejeebus <justin.randell@grafana.com>
* Alerting: Resend alerts for states that are missing in the eval results (#105965)
What is this feature?
This PR fixes the MissingSeriesEvalsToResolve behavior when it's set to more than 4 evaluation intervals.
Why do we need this feature?
The MissingSeriesEvalsToResolve setting was not working correctly due to alerts being auto-resolved by Alertmanager after 4 evaluation intervals (via the endsAt field).
Before we had deleteStaleStatesFromCache method that was returning only stale states that had to be resolved. Non-stale states for which the current evaluation does not have a series never had endsAt updated and were never resend to the Alertmanager, so they were automatically resolved after 4 evaluations regardless of the setting.
The new processMissingSeriesStates returns state for each missing series on every evaluation, and resolves the stale ones. This guarantees that alerts without series still alert for the configured number of evaluations.
* Remove FiredAt field
Docs: Adding info on allowlisting IPs for the Cloud Migration Assistant (#106447)
* Docs: Adding info on allowlisting IPs for the Cloud Migration Assistant
* adjusting the wording
(cherry picked from commit 7cdd4470c6)
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
Docs: Document `remote_cache` is only used if a remote database is used (#104779)
* Document `remote_cache` is only used if a remote database is used
* Update _index.md
---------
(cherry picked from commit 19a65a4865)
Co-authored-by: Mathias Petermann <mathias.petermann@gmail.com>
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
FlameGraph: Fix bug for function names that conflict with JavaScript object prototype properties (#106338)
* grafana-flamegraph: Fix bug for function names that conflict with JavaScript object prototype properties
The bug occurs in the flamegraph data transformation logic where function names from profiling data are used as object
keys without proper prototype pollution protection.
Fixes#106232#101551
* Fix top table calculations
---------
(cherry picked from commit 6156e9c2d8)
Co-authored-by: Christian Simon <simon@swine.de>
Co-authored-by: vinayteki95 <vinayteki95@users.noreply.github.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Profiles: Stop passing response headers for Grafana-Pyroscope and parca datasources (#106577)
* Revert "pkgs/tsdb/[grafana-pyroscope-datasource|parca]: Fix use of request headers in responses"
This reverts commit 8bac68e906.
* Profiles: Stop passing request/response headers to the backend
(cherry picked from commit 8fdf86e56f)
(cherry picked from commit 7878815ffc)
Provisioning: Move OSS provisioning to Run step (#105428)
* Provisioning: Move OSS provisioning to Run step
---------
(cherry picked from commit 1435eedbc4)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: maicon <maiconscosta@gmail.com>
Run Init Provisioners at Server Initialization (#105080)
* Run Init Provisioners at Server Initialization
---------
(cherry picked from commit 82bbbf1a98)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: maicon <maiconscosta@gmail.com>
* Geomap: Require layer to have data for legend (#105580)
(cherry picked from commit 16a6d61ca7)
* Remove test for non-existent function
* Remove unused import
Docs: adding information on adjusting short link expiration time in Grafana cloud (#106112)
* Docs: adding information on adjusting short link expiration time in Grafana cloud
* changing admonition and adding info on changing config for cloud
* adjusting wording
* fixing typo
* Update docs/sources/setup-grafana/configure-grafana/_index.md
---------
(cherry picked from commit f02ad33fd2)
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
CloudMigrations: Omit autoincremented id for alert snapshots (#106598)
If you tried to migrate alerts from two differente sources/on-prem instances,
the autoincremented numeric id would be the same, and since we were creating
the resource in cloud with that same id (the API accepts it), it would
return an error "conflicting alert rule found" because that id is the primary key on the table.
We simply omit the numeric id now and let the API for the cloud instance generate it.
(cherry picked from commit a1f2693fd8)
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Docs: Remove the Feature Toggles administration docs page (#106455)
* Docs: Remove the Feature Toggles administration page
* adding alias to remaining feature toggle page to redirect from deleted page
(cherry picked from commit e9b5ed6d4f)
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
docs(alerting): Add Tutorials directory page under Best Practices (#106159)
* docs(alerting): Add Tutorials directoy page under Best Practices
* run prettier
* Include latest tutorials
* fix tutorial list
(cherry picked from commit 79ff67268f)
Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
Alerting: Provisioning API returns 403 on quota exceeded for rule group PUT (#106409)
(cherry picked from commit 1df888c517)
Co-authored-by: Vadim Stepanov <vstpme@gmail.com>
Removes Feature Management Section (#105766)
Update _index.md
Feature Toggles page has been removed.
Recommending to remove this from our docs
(cherry picked from commit 219461a58d)
Co-authored-by: andrewthomas92 <97256915+andrewthomas92@users.noreply.github.com>
docs(alerting): add a short new guideline for handling NoData scenarios. (#106412)
docs(alerting): add consideration for handling NoData scenarios
(cherry picked from commit 0d0aa35ba7)
Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
Alerting: Fix group-level labels and query_offset in the import API (#106379)
What is this feature?
Fixes a bug when group-level query_offset and labels parameters are ignored and not saved
Why do we need this feature?
In the import API Prometheus YAML rule definitions are supported:
groups:
- name: group-1
interval: 1m
query_offset: 10m
labels:
severity: "warning"
rules:
- alert: Alert 0 > 0
expr: vector(0) > 0
But applying group-level labels and query_offset is broken and they are not saved right now because during the conversion of the API model to PrometheusRuleGroup they aren't saved to the new structure.
(cherry picked from commit f7a52bc04e)
docs(alerting): updates Missing series evaluations to resolve option (#106319)
docs(alerting): correct detailed process of the missingSeriesToEval option
(cherry picked from commit be8d153dc3)
Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
docs(alerting): new notification template example: link to a dashboard with time range (#106254)
* docs(alerting): new notification template example: link to a dashboard with time range
* remind configuring the `MyDashboardURL` annotation
* Update docs/sources/alerting/configure-notifications/template-notifications/examples.md
---------
(cherry picked from commit f36d5c5206)
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
docs(alerting): updates link to outdated tutorial (#106178)
* docs(alerting): remove admonition to an outdated tutorial
* amended note and link to new tutorial
* link
* minor copy changes
* run prettier
* update copy
---------
(cherry picked from commit cce28ec351)
Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
Co-authored-by: tonypowa <tonypowa@gmail.com>
docs(alerting): add notes for Redis HA setup (#106144)
* docs(alerting): add note for Redis HA setup
* run prettier
(cherry picked from commit b2d317cc23)
Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
docs(alerting): OpsGenie instructions for other alertmanagers (#106049)
* docs(alerting): OpsGenie instructions for other alertmanagers
* run prettier
(cherry picked from commit 8de013c7e6)
Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
Alerting: Fix $value type when single data source is queried (#106080)
(cherry picked from commit faeddf334a)
Co-authored-by: Alexander Akhmetov <me@alx.cx>
Docs: Clarifying information about using the API for license renewal (#105879)
Docs: Clarifying information about using the API for licnese renewal
(cherry picked from commit 73e971eedc)
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
NestedFolderPicker: Fix scroll jumps back to top (#105567)
refactor selector to output a stable value
(cherry picked from commit 43e2bf5e38)
Co-authored-by: Luminessa Starlight <git@samsch.org>
Geomap: Fix marker layer for line string features (#103937)
* Geomap: Fix marker layer for line string features
* Update layer stack to handle line strings
(cherry picked from commit feb1ac5ba7)
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
* docs: edits for alerting learning content (#105500)
* docs: edits for alerting learning content
edits for alerting learning content
* vale'd
* left nav change
* final adjustments
link fixes and the like
* Update _index.md
(cherry picked from commit bf87c6f774)
* docs: edits for alerting learning content (#105500)
* docs: edits for alerting learning content
edits for alerting learning content
* vale'd
* left nav change
* final adjustments
link fixes and the like
* Update _index.md
(cherry picked from commit bf87c6f774)
* docs: edits for alerting learning content (#105500)
* docs: edits for alerting learning content
edits for alerting learning content
* vale'd
* left nav change
* final adjustments
link fixes and the like
* Update _index.md
(cherry picked from commit bf87c6f774)
Preferences: Disable the save button whilst saving preferences (#105605)
* disable the save button whilst saving preferences
* use .finally to always reset state of submit button
* fix unit tests
(cherry picked from commit 98c9bc5028)
Themes: Prevent duplicated API call in drawer (#105602)
refactor to separate component, stop propagating radio button event + unit test
(cherry picked from commit 808b371225)
* Dependencies: Bump github.com/getkin/kin-openapi from v0.131.0 to v0.132.0
* Dependencies: Bump github.com/openfga/openfga from v1.8.6 to v1.8.12
* Dependencies: Bump golang.org/x to latest
docs(alerting): MissingSeriesEvalsToResolve and New `Stale alert instances` docs page (#105415)
* docs(alerting): New `Stale alert instances` docs page and document the `Missing series evaluations to resolve` option.
* update meta description
(cherry picked from commit bb04b9c55b)
docs(alerting): Add two common examples in `Learn` section (#105325)
* docs(alerting): Add two common examples in `Learn` section
* Update docs/sources/alerting/learn/examples/multi-dimensional-alerts.md
* Update docs/sources/alerting/learn/examples/multi-dimensional-alerts.md
* mention `summary` annotation in multi-dimensional alerts example
* Remove note about alert grouping
* minor edits to section: `Differences with time series`
* minor grammar change
---------
(cherry picked from commit 4ae91715df)
Co-authored-by: Johnny Kartheiser <140559259+JohnnyK-Grafana@users.noreply.github.com>
* Dependencies: Unpin and bump github.com/getkin/kin-openapi from v0.126.0 to v0.132.0
* Chore: Update schemas and remove examples
* Chore: Update schemas and remove examples2
Prometheus: Move to new annotation support as the old one is deprecated (#104578)
* remove deprecated annotation support and introduce the new one
* create annotations.test.ts
* convert the old annotations to new format
* don't override query if it has necessary fields
* a better implementation
* remove comment
* fix
* fix react errors
* unit tests for annotation query editor
* two more tests
(cherry picked from commit 9156149960)
docs(alerting): fix broken links due to using shared md files (#105195)
* docs(alerting): fix broken links due to using shared md files
* fix prettier errors
* fix aliased links
(cherry picked from commit a1b1de584c)
docs(alerting): Add a note about sequential evaluation (#104224)
* docs(alerting): Add a note about sequential evaluation
* Update docs
(cherry picked from commit 42028a1b03)
docs(alerting): clarify recovery threshold for pending state (#102780)
Alerting docs: clarify recovery threshold on pending state
(cherry picked from commit 536ff2fc3d)
TableNG: Filter and sort sub tables (#104327)
* feat: filter and sort sub tables
* chore: extract row processing into it's own function for filtering and sorting
---------
(cherry picked from commit 2c1851e8c8)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Dashboard: Fix Panel Explore link subpath duplication (#104952)
* Stop appending subpath in onNavigateToExplore function old-arch
* we are using assureBaseUrl inside getExploreUrl function
* adjust test to ensure subPath is not added to the url
* fix linting
(cherry picked from commit c594faa64e)
Prometheus: Fix semver import path (#104756)
chore(prometheus): import from semver so consumers builds dont break with esm
(cherry picked from commit 90f628abff)
TableNG: Use correct row index for background colour calculation (#104426)
* chore: row index is source index so just use that
* chore: fix better cause why not
---------
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: Sven Grossmann <svennergr@gmail.com>
Dashboard: SchemaV2 Fix Import mapping datasource (#104200)
* Dashboard: SchemaV2 Fix mapping ds for variables and annotations
* process annotations and vars ds inputs so they can be selected
* clean up so async works
* Add basic unit test for v2 dashboards mapping
* clean up tests
* linting
---------
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
DataLinks: Long link title wrapping (#104169)
chore(data-links): link text wrap
(cherry picked from commit 8cee546d67)
Co-authored-by: Ihor Yeromin <yeryomin.igor@gmail.com>
Alerting: Ensure field validators return the proper type (#104050)
* Ensure field validators return the proper type
This ensures correct error propagation through services up to
the API layer.
* Move error wrapping up to call site
(cherry picked from commit 820c338414)
Co-authored-by: William Wernert <william.wernert@grafana.com>
Docs: Remove mention of alertingApiServer flag from alerting documentation (#104131)
(cherry picked from commit 1bafd5c807)
# Conflicts:
# docs/sources/alerting/set-up/configure-rbac/_index.md
Transformations: Remove deprecated ui element and wrap pills (#104143)
* Remove deprecated ui element and wrap pills
* Fix for labels to fields too
* Update betterer
(cherry picked from commit 57fd67436e)
Co-authored-by: Kristina <kristina.durivage@grafana.com>
Provisioning: Add banner with more feature info (#104111)
* Provisioning: Add experimental feature banner
* translations
(cherry picked from commit d85d730d9c)
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
What is this feature?
Send resolved notifications not only when an alert state becomes stale (series is missing) and transitions from Alerting to Normal, but also from Error, NoData and Recovering.
Why do we need this feature?
Previously, when an alert state became stale or was deleted, it would transition to Normal but wouldn't trigger resolved notifications to the Alertmanager. This meant we relied on the Alertmanager to send resolved notifications when the alert expires. However, if the Alertmanager state is lost, these resolved notifications would never be sent, leaving users with firing alerts in their notification channels. This PR ensures that any transition from a firing state (Alerting, Error, NoData, Recovering) to Normal triggers a resolved notification.
This adds more checks on the type of errors returned from InfluxDB
fsql datasource queries. The Grpc error code `Unavailable` is mapped
to a downstream error source.
* Remove POST config for Grafana Alertmanager
* Delete auth + test for removed path
* Alerting: Remove check for `alertingApiServer` toggle in UI (#103805)
* Remove check for alertingApiServer in UI
* Update tests to no longer care about alertingApiServer
* Add contact points handlers now that we use alertingApiServer all the time
* Fix test broken from removing camelCase for UIDs
---------
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
* Activate schema validation and align underlying systems
* update to save as v0 if not the right schema version
* Resolve merge conflicts
* Move RequireApiErrorStatus to tests package
* Add mutation tests
* Fix lint
* Only do min version check if dashboard is v1
* Fix lint and disable provisioning test
* Revert provisioning changes
* Revert more tests and add schema test
* Reran gen
* SQL Dashboard save
* Adjust APIVERSION
* Fixed mutation test
* Add logging on downgrade
---------
Co-authored-by: Marco de Abreu <18629099+marcoabreu@users.noreply.github.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* wip
* fix the async bug
* Fix tests
* support library panels
* Update comment
* clean up
* refactor, use multi resource kind
* uncomment
* return only the spec
* simplify templateizing logic
* update dashboardkind
* revert imprtable requirements to use the current interface
* tests and fixes
* add panel configs to required; more tests;
* everything in elements should be processed
* clean up
* clean up
* rename for clarity; clean up tests
* export resource v spec
* i18n
* clean unused
* fix library panels
* revert comments
* revert lefthook.rc
* don't support lib panels
* another lefhook revert
* remove lib panel in test
* Remove library panels on external export; show warning if dash contains library panels
* fix tests
* Support old export mode
* clean up
* rely on dash shape vs feature toggle, add spacing to alert, update message
* lint
* typo fix
* make makeExportable part of dashboard serializer; clean up old exporter
* clean up
* more cleanup
* gem file cleanup
* remove unused function
* remove unused selector
* don't remove ds refs that use ds template variable
* clean up
* Dashboards: SchemaV2 - Fix stateless queries for mixed ds
* Add uni test for new utils function
* Add extra condition to validate we have datasources configured in the grafanaBootData
* Refactor code
* remove unnecessary test
* Template editor syntax highlighting when preview is json-like
* Add new template editor language examples, snippets, and functions
* Use updated NewTemplate function
* Add new fields to webhook notifier
- CustomPayload
- ExtraHeaders
* Documentation
* Update grafana/alerting to in-progress PR (needs updating after merge)
* Fix integration test
* Remove docs reference to .Extra template context
No longer exists, was part of a previous iteration
* make update-workspace
* Update grafana/alerting to actual merged commit
* docs: add documentation for keep_firing_for and Recovering state
add documentation for keep_firing_for and Recovering state
* updated image, added procedure step, added new state info
updated image, added procedure step, added new state info
* vale'd
* Update docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md
Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
* edits with gratitude to pepe
* impage update
image
---------
Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
* run e2e tests as a matrix
* add old-suite/
* remove old-arch input
* run without quotes
* Update codeowners
* remove e2e-suite-various from codeowners
* ?
* role based fallback
* disable permissions cache with provisioning
* fallback to role based
* test with editor (not admin)
* test with editor (not admin)
* fix imports
* lint
* editor can create folders
* alerting docs: update alert rules history limit documentation
the documentation for the alert rules version history has been updatedto specify that the rules apply to enterprise/OSS customers.
the rules should also be explicated for cloud documentation.
* Update view-alert-rules.md
API Changes:
- Fixes validation in template CRUD API to be closer to how the running
alertmanager will use the template. Should remove some incorrect
validation errors.
- Adds some missing default placeholder labels to receiver testing that
are used during template testing but missing during receiver testing
Template Preview:
- Replaced basic preview with a readonly CodeEditor for better whitespace
and alignment clarity (also adds support for future syntax highlighting
in template previews for upcoming webhook payload templates)
Template Selector (Receiver Form):
- Refactored to use same components as Template editor for preview.
- Fixed preview to work with multi-definition templates
- Fixed copy to correctly copy the template contents instead of
{{ template "<name>" . }}.
Template Editor:
- Fixed detection of when to display functions vs snippets in multi-line
expressions
* Implement basic behavior of stateless annotation
* Fix ds defined getting lost
* Fix linter
* adjust test to be aligned with datasources not automatically being assigned to the model
* Add unit test for annotations
---------
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* switch to useLayoutEffect so queries run after url correction
* add comment
* suparate useEffects to avoid update on slug change
* add url correction for missing slug
* account for slug change during dashboard rename
* simplify fix
* add e2e test for data link without slug
* remove old comment
* remove newly added path from useEffect dependencies
* Move filtering code to generators for performance reasons
Discarding rules and groups early in the iterable chain limits the number of promises we need to wait for which improves performance significantly
* Add error handling for generators
* Add support for data source filter for GMA rules
* search WIP fix
* Fix datasource filter
* Move filtering back to filtered rules hook, use paged groups for improved performance
* Add queriedDatasources field to grafana managed rules and update filtering logic to rely on it
- Introduced a new field `queriedDatasources` in the AlertingRule struct to track data sources used in rules.
- Updated the Prometheus API to populate `queriedDatasources` when creating alerting rules.
- Modified filtering logic in the ruleFilter function to utilize the new `queriedDatasources` field for improved data source matching.
- Adjusted related tests to reflect changes in rule structure and filtering behavior.
* Add FilterView performance logging
* Improve GMA Prometheus types, rename queried datasources property
* Use custom generator helpers for flattening and filtering rule groups
* Fix lint errors, add missing translations
* Revert test condition
* Refactor api prom changes
* Fix lint errors
* Update backend tests
* Refactor rule list components to improve error handling and data source management
- Enhanced error handling in FilterViewResults by logging errors before returning an empty iterable.
- Simplified conditional rendering in GrafanaRuleLoader for better readability.
- Updated data source handling in PaginatedDataSourceLoader and PaginatedGrafanaLoader to use new individual rule group generator.
- Renamed toPageless function to toIndividualRuleGroups for clarity in prometheusGroupsGenerator.
- Improved filtering logic in useFilteredRulesIterator to utilize a dedicated function for data source type validation.
- Added isRulesDataSourceType utility function for better data source type checks.
- Removed commented-out code in PromRuleDTOBase for cleaner interface definition.
* Fix abort controller on FilterView
* Improve generators filtering
* fix abort controller
* refactor cancelSearch
* make states exclusive
* Load full page in one loadResultPage call
* Update tests, update translations
* Refactor filter status into separate component
* hoist hook
* Use the new function for supported rules source type
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
This makes it so that it is:
- No longer required to have datasource permissions to delete a rule.
- No longer required to have datasource permissions to update non-query related fields of a rule.
* Add function for retrieving logs table plan
- Add URL builder method
- Add types
* Add auto-switching for basic logs tables
* Set dashboardTime property
* Ensure useEffect doesn't run on every query change
* Fix basicLogs property
* Add isLoading for schema
* wip
* Add prom flavor support for data source variables and export/import dashboards (#103321)
* add dashboard and data source var selection
* use match plugin id instead
* use updated matchpluginid
* formatting
* cleanup
* regex anchor
* update error msg
* Alerting: Clean up prometheus-flavored types and functions (#103703)
* clean up types and utility functions for dealing with
prometheus-flavored data sources
* Refactor alerting datasource types to use constants as source of truth
* Alerting: Clean up prometheus-flavored types and functions on the bac… (#103716)
Alerting: Clean up prometheus-flavored types and functions on the backend
* add matchPluginId tests
* Update matchPluginId func to bidirectional (#103746)
* update matchpluginid func to bidirectional
* lint
* formatting
* use actual isSupportedExternalRulesSourceType in test
* add tests in datasource_srv
* betterer
* remove type assertion
* remove unnecessary case
* use satisifies to not have to convert tuple to an array of string
* add prometheus_flavor test
---------
Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Alexander Akhmetov <me@alx.cx>
* LogLabels: add displayMax property
* MetaInfoText: prevent label wrapping
* LogsMetaRow: remove unescaped content and max characters
* LogsMetaRow: use font weight normal
* LogLabels: add button to collapse back
* LogsMetaRow: set line height
* LogsMetaRow: save common logs state
* LogsMetaRow: update unit tests
* LogLabels: update unit test
* LogListContext: add forceEscape option
* LogListContext: move forceEscape and hasUnescapedContents
* LogListControls: move forceEscape to controls
* LogList: read forceEscape from context
* i18n
* LogListControls: test new control
* Update betterer
* logsModel: update test
* LogLabels: replace characters with icons
* Prettier
* LogLabels: add aria labels
* i18n
* Update tests
* Update test
* detect target folder rules and show warning
* show detected rules in target folder in a collapsed section
* fix detecting rules that might be overwritten
* refactor
* remove undefined
* fix text
* Split in multiple files
* Refactor sync even further
* Move more things between RepositoryResources
* Add status patcher
* Interface for sync functions
* Interface for compare function
* Add syncer back
* Move interfaces
* Move execute complete
* Return currentRef in syncer
* Add repository status test
* Add initial sync tests
* Fix a couple of spots
* Make initial sync tests work
* Fix register.go
* Add initial tests for sync worker
* Finish tests for sync
* Add incremental tests
* Add TODO
* Finish incremental tests
* Move folder creation to full sync
* Move interfaces
* Add initial full sync tests
* Update tests
* Reshape things
* Add changes test
* Fix register
* Add some tests
* Add more tests
* Add test
* WIP
* WIP: delete test
* Add more full test
* More tests
* Add tests for folder creation
* Add folder tests full sync
* Full coverage full sync
* Clean up tests
* Add more tests for changes function
* Enhance tests for Changes function to cover error scenarios and empty paths
- Added test cases for handling empty file paths and folder resources.
- Updated error message formatting in the Compare function for clarity.
* Add unit tests
* Failed initial patch
* Add tests failed repository resources
* Add test failed getting client
* Test for successful and unsuccessful syncs
* Add final tests for worker
* Fix existing tests
* Add missing test
* Fix spelling mistake
* Fix flake in changes test
* change copy configuration
* comma and this token after token creation
* securely migrate and you'll need token
* add caret and modify steps
* period after check failed resources
* learn about migrating v1
* building snapshot reduce text
* right caret connect to a cloud stack
* building snapshot reduce text v2
* make i18n-extract after merge
* CloudMigrations: Enable snapshot resource type configuration
* ConfigureSnapshot: Update resource type order
* ConfigureSnapshot: Add compile-time check for all resource types
* Fix trickier merge conflicts
* E2E: Fix intercept calls to get snapshot results to match new query params for sorting
* ConfigureSnapshot: Break text into newline
* ConfigureSnapshot: Add spacing on resources list
* Chore: Run betterer
* ConfigureSnapshot: Make secondary text bold
* ConfigureSnapshot: Update copy which resources to migrate
* ConfigureSnapshot: Add tooltip near build snapshot button with ETA
* Anonymous access: Allow setting org role in new authz service
* back out change that is not needed; rename struct
* cleanup
* Fix tests
---------
Co-authored-by: Gabriel Mabille <gabriel.mabille@grafana.com>
* test disable metrics reporting
* Show overlay on hidden tabs
* Fix accidental inclusion
* hide overlay when not editing, this can happen if a user navigates to a hidden tab by url
* Fix lint
* Extra confirmation before deleting tab with content
* also confirm rows
* make i18n-extract
* remake how the confirm works
* reset panel menu behavior
* update i18n, fix missing event
* fix lint
* Fix annotations losing queries when saving v1 with dynamic dashboards enabled
* Add extra options property to the DashboardAnnotationQuerySpec to catch all field datasource-specific properties
* Add options to the v2Alpha1 schema and run make gen-apps
* Add unit test and clean up console.logs
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Docs: removing docs debt in install docs
* cleaning up set up docs debt
* fixing some vale errors
* fixing broken admonition shortcode
* fixing broken shortcode
* fixing broken shortcode
* working to the grafana authentication config
* updating some more files
* editing down to ldap in the repo
* editing ldap doc except final section with link needed
* Finishing doc debt cleanup through configure authetication
* fixing shortcodes reverted by merge conflict fix
* fixing admonition
* fixing more broken shortcodes
* adjusting some wordings ot make vale happy
* updating feature toggle info
* Jaeger: Run traceID query through backend with feature toggle enabled
* Reorganize
* Update comments and test
* Fix snapshot test
* Only pass time params if enabled in cofig
* Rename applyVariables to applyTemplateVariables
* Rename transformResponse to transformTraceResponse
* Update comment
* create permissions
* add key
* lint
* structure as a delayed callback
* legacy API hook
* merge main
* wired up
* and folders
* watch repos
* missing return statement
* Set the correct permissions
* add TestAfterCreatePermissionCreator
* do not add perms on folder create
* fix tests
* add annotation on create
* lint
* lint
* ensure we set permissions when the FT is disabled
* remove custom folder_storage
* fix lint
* change default
* lint
* lint
* fix: annotation
* ensure permissions are added on folder legacy
* remove folderstorage again
* fix tests
* add FT
* undo change to folder
* dashboard on create
* remove annotation for folder
* fix tests
* fix prepare after rebase
* fix tests
* fix tests
* fix tests
* lint
* address comments
* add test for prepareObjectForStorage
* add again skipIfMode as per comment
---------
Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
* Add repository resources interface for export worker
* Add mocks for repository resources
* Add unit tests for ExportWorker's IsSupported method
* Add unit tests for ExportWorker's Process method, covering scenarios for missing export settings, write permissions, branch restrictions, and client creation failures.
* Fix unit tests
* Single function
* Add more unit tests
* Add test for failed folder
* Fail export folder errors
* Add another test
* Positive folder export
* Too many folder export errors
* Too many errors on folder export
* Partial folder errors
* Add test for nested folder
* Add test dashboard export
* More cases
* Ignore existing dashboards
* Fix folder tests
* Fix clonable test
* Add clone failure test
* Add test clean up without push
* Working tests
* Use mock clonable
* Add unit tests for IsWriteAllowed
* Add behaviour to cover ref equal to configured branch
* Fix worker test
* Fix linting
* Split clone and push
* Wrapper for clone and push
* Separate methods for resources export
* Separate folder export
* Simplify single signature
* Refactor a bit more
* Separate folder export function
* Split it into different files
* Add FIXME
* Export function mock
* Export Resources tests
* Add test for cannot find client
* Check for branch
* Fix registry
* Move folder export tests
* Pass wrapper function
* Add worker tests
* Fail if branch is passed for clonable repositories
* Fix merge issues
* Add hook to validate access for users based on provisioning logic
* Wire the hook
* Add tests
* declare new variables for errors
* rework the authorization flow for provisioned users
* Add scim feature to testinfra opts
* Grant access if the identity doesn't have associated a user
* skip external uid check for subsequent calls
* Update tests
* Revert "CloudWatch: Import new grafana-aws-sdk with PDC fix (#103249)"
This reverts commit f2b5b4e0c0.
* Revert "CloudWatch: Migrate to aws-sdk-go-v2 (#103106)"
This reverts commit a65cc0df93.
* make update-workspace
* Added config options heading and bumped other heading levels
* Restructured xy options section
* Fixed links
* Formatted xy chart options using tabs
* Finalized structure of xy chart options section
* Corrected and restructured tooltip options
* Made to do note
* Added to do note
* Replaced screenshots
* Replaced axis options with shared file
* moved transform section
* Moved non-config sections and fixed heading level
* Removed incorrect options from xy chart and commented out image in shared axis file
* Wording edits
* Updated axis options
* Fixed wording
* Added Value mappings and thresholds and other minor edits
* Fixed table
* feat: text wrap table g12
* chore: remove stale comment
* tests: skipping - can't figure out how to test right now
* move text wrap stuff to table new
* chore: make table stuff untouched. only in table new
* wrap text stuff only in table-new
* unbreak RT wrapping
* skip tests for now
* cleanup
* fix bad merge
* revert some stuffs
* maybe
* tweaks
* uwrap 0.1.1
* fix: cell width fixes for overrides
* chore: fix column width
* fix: update hover logic
* fix: utils.test.ts
* chore: mock uWrap and remove tests for now
* chore: adjust width
* chore: clean
* chore: width passed to uwrap account for border
* chore: width changes
* adjust
* no descr
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* add group to role DisplayName to make searching easier
* clean up more role names; add filtered display text when fetching
* pass filter state into role menu to decide how to display role name
* prop name better describes what it does
* Use logging from app sdk in the resource mod
* make update-workspace
* Use app-sdk logging in SQL backend
* Use grafana-app logging in tests
* make update-workspace
* make update-workspace
* make update-workspace
* Use default logging
* Remove dependency on grafana/grafana
* Fix imports
* skip rules that are managed by plugins when importing from data source rules to GMA
* update translations
* update text
* update translations
* handle no rules to import
* filter out rules instead of groups
* Reuse skipped rules alert
* update translations keys
* fix filter
---------
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
* implement sorting
* swagger gen
* minor fixes
* clean up param reading
* add todo
* add errors only prop
* codegen stuff
* fix copy paste error
* forgot the api gen
* implement sorting on the frontend
* remove unused enums
* cleanup
* remove tests that are obe
* fix merge
* change page length based on checked box
* cleanup
* fix test
* i18n-extract
* var name tweaks
* use switch and conditional rendering instead of checkbox
* i18n-extract
* use initial sort
* fix type
* fix layout
* fix bugs
* make betterer happy
* fix var names
* Add repository resources interface for export worker
* Add mocks for repository resources
* Add unit tests for ExportWorker's IsSupported method
* Add unit tests for ExportWorker's Process method, covering scenarios for missing export settings, write permissions, branch restrictions, and client creation failures.
* Fix unit tests
* Single function
* Add more unit tests
* Add test for failed folder
* Fail export folder errors
* Add another test
* Positive folder export
* Too many folder export errors
* Too many errors on folder export
* Partial folder errors
* Add test for nested folder
* Add test dashboard export
* More cases
* Ignore existing dashboards
* Fix folder tests
* Fix clonable test
* Add clone failure test
* Add test clean up without push
* Working tests
* Use mock clonable
* Add unit tests for IsWriteAllowed
* Add behaviour to cover ref equal to configured branch
* Fix worker test
* Fix linting
* Split clone and push
* Wrapper for clone and push
* ReloadDashboard: Unified manager should delegate to the right manager
* Throw only when dashboard version error is detected
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* restrict provisioned teams from being updated and deleted
* check if team is provisioned before update and delete
* add function getTeamDTOByID()
* check if team is provisioned in access control
* fix TestDeleteTeamMembersAPIEndpoint
* add unit tests
* add function for validating a team
* SQL Expressions: Allow many more functions and nodes
* Also allow the `REGEXP_SUBSTR` function
* Add window functions
* add more JSON support, remove now and current time (for now)
---------
Co-authored-by: Kyle Brandt <kyle@grafana.com>
* Use authlib repo. Use otel
* Use interceptors on the provider level
* Create a new wire set with otel
* Lint
* Fix test
* make update-workflow
* make update-workspace
* make update-workspace. Try to add authlib as enterprise imports
* make update-workspace
* Run validation on config updates
* Refactor code
* Add debug lines
* Remove test check on admission
* Organize imports
* Delegate events to the API client
* Extend error notification
* Deep copy default data
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Clarity-89 <homes89@ukr.net>
The tool is unmaintained. Most useful rules have been ported to Vale.
The remaining rules often exhibit false positives.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
The new behavior is discussed in https://github.com/grafana/website/pull/25064.
The behavior lets writers include block elements like lists and continue the list in the including source.
I've removed the `panels` `ref` URI to fix the link in learning journeys.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add reqAction for alert manager routes
* Add endpoints from Prometheus Alertmanager API
* use notifications reader for alertmanager/api/v2/status
* use viewer for GET api/v1/alerts
* add POST DELETE for api/v1/alerts
* duplicate paths to cover upstream Alertmanager
* add fallback rule to catch all GET
* Update reqAction for GET api/v1/alerts
* require Admin for all wildcard paths
---------
Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* ColorPicker: fixed height when switching tabs
Fixed the component's height by setting a consistent height and adding margin.
Also added a test to ensure the component heights remain nearly identical when switching tabs.
Fix#99675
* ColorPickerPopover: Fixed height for popover content and allowed overflow. #99675
* ColorPickerPopover : Fix formatting suggested by linter.
* ColorPickerPopover: Remove redundant height test when switching tabs
* ColorPickerPopover: Remove overflowY style from popover container
* ColorPicker: Remove unnecessary marginTop from SpectrumPalette styles
* Update styling of import warning
* Update logic for picking recording rule target datasource, and default to chosen DS
* Add CreateNewFolder component
* Reuse folder creation logic inside alert rule form
* Update betterer and tweak jsdoc
* Add translation to folder selector and tidy up imports
* Allow specifying data source UID in query param
* Add import button to new list view on appropriate data sources
* Fix CI failures
* Update translation keys
* LogListNavigation: create component
* LogListNavigation: make it optional
* Refactor Navigation into Controls
* Explore Logs: hide old panel options
* LogListControls: add more controls and apply new styles
* LogListControls: update width
* Remove console log
* LogList: wrap component in context
* LogListContext: make it stateful
* LogListControls: connect with context
* LogListContext: sync displayed fields
* LogListContext: add syntax highlighting control
* LogLine: improve color with highlighting off
* LogListControls: improve button styles
* LogListControls: add sort order option
* LogListControls: add dedup strategy
* LogListContext: sync prop changes with state
* LogList: add option change callback
* LogListContext: sync external changes only when showControls is disabled
* LogListContext: unify sync effect
* LogListControls: improve buttons active css
* LogListContext: add optional storage support
* LogList: make syntaxHighlighting and read from store or default to true
* LogsPanel: add support for new options
* Generated file
* Update tests
* New Logs Panel: add showControls option
* LogList: make eventBus optional
* LogsPanel: expose syntaxHighlighting
* LogsPanel: expose grammar to plugins
* Remove incorrect legacy file
* LogListControls: allow options change with controls enabled in panel editor
* LogLine: apply no-highlighting class to ansi wrapper
* LogListControls: add frontend level filtering
* LogList: filter by filterLevels
* LogListControls: allow filterLevels in dashboards
* LogLine: update unit tests
* LogLineMenu: update unit test
* LogListControls: add unit test
* Revert
* LogList: add unit test
* LogList: add onLogRowHover support
* LogList: test hover events
* LogsPanel: add unit test
* LogLine: use theme color for errors
* LogLine: minor tweak to hover state
* Chore: fix test case name
* LogListControls: add border
* LogListControls: prevent default on wrap toggle click
* LogLine: switch info and debug colors
* ContentOutline + LogControls: sync displayed levels and minor outline improvements
* LogListContext: sync with external filterLevel changes
* Logs: work with arrays of LogLevel and not plain strings
* Fix type
* LogListControl: increase controls size
* Use interface for factories
* Add most mocks to unit test jobs
* Generate more mocks for main jobs package
* Interface for parser
* Use clients directly without parser
* Regenerate mock
* Eliminate resource clients from Parser
* Interface for folder tree
* first attempt to have info function
* unit test for query modeller
* enable info function in devenv
* fix unit test
* add unit test for info function
* throw error when trying to visualize the info function
* remove visual query support
* Update packages/grafana-prometheus/src/promql.ts
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Update packages/grafana-prometheus/src/querybuilder/parsing.test.ts
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* update info function detail
---------
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Separate DryRun into separate method
* Fix linting
* Remove errors
* Remove checks in dualwriter
* Fix unit tests
* Add TODOs
* Dry Run as non-critical error
* Add TODOs
* Address TODO
* Fix tests
* Fix linting
* Deprecate dashboard name from path completely
* Use MissingName error also in parser
* Return 206 for non-critical errors
* Remove TODOs for previous dry-run
* add columns external_id and is_provisioned to the team table
* generate openapi specs
* rename column to external_uid
* generate open api specs
* increase limit for external_uid to 256
* Added config options heading and bumped other heading levels
* Reordered headings and added missing ones
* Nested candlestick options under heading
* Added graph styles and axis content
* Added candlestick options to table
* Refactored and edited candlestick options section
* Replaced shared file with manual tooltip section
* Added missing intro sentences to candlestick options section
* Added a graph styles shared file
* Replaced body text with graph styles shared file in candlestick and time series files
* Added content from time series file to shared axis options file
* replaced shared file in candlestick file with axis content
* Updated option descriptions in axis options shared file
* Updated axis options section of candlestick
* Fixed typos
* Ran prettier
* Replaced some screenshots with higher res, up to date versions
* Wording edits
* Added contributor notes and a missing command
* Fixed typo
* Fixed typo
* Ran prettier
* Removed note from axis options all file
* Renamed axis options file
* Renamed shared file adn updated link in time series page
* Added axix options file and renamed another one, updated links in other files
* Ran prettier
Fix getDataQueryKind to properly detect datasource type from multiple sources
- Add unit tests for the improved function
- Fix typo in schema editor drawer subtitle
* fix: cell inspect + filter at the field level, not defaults
* chore: defensive against missing custom config
* chore: reconfigure tests
* hide inspect block if nothing to show
---------
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: Ihor Yeromin <yeryomin.igor@gmail.com>
* add feature toggle alertingMigrationUI
* wip
* wip
* wip2
* add button to export in alert list and add target folder in the form
* update namings
* protext migration route with alertingMigrationUI feature toggle
* remove unused error style
* add namspace and group filter
* fix translations and prettier
* fix duplication
* use the new endpoint
* update right roles for the FE route
* refactor
* notify success
* address feedback
* fix translations
* Simplify migration UI for alert rules to GMA format
Extracts migration button component and reuses it in banner for better
code organization and consistency.
* Fix root folder check in import alert rules UI
Replace hardcoded empty string check with lodash isEmpty for folder UID
validation
* Add collapsible section for import rule options
* address feedback
* Split useAlertRuleSuggestions, one for labels, and other for namespaces
* refactor splited hooks
* Alerting: (PR review) Redesign slightly + use combobox (#102614)
Redesign slightly + use combobox
* udpate naming
* remove eslint-disable-next-line @grafana/no-untranslated-strings and add hasDataSourcesConfigured as a condition to render the banner
* use button instead of banner
* fix routes
* use new api
* update api
* remove query params
* update translations
* update ff files
* skip subpath when redirecting to the alert list view with filters
* prettier
* disable provenance
* prettier
* Don't send target forlder uid in the payload as undefined if it's not selected
* prettier
* add confirmation modal with a preview
* remove unnecessary export
* Add target datasource UID for recording rules
* Use skipToken
* Add recording rule datasource and update designs
* Use different hook to fetch rulerRules
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
* Enable running a CodeQL check whenever someone opens a PR (for Go code)
* Fetch main in the GHA so CodeQL can properly compare code changes
* Try to fetch more of main to see if CodeQL can compare changes
* Also trigger on push
* Rename GHA
* Use only one workflow for all languages that runs on each puch hook
* Rename GHA
* Removing owner from deleted GHA
* Temporarily mark this GHA as not required for a PR to get merged
* Always run the workflow
* Mark action as non blocking
What is this feature?
This PR fixes a state transition issue where alerts transitioning from the Recovering state back to the Alerting state incorrectly entered the Pending state first if the rule had a For duration configured.
Why do we need this feature?
When an alert goes from Alerting to Recovering (when using the Keep firing for) and then back to Alerting, the existing logic would incorrectly put the alert into Pending state while it should be alerting and still sending notifications to the Alertmanager.
* Add e2e dagger pipeline
* various-suite not various suite
* upload videos dir
* produce e2e videos even on failure
* nil ref
* sync doesn't return container
* fix quotes
* try without flags first?
* try without quoting?
* use two dashes in flags
* update CODEOWNERS
* make update-workspace
* go work sync
* make update-workspace
* add newline
* Support PDC for Influx SQL
* Correctly set the gRPC transport creds dial option
* Logging and refactor
* Allow URLs with no scheme
* Use passthrough resolver for socks proxy
* Update comment
* Extract url parsing and add test
* Check err
* Docs: Create a landing page for SCIM provisioning
* Fix docs warnings
* Update docs/sources/setup-grafana/configure-security/configure-scim-provisioning/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/setup-grafana/configure-security/configure-scim-provisioning/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Apply suggestions from code review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Address some of the feedback and simplify few parts
* Remove repetitive wording
* Don't use possessive form, again
* Address the feedback from PR
* Docs: Manage users and teams via SCIM (#102478)
* Docs: Manage users and teams via SCIM
* Docs: Manage users and teams via SCIM
* Refactor managing users parts
* Add team sync docs
* Update _index.md
* Apply suggestions from code review
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
* Clarify how user identity linking is working
* Fix formatting
* Docs: Configure SCIM with Azure and Okta (#102582)
* Docs: Configure SCIM with Azure and Okta
* Apply suggestions from code review
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
---------
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
---------
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Add a warning about migration from team sync
* Remove the SAML setup instructions from SCIM docs
* Update _index.md
* Update _index.md
* Apply suggestions from code review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Sarah Constant <sarahleejane@users.noreply.github.com>
* Address PR feedback
* Stop using possessive form
* Add a note mentioning that users/teams can not be manually deleted
* Update _index.md
* Docs: SCIM configuration options (#103085)
* Add a section to clarify how SCIM works with other IdPs
* Update _index.md
* Update _index.md
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Sarah Constant <sarahleejane@users.noreply.github.com>
Initial support for alerting with SQL expressions
- When `format` is set to `alerting`, SQL expressions output in a format suitable for alerting evaluation.
- Outstanding TODOs:
- Deduplicate output rows
- Add more tests
- Fix broken alerting UI rendering (likely due to shape change to undocumented full-long format)
- Basic usage:
- SQL must return one numeric column and one or more string columns.
- Each row may become an alert.
- The alert fires if the numeric value is non-zero.
- String columns are treated as labels.
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
Co-authored-by: Sam Jewell <sam.jewell@grafana.com>
This adds more checks on the type of errors returned from InfluxDB fsql
datasource queries. Grpc errors with code `InvalidArgument`, `PermissionDenied`
and `NotFound` are mapped to downstream errors.
* copy paste tab row works
* refactor to hook
* add buttons to canvas
* make i18n
* remove paste from add pane and refactor
* pasting auto grid panel works
* add paste for default grid
* set height/width and postion for auto grid items moving to default grid
* clean up
* Provisioning: Display badge for all manager kinds
* Show the badge for folders
* Fix switch / case syntax to display correct manager kind
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
---------
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: Igor Suleymanov <igor.suleymanov@grafana.com>
This is more in preparation for the snapshot configuration option,
to avoid having to duplicate the functions that would:
- Find an icon based on resource type
- Find a label based on resource type
Since we use those for other components, I figured we could just
make a helper function to reuse them.
* Convert pkg/apis to a module
* Update apistore module to use apis go module
* Add module to dependabot
* Group go dependencies
* Add guidelines for adding a new gomod
* Prettier
* Only convert apis/folder to a module for now
* Add replace directive
* Add missing go mod
* Record webhook pinged event
* Add TODO for webhook creation updated
* Hack to wire client
* Revert accidental change in controller
* Wire the client
* Use factory method
* Remove omit empty
* Regenerate client
* Fix compilation
* Every 30 seconds if not pinged
* Move lines around
* Use different approach
* Added as part of the controller
* Exponential backoff for waiting for ping
* More stuff
* Revert changes in controller
* Add separate webhook section in overview
* Change order of translations
* Update ping within 1 minute
* Last event update
* Extract translation
* Display last event in frontend
* Refactor the logic around update
* Fix the type to marshal
* Added configuration options heading and bumped other heading levels
* Moved dashboard list options into table
* Further restructured dashboard list options and made wording edits
* Added semantic line breaks
* Replaced screenshot with high res image
* Wording edits
- Add frame type So SQL expressions knows how to convert it
- No FrameType version so how other expressions do not change how they handle it, and continue to catch the special graphite handling in SSE convert
Fixes#100545
Streaming queries/metrics do not work if TLS is enabled and basic auth is not.
"Save & test" while adding/editing a tempo datasource throw `e.data is undefined` in the ui.
Gafana server logs report:
> logger=grafana-apiserver t=2025-02-12T17:55:29.131036665Z level=info msg="[core] [Channel #42 SubChannel #43]grpc:
> addrConn.createTransport failed to connect to {Addr: \"tempo:3200\", ServerName: \"tempo:3200\", }. Err: connection
> error: desc = \"error reading server preface: read tcp 127.0.0.1:55432->127.0.0.1:3200: read: connection reset by
> peer\""
> logger=grafana-apiserver t=2025-02-12T17:55:36.835523455Z level=info msg="[core] [Channel #31 SubChannel #32]grpc:
> addrConn.createTransport failed to connect to {Addr: \"tempo:3200\", ServerName: > \"tempo:3200\", }. Err: connection
> error: desc = \"error reading server preface: EOF\""
Fix by using TLS when enabled regardless of basic auth settings.
Co-authored-by: André Pereira <adrapereira@gmail.com>
* NestedFoldeList: remove nested folder dupe during save
* Change solution for loading/pending check in useFoldersQuery
* moved pending string to constant
* Moved last page loading logic to proper func
* Updated comment to reflect func changes
* Add group actions menu
* Refactor modals to accept raw ruler group
* Use prometheus and ruler responses to dispaly GMA rules in the hierarchical view
* Add groups loader component for data source managed rules
* Improve rules matching algorithm for the search results
* Use plus and minus icons for reconciliation state
* loading spinner WIP for operations / transactions
* update comment
* Use ruler rules order when displaying a group, change rurler preload behaviour
* Add ruler-based ordering for GMA rules
* Refactor ruler API mocking
* Refactor rule components to accept ruler only rules
* Add tests for GrafanaGroupLoader
* Add tests for vanilla prom groups
* Unify data matching code, add tests for DS groups loader
* Fix errors after rebasing
* Improve handling of ruler group absence
* Fix cache key
* Add group action buttons for the new group pages
* Add new rule action buttons to the new list page
* Address PR feeback, component renaming, missing translations
* Unify groups and rules links and actions
* Fix new rule button
* Add rule list action buttons tests
* Fix lint errors
* Add redirect to rule details page on save
* Update FilterView tests
* Fix imports and remove unused code
* Improve type definitions, add pooling to Prom hooks, add inline docs
* Remove unused code of group modals
* Update translations
* Disable cache population for filter-view generators
* Add consistency check Alert to the RuleViewer when V2 list is enabled
* Disable UI errors in prom generator
* Improve missing datasouce handling
* Add missing translations
* Improve group loader tests, remove unused code
* Enhance Prometheus API query to include notification options
* Improve error handling, remove consistency check for vanilla prom data sources
* Address PR feedback, add new version of the useHasRuler hook
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* feat(Extensions): expose an observable API for added links and components
* refactor: make `getObservablePluginExtensions()` more RxJS style
* refactor(getPluginExtensions): remove unnecessary types
* fix(getPluginExtensions): remove unused imports
* Apply suggestions from code review
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
* refactor(getPluginExtensions): stop using `shareReply()`
* fix(grafana-runtime/extensions): typo in error messages
---------
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
* fix: mark `exploreMetricsUseExternalAppPlugin` as not frontend-only
* docs: explicitly show feature toggle in docs
* Revert "docs: explicitly show feature toggle in docs"
This reverts commit 292ce7f7e8.
* Added config options section and bumped heading levels
* Added level offset
* Restructured Status history options and removed screenshot from Value mappings section
* Replaced screenshot and updated example text
* Fixed heading level in legend options 2 shared file
* Initial API client for ScopesNavigation
* Display scopes navigation items and group them
* Remove refactored component
* Fix link highlighting
* Underline on focus
* Set icons based un URL path
* Remove explicit icon names
* Add links to copy
* Map dashboardbinding to scopeNavigation in folder generation
* Consolidate dashboardbindings and scopenavigations to a single way of handling
* Let fetchDashboards handle all fetching
* Move endpoint types to core
* Remove comments
* Fix import
* Rename name to id
* Update translation
* Add feature toggle
* Fix tests
* Fix go.mod for some reason
---------
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
* Added Config options section, bumped heading levels, added missing options, and restructured Text options section
* Moved variables content
* Replaced screenshot
* Moved sentence
* Used previous wording
* test commit
* Revert test commit
* Ran prettier
* Unified Storage: Don't read before create
* test: use the existing test infra
* fix: support pq
We use pgx, but it seems to be wrapped in a pq driver shim, causing the errors to be remapped to pq's type. Weird
situation.
* feat: support CDK backend
* revert: there is a postgres_tests block
* fix(CDK): only check existence on ADDED updates
* fix(CDK): use ReadResource to deal with deleted files
* Move to new repository
* Rename it to dual writer
* Rename the function
* Rename the methods
* Rename to exportResource
* Clean up logic in migrate and add TODOs
* Add TODOs
* Use generic client for unprovisioned
* ForEachResource
* More consolidation
* Refactor more around client
* Consolidate constants
* ForEachFolder
* More use of constants
* Add FIXME notes
* Use more constant
* Remove Dashboard
* Pass tree to folder manager
* Replicate tree
* Reduce export complexity
* More refactoring
* Use the ForEach for loading users
* Limit in-memory folders
* Isolate the object
* Improve the export function
* Move resources to resources package
* Move delete operation
* Move more logic
* More consolidation
* More renaming
* Fix more issues
* Ensure path exists when created a resource
* Simply append error
* Fix receiver lint issue
* Fix cyclomatic complexity
* Fix linting
* Remove folder path creation
* Improve data source error message when stackID
* Update comment
* Revert "Update comment"
This reverts commit 48922bc552.
* Revert "Improve data source error message when stackID"
This reverts commit 4bf0a2f7b7.
* Make public messagic configurable based on context
* Update, simplify
* Update
* Update getting stack
* Update pkg/plugins/errors.go
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
* Refactor test to test for when context has stack value
* Remove duplicated test
* Fix error checking logic
---------
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
* implement sorting
* swagger gen
* minor fixes
* clean up param reading
* add todo
* add errors only prop
* codegen stuff
* fix copy paste error
* forgot the api gen
* cleanup
* remove tests that are obe
* fix test
* fixes: sort persistence, sort trigger panel dirty state, use field display names
* fix: for nested tables, use column.name for header text
* chore: fix location of cache display names
* Create ListByIdOrUID in user service
* create UnstructuredToLegacyFolderList
* update GetFolders to use list parser
* update GetDescendants to use list parser
* update UnstructuredToLegacyFolder to also make a single call to the user service
---------
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* Tracing: chore: make insecure option configurable
In case of insecure set to false, default system cert pool will be used to create otlpgrpc client.
* test: add tracing/insecure config checks
This is to verify whether insecure configuration is properly parsed.
* chore: update configura Grafana docs with new setting
* chore: also update comment in the ini files
---------
Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
* Dashboard: Scroll element into view when selecting from outline
* fix import
* Switch to tab when selected via outline
* Update
---------
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
* placeholder commit
* Complete function in api_convert_prometheus.go
* MVP before extensive testing
* Cleanup
* Updated tests
* cleanup
* Fix random logs and lint
* Remove comment
* Fix errors after rebase
* Update test
* Update swagger
* swagger
* Refactor to accept groups in body
* Fix auth tests and some cleanup
* Some cleanup before refactoring
* Remove unnecessary fields
* Also refactor RouteConvertPrometheusPostRuleGroup
* Remove unused code
* Rebase + cleanup
* Update authorization_test
* address comments
* Regen swagger files
* Remove namespace and group filters
* Final comments
* Dashboard: Only auto focus new objects
* fix outline issue
* Also set isNew when adding row below/above and tab before/after
---------
Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>
* add column guid to alert rule table and rule_guid to rule version table
+ populate the new field with UUID
* update storage and domain models
* patch GUID
* ignore GUID in fingerprint tests
* get alert rule versions by GUID
* update rule delete to reset uid in history instead of deleting rows
* add test
* Update delete rule to require UserUID, remove all versions and create "delete" version
that holds information about who and when deleted the rule
* update usages of the delete method
* add list deleted rules to store
* list api to support deleted query parameter
* add list deleted rules to store
^ Conflicts:
^ pkg/services/ngalert/store/alert_rule_test.go
* list api to support deleted query parameter
* Restore deleted rules
* fix recovering manually recording rules
* update role control for the trash route
* add alertingRuleRecoverDeleted feature toggle enabled by default
* fix access control for trash menu item in the navtree
* Add alertingRuleRecoverDeleted feature toggle,
add Delete permanently alert rule menu option
* hide remove permanently functionality in the UI until we have the api available for it
* discard wrong changes after merging
* Reverted changes in pkg/apis/dashboard_manifest.go after fixing conflicts
* Reverted changes in go.work.sum after fixing conflicts
* Reverted changes in pkg/apis/dashboard_manifest.go after fixing conflicts
* Reverted changes in pkg/services/ngalert/models/alert_rule.go after fixing conflicts
* Reverted changes in pkg/apis/dashboard_manifest.go after fixing conflicts
* restore delete permanently and add the queryparam for it
* update snapshots
* fix translations
* protect trash route by the feature toggles
* use the new rulerRuleType for checks
* revert ability to delete permanently and alert rule from the ui
* remove unnecessary update after reverting
* fix ff
* add tracking
* use recently deleted instead of trash
* create isRecoverDeletedRulesEnabled for checking ffs
* address pr feedback 1
* include alert rule uid in getRowId
* use RulerGrafanaRulesConfigDTO for deleted rules response
* use isLoading in the AlertingPageWrapper
* fix wrong check for recording rules type
* add test for restoring manually through the alert rule form
* add test for restoring deleted rule
* use importAlertingComponent
* udpate mock
* address pr feedback
* update translations
* address feedback
* address feedback 2
* address feedback 3
* address feedback 4
* move transformation of the response to the endpoint
* fix typo
* refactor grafanaRuleDtoToFormValues
* update translations
* use guid for identifying rows
* prettier
* use ONLY the guid for identifying rows
* Add provides/invalidates tags for deleted rules
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
We should not write after the context is cancelled. This causes tests to fail as they are trying to clean up. To try to
accommodate this, we'll need to listen to the context in any loop where we don't immediately get other instructions from
e.g. trying to do an HTTP request.
* SQL Expressions: Add Null-literal node
* Retain some order in the code - put NullVal with BoolVal
* Add support for `IN` keyword
* Add GROUP_CONCAT keyword
* Add COLLATE keyword
From Claude:
The test case demonstrates a simple use of COLLATE with a string
literal, but in real MySQL queries, COLLATE is often used in more
complex scenarios like:
1. String comparisons:
`SELECT * FROM table WHERE name COLLATE utf8mb4_bin = 'John'`
2. Sorting:
`SELECT * FROM table ORDER BY name COLLATE utf8mb4_unicode_ci`
3. JOINs:
`SELECT * FROM table1 JOIN table2 ON table1.name COLLATE utf8mb4_bin = table2.name`
The COLLATE clause is particularly useful when you need case-sensitive
comparisons (utf8mb4_bin) or specific language-aware sorting rules.
* CI: Allow Bench conversion to fail
We shouldn't mark PRs and commits as X if they fail to convert logs with Bench.
* Fix: Prints should always include new lines
* fix: remove unused import
* docs: add note about alert migration
added note about alert migration in 11.6.0.
* docs: add note about alert migration
adding documentation about the migrations to the performance limitation docs
* title edit
<-- vale = NO -->
* remove feature flag alertingAlertmanagerExtraDedupStage
* use most recent version of fork of alertmanager
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* Create basic logic for stateless variables
* Refactor function to get DS from queries and variables
* Simplify code, remove unnecessary wrappers
* Fix typo
* improve naming
* Add unit test for variables
* Fix tests
* Add extra logic to keep backwards compatibility, variables can be used without dashboard scene
* Adjust logic for variables ds
* Refactor code, pass dsReferenceMap
* Fix CodeQL warnings
* Also validate if path is a file above the safe dir
* Lint
* [REVIEW] reduce possibility of exploits
* Comment
* Remove test scenario
* FlameGraph: Added units standard option (#89815)
* FlameGraph: Added decimals, and cleaned up module plugin configuration
* Added missing colon
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
---------
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Unified Storage: Return an already exists error
When inserting a resource that already exists (i.e. race condition), we can safely catch UNIQUE constraint violations
and transform them into a `k8s.io/apimachinery/pkg/api/errors` error that stands the test of `errors.IsAlreadyExists`.
* feat: clarify existing conflict error
* chore: make update-workspace
* feat: make new package for backend error
* fix: assign dependency owner
* feat: use dialect for checking error type
* chore: go generate
* revert: to 5af369166d
To receive this bug-fix:
- https://github.com/dolthub/go-mysql-server/pull/2853
Which merged to main on Feb 17th 2025
I picked a commit on `main` from March 19th 2025:
```console
go get github.com/dolthub/go-mysql-server@8c915e51131f1e867ad873f8e827abf858d65dce/testdata
```
Then
```
make run
```
* Add behavior for hidden
* Rename to IsFilePathSupported
* Modify sync
* Revert renaming
* Fix the tests
* Add more tests
* Maintain empty folders until next full pulling
* Fix wording
* Consider the file as ignored
* Handle folder creation in sync
* Record folder creation / update
* Fix in manual test
* Ensure / slash for folders
* Refactor the tests
* Keep safe path
* Fix some cases
* Remove log lines
What is this feature?
A follow-up for #101184, adds AlertRule.MissingSeriesEvalsToResolve to the APIs.
missing_series_evals_to_resolve must be specified too and it must be > 0.
POST /api/ruler/grafana/api/v1/rules/{folderUID} works in the following way:
If missing_series_evals_to_resolve is not sent or null, the rule keeps its existing value
If missing_series_evals_to_resolve > 0: updates to that value
If missing_series_evals_to_resolve = 0: resets to default (nil).
AlertRule.MissingSeriesEvalsToResolve can't be 0, so I used it to reset
In the Provisioning API, the value is just set if present and > 0. Otherwise it's reset:
PUT to /api/v1/provisioning/alert-rules/{UID}:
If missing_series_evals_to_resolve is nil, it's reset to the default value
If missing_series_evals_to_resolve > 0, it's updated
InfluxDB Flux queries can return a http.Error type that we can use to
assign errorsource to.
This PR checks for that type of error, and uses our errorsource
machinery to assign an errorsource.
This is part of https://github.com/grafana/data-sources/issues/377
What is this feature?
Prometheus conversion: ensures that AlertRule.Data queries always have default parameters set (intervalMs, maxDataPoints). Without this, updates of the same rule can cause version increments.
Why do we need this feature?
Currently, when converting Prometheus rules to Grafana alerts, some default parameters are not explicitly set in the query model. This creates a problem during rule updates:
When a user updates a rule that hasn't changed, we still detect differences in the AlertQuery.Model because the newly converted rules are missing the default fields, such as intervalMs and maxDataPoints. This causes unnecessary version increments of alert rules.
What is this feature?
This PR changes the behavior of the $value and .Value variables in alerting templating to be more compatible with Prometheus templating. When a single datasource is used in the alerting rule, these variables will now return the numeric value from the query instead of the evaluation string.
Why do we need this feature?
It makes Grafana templating more compatible with Prometheus templates. In Prometheus, $value returns the numeric value of the query, but in Grafana it's the evaluation string: [ var='A' labels={instance=instance1} value=81.234 ]. This is because in Grafana multiple datasources can be used in the alert rule, and it's not always possible to get a single value.
This change makes Grafana's behavior consistent with Prometheus when a single datasource is used, and in case when multiple datasources are used in the query, it keeps the old behaviour.
Both $value and .Value are not recommended to use (documentation), and it's better to use .Values instead.
* Add `recordingRulesEnabled` to grafanaBootData
* Check for recording rules being enabled, as well as feature toggle
* Remove unnecessary config line
* Move recording rules check to featureToggles file
* Update NoRulesCTA.tsx
* Update dashboard app to use app SDK v0.35.0
What
This change updates dashboard app to use app SDK v0.35.0 and adds new
Makefile target for running codegen for all apps, in opt-in manner.
Currently only dashboards app is opted in.
Additionally, this changes dashboard app Makefile to properly install
and update app SDK versions when generating code, with app SDK version
pinned in the Makefile itself.
Why
The upgrade addresses issues with `DeepCopy` methods, while the Makefile
targets ensure that codegen is easy to run and uses reproducible
environments.
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Run make update-workspace
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Fix deepcopy methods
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Re-run CUE codegen to satisfy the CI
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Run make update-workspace
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Update to v0.35.1
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
---------
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Added Config options heading and bumped heading levels
* Added empty Text size options section and updated Value options
* Updated bar gauge section
* Added missing options and removed screenshot
* Fixed Bar gauge options
* Added descriptions for Text size section
* Added links to text size section
* Fixed text size section
* feat: align frontend more with designs
* feat: remove unnecessary fields
* chore: remove imports
* chore: move imports
* fix: make label not spit out undefined
* feat: update title of nav item
* chore: make update-workspace
* fix: don't wrap text with span unless required
---------
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
* auto markup users/variables/visualization features
* mark up transformers feature
* betterer + translations
* markup trails
* mark up service accounts + translations + betterer
* undo ServiceAccountProfileRow change for now
* dedupe a little
* fix: go git migration should pretend the path is the repo root
The migration was broken due to its having the path already in the repository, then adding it once more. This now
pretends the path is the repository root as intended.
* chore: remove test log
* fix: reduce permissions of directory
* chore: make update-workspace
* refactor(frontend): rename all @grafana/data/src imports to @grafana/data
* feat(grafana-data): introduce internal entrypoint for sharing code only with grafana
* feat(grafana-data): add test entrypoint for data test utils usage in core
* refactor(frontend): update import paths to use grafana/data exports entrypoints
* docs(grafana-data): update comment in internal/index.ts
* refactor(frontend): prefer public namespaced exports over re-exporting via internal
* chore(frontend): fix a couple more weird paths that typescript complains about
* Provisioning: Gracefully handle AlreadyExists errors
When this occurs, the job is already in the store. The vast majority of use-cases (which currently is all of them!) will
be fine with just accepting that as an OK.
* chore: make update-workspace
* fix: return error, but expect it in tests
* Add json mapping for user.isProvisioned
* Retrieve the isProvisioned value from database
* Add a Provisioned label to pages that list users
* Update swagger definitions
* Add changes to User Admin pages
* [Provisioning] Pay back some technical debt (#100720)
* Handle pagination in github client
* Add some unit test coverage
* Remove unknown repository
* Remove unknown leftover
* Revert "Add some unit test coverage"
This reverts commit 420c9674d2.
* Revert "Revert "Add some unit test coverage""
This reverts commit f7eca41957.
* Revert unit tests in github package
* Remove S3 case as it's now deprecated
* [Provisioning] Consolidate job status report in JobProgressRecorder (#100718)
* Log also successful operation
* Consolidate stop logic under TooManyErrors
* Use error for TooManyErrors
* Pass the progress recorder
* Define JobProgressRecorder interface
* Do not expect workers to return status
* Remove scenarios due to pointers
* Use recorder to manage the entire state
* Provisioning: Support rotating secrets (#100705)
* Provisioning: Refactor webhook to another interface (#100733)
* POC/Provisioning: Remove S3 references (#100734)
* Remove unused script
* Remove s3 references
* Provisioning: Keep the existing k8s name if it is specified in metadata (#100672)
* keep name
* keep name
* Revert "keep name"
This reverts commit 29f87bcaeb.
* Commit stale go.mod
* Keep name also for sync deletions
---------
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
* Update preview banner copy
* Query Library: Move backend to enterprise (#100371)
* Fix wire
* Fix jobs table re-renders
* Provisioning: Refactor history to its own interface (#100735)
* Provisioning: Refactor history to its own interface
* refactor: use VersionedRepository
* Update API
* Provisioning: Test the GitHub client directly (#100808)
* Provisioning: Test the GitHub client directly
Instead of mocking the abstracted client, test it as well by mocking the underlying GitHub client. This also lets us
remove the mock for the abstracted client.
* refactor: move out helpers
* chore: set dependency owner
* Provisioning: Better clone/push error support (#100854)
* Provisioning: Replace searcher with one that knows about modes (#100857)
* Provisioning: Start in "mode5" when nothing exists in legacy (#100862)
* [Provisioning] Fix duplicate sync jobs triggered in controller (#100870)
* Improve logging on reasons why the controller triggered
* Fix messaging for sync job
* fix lint
* Provisioning: Move legacy export/import into a single migrate job (#100865)
* [Provisioning] Miscellanenous bug fixes and improvements (#100976)
* Error if found duplicate ID
* Fix issue with manual test button
* Fix issue with health errors not going away
* Display status in sync overview
* Use patch operations instead
* Trigger sync job after status update
* Convert Export Tab into modal
* Remove unused FieldSet import
* Only last 8 jobs
* Remove Links card
* Use button for Github Source Code
* Add actions to resources page
* Add resource column to Repository Resources
* Display Job Spec in RecentJobs
* Display dates in history page
* Display Avatar if available
* Improve styling of the avatar
* Update betterer
* Remove duplicate history header in history
* Commit betterer
* Address code styling issues
* update flags
* github v69
* v69
* POC/Provisioning: Add wizard (#100596)
* Chore: make update-workspace
* Chore: Fix lints (#101039)
* Provisioning: Workflows as write access (#101031)
* workflow as write access
* workflow as write access
* workflow as write access
* Update pkg/registry/apis/provisioning/repository/test.go
Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>
* POC/Provisioning: Add wizard (#100596)
* update refs
* update refs
* lint fix
* lint fix
* lint fix
* default everythign to read only
* reuse form components
* remove main
---------
Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* merge main
* Fix workflow types
* Betterer
* [Provisioning] Fix webhook and finalizer issues (#101052)
Fix webhook and finalizer issue
The maximum number of webhooks per repository is 20
* [Provisioning] Fix issue with last ref (#101056)
* Fix issue with last ref
* Update frontend code
* Fix the local tmp test
* Use lastRef
* POC/Provisioning: Simplify connect step (#101064)
* Fix sending workflows
* Use write for local
* Move connect action to the next step
* Remove wizard props
* Typo
* Redirect to wizard
* Show repo link after successful export
* Provisioning: Avoid starting sync jobs when using legacy storage (#101114)
* avoid starting sync jobs on legacy
* newlines
* Provisioning: Onboarding landing page (#101112)
* add landing page before wizard
* Update onboarding page
* Update URL
* Remove unused
* Add deleteAll button
* Improved text
* betterer
---------
Co-authored-by: Clarity-89 <homes89@ukr.net>
* Provisioning: use the sync job to finish the migrate job (#101107)
* Provisioning: Show progress more often (#101128)
* show progress bar earlier
* show progress bar earlier
* update wording to be less specific
* POC/Provisioning: Enable sync (#101131)
* update preview banner
* actualy remove and don't crash without provisioning flag
* Update db banner
* Provisioning: Export oldest items first (#101189)
* Provisioning: better branch handling (#101188)
* add missing file
* Provisioning: Fix tests (#101197)
* Provisioning: Refactor tests to be multiple functions
* Provisioning: Fix tests
* fix: make github-example sync
* fix misspell
* Provisioning: avoid migration wizard if things are already in unified storage (#101204)
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* more lint
* POC/Provisioning: Handle connect step errors (#101192)
* Provisioning: Unify status handling in repository and migrate steps
* Refactor: Move WorkflowsField outside RepositoryStep and use proper type
* Refactor: Improve repository verification error handling and UI
* Refactor: Simplify repository verification error handling
* Refactor: Simplify RepositoryStep component structure
* Refactor: Improve error handling in RepositoryStep
* Refactor: Remove redundant repository creation logic from ProvisioningWizard
* Refactor: Simplify RequestErrorAlert component
* show github error
* now will verify
* test .git
* recover from bad config
* Update error handling
* Remove unused prop
* merge upstream
* Show migration summary
* Update text
* Improve text
* Betterer
* [Provisioning] Review controller changes (#101216)
* Review health check conditions
* Move down the logic to set up the sync status
* Skip if it's only a health check rerun
* Fix health check conditions
* Preserve last ref
* Format code
* Rename to shouldSkipSync
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Roberto Jiménez Sánchez <roberto.jimenez@grafana.com>
* fix promotion step
* In the promotion pipeline, publish should depend on build
* fix promotion pipeline
* [Provisioning] Use smaller methods to process repository events (#101240)
* update codegen
* merge main
* Provisioning: Avoid localhost error loop (#101253)
* Provisioning: Update the recent jobs formatting (#101250)
format history
* [Provisioning] Refactor Pull Request & Lint worker (#101273)
* Refactor the code
* Refactor into separate files
* Consolidate linter flag in one spot
* Use global feature flags
* Commit betterer
* Remove from JSON the intermidiate flag
* Use again spec
* Clean up
* Revert changes in test
* POC/Provisioning: Remove sync confirm modal (#101281)
* [Provisioning] Remove linting from MVP (#101286)
* Remove Linting backend
* Re-generate client
* POC/Provisioning: Unify tags (#101218)
* Unify tags
* add both tags
* add tag types
* Check for the redirect only once
* Add fetch settings with delay hook
* Refetch settings
* Split hooks into separate files
* Cleanup
* Prettier
* Prettier
* Remove lint code
* Betterer
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Provisioning: Update token instructions (#101280)
* Provisioning: Use blob storage rather than local file system to save images (#101298)
* [Provisioning] Add more explicit setup warnings if webhook integration and image rendering are disabled (#101304)
* Setup warnings if renders or webhooks are not possible
* Improve display
* Use a single Alert
* Make design more compact
* Only display local config is missing critical feature toggles
* Improve styling of required flags
* Add file name to the custom ini itself
* Add copy button
* Add FeatureSection Component
* Commit betterer
* Use an interactive table
* Use a modal for instructions
* Use the same modal for example config
* Improve setup steps
* Improve stepper
* Copy code ctrl + c
* Make it more compact
* Select feature to enable
* Improve the height of alerts
* Separate components
* Better warnings
* Improve the page
* Improve the cards
* Improve cards even more
* Improve cards
* Improve cards
* Optional copy in code block
* Add side bar with steps
* Improve styling
* Style modal
* Clean up Code
* Remove index file
* Simplify Step Component
* Commit betterer
* Simplify components
* Use CodeEditor and Clipboard components
* Do not show scrollback on minimum size
* Fix positioning of footer
* Separate Component for Feature
* Use different styling
* Commit betterer
* Use more Grafana components in the FeatureCard
* Separate sidebar into own components
* Simplify sidebar code
* Commit betterer
* Remove connector
* Simplify styling further
* Use cards
* Improve code
* Use more grafana component in InstructionsModal
* Further simplify
* Simplify the code
* Simplify style
* Clean up
* Simplify the Wizard
* Use little icons
* Improve feature cards
* Improve cards
* Commit betterer
* Add description to feature setup
* Improve instructions for snapshot preview
* Move all files into Setup folder
* Commit betterer
* Clean up the warnings code
* Improve coding
* Move sidebar item to separate fiel
* Rename components
* Fix issues
* Use stack instead
* Improve style
* Don't show setup button if configured already
* Simplify again CSS
* Use secondary actions
* Style a bit more
* Improve wording
* Update warning
* Refer to docs in Image Renderer
* More clean up
* Revert changes in generated client
* Fix typos and imports
* Fix lint errors
* Provisioning: better error support (#101490)
* update openapi snapshot
* fix build
* Provisioning: Only show setup page when feature toggles are missing (#101502)
* form fixing
* form fixing
* always send UID
* Same onboarding page regarless of migration (#101557)
* backend building... frontend still broken
* rename sync with main
* Provisioning: Update dashboard badge (#101599)
* Rename to push / pull everything user-facing (#101577)
* Rename to push / pull all everything user-facing
* Use automatic pulling wording
* Provisioning: Migrate when using unified storage (#101572)
* migrate when not unified
* Update pkg/registry/apis/provisioning/register.go
Co-authored-by: Roberto Jiménez Sánchez <roberto.jimenez@grafana.com>
* variables
* merge main
---------
Co-authored-by: Roberto Jiménez Sánchez <roberto.jimenez@grafana.com>
* Add tabs and features tab to listing page (#101570)
* List features in onboarding page (#101558)
* merge main
* POC/Provisioning: Check if the instance is provisioned (#101601)
* Check if the instance is provisioned
* Fix lints
* Fix getting config for new dashboard
* Fixes after merge
* More fixes
* Show success message
* Fix default value
* Add test
* Fix lints
* Provisioning: Include URLs in ResourceWrapper response (#101511)
* Convert Migrate wizard into a Connection Wizard (#101575)
* Convert Migrate wizard into a Connection Wizard
* Remove duplicate empty state
* Allow users to select target in the first step
* Remove file created by merge
* Select target based on existing connections
* Default option for targets and explainatory alert
* Do not display connect button if single connection
* Display target as tag in repository card
* Add Pull Step
* Fix linting
* User decides if migrate or connect
* Improve style based based on review
* Provisioning: Return upsert resource when writing (#101574)
* [Provisioning] Getting Started Page and Tab (#101701)
* merge main
* fix go.mod
* Provisioning: Redirect to the new URL after save (#101757)
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* POC/Provisioning: create folder (#101619)
* Add NewProvisionedFolderForm
* Cleanup
* Add folder api
* Register API
* Do not show provisioned badge for instances
* Enable saving
* Show saved alert
* Fixes
* Fix deps
* Cleanup
* Add test
* Add test
* Updates
* Fix test
* Fix import
* [Provisioning] Display instance connection directly in home (#101720)
* Show tabs directly in home page for instance sync
* Display actions also in the home page
* Add delete button to actions
* Fix issue with files tab
* Display tabs also in instant sync
* Generate connection name for instance sync
* Fix issues when no repositories
* Set active tab
* Remove leftover
* Rename component for listing folder repository
* Fix linting issues
* Fix merge error
* Rename to HomePage
* Split folder list into separate component
* Create own component for repository card
* Improve RepositoryCard readability
* Improve RepositoryCard styling
* Make view primary button
* Fix syntax
* Fix generateName
* merge main
* Provisioning: Move folder management into its own helper (#101864)
* folder
* update folder links
* Fix test
* update
* cleanup
---------
Co-authored-by: Clarity-89 <homes89@ukr.net>
* fixed folder issue
* POC/Provisioning: Create folder from root (#101921)
* Enable creating folder at the root
* Fix test
* Add interceptor
* Provisioning: Expose stats (#101927)
* [Provisioning] Unified onboarding wizard (#101952)
* Spike the solution
* More work
* Add more situations
* Attempt to display count of dashboards and folders
* Attempt with file count
* Do not display options if not possible
* Improve styling resources
* Use another API
* Fix issue with selection
* Style a bit
* Fix more issues
* Make the sync step work
* Improve links
* Use LinkButton
* Start pull automatically
* Start migration automatically
* Fix issue with options
* Fix issues
* Fix loading error
* Improve more things
* Improve styling
* Improve messaging
* Set the autofocus
* Fix some issues
* Fix issue with disabled options
* Only resources
* Finish settings depending on configuration
* Move title to wizard
* Fix title
* Improve styling
* Badge
* Explain on hover
* Improve styling
* Disabled at the bottom
* History & identifiers
* Improve wording
* Add padding left and right disable options
* Delete repository
* Improve buttons
* Give index time to catch up
* Improve buttons
* Handle steps with only forms
* Fix issue with initial migrate or pull
* Commit betterer
* Error messages
* Use memo
* Revampt that a bit
* Attempt to simplify the state and components
* Improve the component for Migrate
* Commit betterer
* Fix issue in next button
* Clean up more
* Start for boostrap step
* Fix issue with running status
* Fix issue with loading bootstrapping
* Improve loading
* Improve more the loading
* Fix issue with loading
* Empty tree
* Handle error
* Fix issue with looping
* Remove commented out lines
* Add comment
* Remove accidental file
* Fix imports
* Improve MigrateStep and PullStep
* Use hook for step status
* JobStep component
* Refactor data fetching
* Validate with Github
* Fix issue with failed error
* Fix next on success
* Address small comments
* Separate file for WizardContent
* Fix linting
* Use step approach also for bootstrap
* Make the logic for moving between steps clearer
* Fix navigation issue
* Clean up some logic
* Use useAsync for JobStep steps
* Revert "Use useAsync for JobStep steps"
This reverts commit 242a275cc9.
* Provisioning: use service to get counts (#101972)
counts
* must migrate when using legacy storage
* Revert "Revert "Use useAsync for JobStep steps""
This reverts commit a420d0ac36.
* Fix async conditions
* Organize imports
* Separate component for BootstrapOptionCard
* BootstrapOptionsList
* Remove duplicate definitions
---------
Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Merge
* Fix utils
* POC/Provisioning: Fix folder path for dashboard (#101997)
* Provisioning: Fix folder path for dashboards
* Fix isNew
* Update test
* Fix any error
* Betterer
* [Provisioning] Improve progress recording and updates (#102035)
* do not validate on delete
* Provisioning: Implement authorizer for remaining resources (#101945)
* feat: implement authorizer for remaining resources
* fix: don't allow viewers to write files
* security: harden blob id fetching
* add integration test for admin vs viewer
* feat: only Get is a valid verb for reads in our subresources
Co-Authored-By: Ryan McKinley <ryantxu@gmail.com>
* feat: allow render for all requests
* refactor: use guards
Not changing code that goes `if a { } else if b { } else { }` as the semantic meaning of the different branches is
easier to parse.
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* POC/Provisioning: Improve wizard setup (#102066)
* wizard actions
* workign better
* remove more memo
* show polling interval
* cleanup
* finalizers
* Update public/app/features/provisioning/Wizard/BootstrapStep.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/provisioning/Wizard/BootstrapStep.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/provisioning/Wizard/BootstrapStep.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/provisioning/Wizard/BootstrapStep.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/provisioning/Wizard/BootstrapStep.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/provisioning/Wizard/WizardContent.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/provisioning/Wizard/WizardContent.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/provisioning/Wizard/BootstrapStep.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* updates from alex
* updates from alex
* Simplify actions
* Extract props
* history supported form legacy only (for now)
* More refactor
* change order
* Fix cleanup finalizer
* show kinds
* fix lint
---------
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
* Fix resource condition (#102086)
* Fix job summary stats issue (#102084)
* merge main
* Repository link should point to configured branch (#102092)
* Add getRepoHref
* Fix random string generation
* Redirect to Home on repository deletion (#102096)
* Fix extra commas in pull request comment (#102108)
* Fix image rendering endpoint (#102107)
* POC/Provisioning: Support migrate... when starting with unified storage (#102097)
* use same clone
* now using upsert
* Fix lint
---------
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
* Clean up unprovisioned resources after unified storage migration (#102126)
* Clean up unprovisioned resources after migrate
* Clean up unprovisioned resources after migrate
* Update pkg/registry/apis/provisioning/jobs/migrate/resources.go
* Reset summary between export and pull (#102101)
* Reset summary between export and pull
* Add reset results to unified storage migration
* Provisioning: always dirty (#102151)
* fix test version
* log the watch line
* POC/Provisioning: Disable repository list watch (#102169)
* Disable watch for repo list endpoint
* Add comment
* Remove another watch
* Provisioning: Avoid calling test on every update (#102161)
test less often
* Provisioning: Support prefixes in GitHub repositories (#101969)
* feat: add a Prefix property to GitHub repo spec
* feat: make nested folders work properly
* feat: use subdir for go-git export
* fix: placeholder for prefix should be grafana/
* feat: rename prefix to path
* fix: json name should be path, too
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* chore: regen apis
* fix: copy 'path'
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Merge
* Fix duplicate type
* Provisioning: Test export functionality (#101336)
* Provisioning: Test export functionality
* fix: use context.Background
* test: add more cases for local repo path resolving
* test: rework test inputs
* test: try to make github test work
* fix: clear global state
* Update api client imports
* Fix import
* Fix test
* Update codegen
* Provisioning: Make it green (#102271)
* chore: remove unused functions
* chore: update betterer results
* chore: update openapi spec
* chore: yarn generate-apis
* fix: specify default false if undefined
* Use AnnoKeyManagerIdentity
* Add manager kind
* POC/Provisioning: Update component structure (#102297)
* Update project structure
* Update imports
* Remove unused components
* Copy fixes
* Typo
* More copy fixes
* Betterer
* Update test
* merge main
* Provisioning: Replace hardcoded clients with discovery client (#101918)
* disco client
* discovery client
* merge main
* merge main
* keep factory
* keep factory
* find preffered version for delete factory
* use same folders request
* merge main
* with integration test
* POC/Provisioning: Compare spec in test rather than raw JSON (#102352)
* compare spec not json
* compare spec not json
* [Provisioning] Add in-code TODOs in API Server area (#102360)
* Add TODOs for files endpoint
* Add TODO history endpoint
* Add TODO to move files logic to resource package
* Add TODO to not use private fields directly
* Remove unnecessary checks in list connector
* Add pagination TODO in lister
* Add TODO to rename resources
* Add todo about cloning too early
* Add TODO to propose to merge sync and migrate endpoints
* Add TODOs in register
* Add more TODOs in connectors & routes
* Add TODOs about prefix
* Change it to remove
* Update pkg/registry/apis/provisioning/test.go
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* POC/Provisioning: Switch folders to use managedBy (#102362)
* Folders: Switch to managedBy
* Fix create folder
* Fix tests
* Do not allow changing folder from dashboard settings
* Update imports
* Update provisioned meta
* Do not show provisioned badge for child folders
* Fix folder title
* Update folder actions
* Update new provisioned folder form
* Remove unused code
* Fix condition
* Reset default values on change
* Remove duplicate nav item
* Add managedBy to DashboardQueryResult
* Provisioning: support watch over live (in feature branch) (#102408)
* Provisioning: watch cleanup (#102424)
* fix lint
* Provisioning: Add basic usage stats (#102405)
* [Provisioning] Add limitations to Github Repository (#102451)
* Put limits to Github
* File is too large
* Move constants
* Embed ListOptions again
* Remove TODO
* Provisioning: Pick a better default title (#102516)
better title
* Provisioning: sanitize pull request urls (#102517)
* [Provisioning] Clean up clone after export and migrate (#102467)
* Remove clone directory on clone failure
* Defer remove clones
* Log error if removal fails
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* [Provisioning] Limit path length and depth in APIs (#102472)
* Limit filepath length in files API calls
* Add common utility to deal with paths
* Use the existing function
* Fix import
* Update pkg/registry/apis/provisioning/safepath/limit.go
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Fix issue after website commit
* Fix linting issue in test
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Add timeout, JSON check and max body size to endpoints (#102443)
* Add timeout, JSON check and max body size to endpoints
* Use http.MaxBytesReader instead
* Use MaxBytesReader also for reading the entire body
* Add empty line
* Add unit tests
* Fix integration tests
* Update pkg/registry/apis/provisioning/render.go
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Do not use utils :)
* Fix comment on unmarshalJSON
* 25MB for webhook events
* Remove content type check for files write
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* fix imports
* Provisioning: Remove export option from the UI (#102511)
* [Provisioning] Remove unused checkout method in go-git (#102460)
* [Provisioning] Limit max number of repositories to 10 (#102542)
* Limit to maximum 10 repositories in backend
* Change messaging
* Do not display connect button if more than 10
* Only fetch settings once
* watch repos
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* [Provisioning] Limit size and time to git clone and push in go-git (#102458)
* Limit git clone and push time and size
* Fix linting
* Use transport instead to limit
* Remove not supported
* Add TODO to make timeout configurable
* chore: make update-workspace
* Provisioning: Implement a new job queue (#102446)
* feat: implement a new job queue
Outstanding problems:
* Status isn't saved.
* Progress updates don't work (due to status not being saved probably?).
* feat: properly save status
* chore: document label
* chore: assumptions do hold
* fix: support multi-tenant job drivers
* fix: use namespace=*
* fix: set resource back to pointer when updating job progress
If we don't do this, we start rejecting job progress updates as the version falls out of sync.
* feat: make job APIs read-only
* fix: complete job when worker returns
* fix: set namespace on requests from controller
* test: check historic jobs
* chore: regen apis
* feat: start augmenting frontend
* feat: add jobs to authorizer
* feat: use watch from input
* fix: make frontend subscribe to historic jobs
* fix: lint
* chore: yarn prettier:write
* fix: frontend lints
* test: allow for empty state in historicjobs
* test: set content type for export request
* fix: always set job name on insert
* fix: import
* fix: use dashes not colons
* fix: job status should expect a historic job transition
* fix: allow PR jobs from multiple PRs
* feat: same name for sync and migrate jobs
* feat: generate a job name in the store
* refactor: rename to persistentStore
* feat: remove status subresources on jobs
* feat: join jobs into one card
* chore: regen openapi snapshot
---------
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
* Provisioning: Use a complete storage for jobs (#102605)
* feat: add a complete strategy to apiserver
* feat: use the complete storage strategy for jobs
* test: behaviour changed in main
* [Provisioning] Consolidate file path handling (#102617)
* Add more cases for validation
* Call the method dir
* Clean files endpoint
* Simplify further
* Fix issues with folder
* Add Dir function
* Use walk function in folders
* Move things from ID
* Fix some tests
* Add tree
* Sync worker and changes
* Add more TODOs
* Add normal join
* Remove things in local
* Consolidate single Join
* Call it safe
* Add new IsPathSupported action
* Move the depth to resources
* Add more cases
* Improve trie implementation
* Add tests trie
* Fix trie tests
* Improve trie tests
* Add tests for walk
* Fix linting
* Add unit tests filepath
* Remove TODO
* Remove another TODO
* Unsupported file extension error
* Add documentation for IsPathSupported
* Filepath unit tests
* Use safepath to validate github path
* Remove TODO in wrapper
* Use trailing slash in folder internal object
* Fix changes test
* Include dot
* Add TODO to explore own type for path
* Fix frontend lint
* Fix unit tests
* Fix provisioning integration tests
---------
Co-authored-by: Roberto Jiménez Sánchez <roberto.jimenez@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
When querying metric data (non-table data) with SQL Expressions, we need to convert the data to table format. This is alternative format which does not have the same issues with sparse data.
There is now a __metric_name__ column and one __value__ column. Also a __display_name__ column if there is DisplayNameFromDS metadata.
---------
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
* feat(datasource/Tempo): Report timerange to Rudderstack
This adds another parameter to the Rudderstack instrumentation,
reporting the query time range in seconds.
Signed-off-by: Alex Bikfalvi <alex.bikfalvi@grafana.com>
* Update public/app/plugins/datasource/tempo/datasource.ts
Co-authored-by: Andre Pereira <adrapereira@gmail.com>
* Update public/app/plugins/datasource/tempo/datasource.ts
---------
Signed-off-by: Alex Bikfalvi <alex.bikfalvi@grafana.com>
Co-authored-by: Andre Pereira <adrapereira@gmail.com>
This is directory which stores Go modules with pinned buildable package that is used within this repository, managed by https://github.com/bwplotka/bingo.
* Run `bingo get` to install all tools having each own module file in this directory.
* Run `bingo get <tool>` to install <tool> that have own module file in this directory.
* For Makefile: Make sure to put `include .bingo/Variables.mk` in your Makefile, then use $(<upper case tool name>) variable where <tool> is the .bingo/<tool>.mod.
* For shell: Run `source .bingo/variables.env` to source all environment variable for each tool.
* For go: Import `.bingo/variables.go` to for variable names.
* See https://github.com/bwplotka/bingo or -h on how to add, remove or change binaries dependencies.
- Run `bingo get` to install all tools having each own module file in this directory.
- Run `bingo get <tool>` to install <tool> that have own module file in this directory.
- For Makefile: Make sure to put `include .bingo/Variables.mk` in your Makefile, then use $(<upper case tool name>) variable where <tool> is the .bingo/<tool>.mod.
- For shell: Run `source .bingo/variables.env` to source all environment variable for each tool.
- For go: Import `.bingo/variables.go` to for variable names.
- See https://github.com/bwplotka/bingo or -h on how to add, remove or change binaries dependencies.
# This workflow depends on the ./actionlint-format.txt file. It is MIT licensed (thanks, rhysd!): https://github.com/rhysd/actionlint/blob/2ab3a12c7848f6c15faca9a92612ef4261d0e370/testdata/format/sarif_template.txt
# "The comma-separated list of experimental checks that should be executed. By default, all experimental checks are turned off. Possible values: notowned,avoid-shadowing"
experimental_checks:"notowned,avoid-shadowing"
# The repository path in which CODEOWNERS file should be validated."
repository_path:"."
@@ -35,4 +41,4 @@ jobs:
owner_checker_allow_unowned_patterns:"false"
# Specifies whether only teams are allowed as owners of files.
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name:"CodeQL"
name:"CodeQL checks"
on:
workflow_dispatch:
push:
branches:[main, v*.*.*]
branches:['**']# run on all branches
paths-ignore:
- '**/*.cue'
- '**/*.json'
- '**/*.md'
- '**/*.txt'
- '**/*.yml'
- pkg/storage/unified/sql/db/dbimpl/db.go# Ignoring warnings on the whole file for now while inline comments is not supported in Go (https://github.com/github/codeql/issues/11427)
schedule:
- cron:'0 4 * * 6'
@@ -25,14 +26,16 @@ jobs:
analyze:
name:Analyze
runs-on:ubuntu-latest
continue-on-error:true# doesn't block PRs from being merged if this fails
if:github.repository == 'grafana/grafana'
strategy:
fail-fast:false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
name:When epic issues changed in Platform UX squad projects, check if epic is part of specified child projects and update on Platform UX parent project
extract_error_message='::error::Extraction failed. Make sure that you have no dynamic translation phrases, such as "t(`preferences.theme.{themeID}`, themeName)" and that no translation key is used twice. Search the output for '[warning]' to find the offending file.'
make i18n-extract || (echo "${extract_error_message}" && false)
- run:|
uncommited_error_message="::error::Translation extraction has not been committed. Please run 'make i18n-extract', commit the changes and push again."
file_diff=$(git diff --dirstat public/locales)
if [ -n "$file_diff" ]; then
echo $file_diff
echo "${uncommited_error_message}"
exit 1
fi
- uses:actions/checkout@v4
with:
persist-credentials:true# required to get more history in the changed-files action
fetch-depth:2
- name:Detect changes
id:detect-changes
uses:./.github/actions/change-detection
with:
self:.github/workflows/frontend-lint.yml
lint-frontend-prettier:
name:Prettier
needs:detect-changes
permissions:
contents:read
id-token:write
# Run this workflow only for PRs from forks; if it gets merged into `main` or `release-*`,
# the `lint-frontend-prettier-enterprise` workflow will run instead
description: 'The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example:7.4.3,7.4.3-preview or 7.4.3-preview1'
# We need "write" permissions on the PR to be able to add a label.
pull_request_target: # zizmor:ignore[dangerous-triggers] We need this to have labelling permissions. There are no user inputs here, so we should be fine.
types:
- opened
permissions:{}
jobs:
label-if-external:
name:Add 'pr/external' label if the PR is external
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.