* CI: Make notify-pr workflow optional (#113896)
* CI: Make notify-pr workflow optional
* also set repo to the current repo
* fix find-pr
(cherry picked from commit d92cb9f7a6)
(cherry picked from commit 3b345a99bc)
* CI: Continue notify even on error
(cherry picked from commit 2e33b077f1)
* CI: Fix release-build bug; github.repository includes org (#113909)
* CI: Fix release-build bug; github.repository includes org
* set pipefail
* fix notify in release-build; this step should fail if it actually fails
(cherry picked from commit 9376d569cc)
* CI: release-build.yml missing pipe (#113915)
(cherry picked from commit 92ef1c4942)
SCIM: Upgrade the User.UID field to allow for the new scim- prefix (#113500)
Upgrade the User.UID field to allow for the new scim- prefix
(cherry picked from commit ca5d898120)
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
PublicDashboards: Dont call API on dashboard page if public dashboards is disabled (#113273)
(cherry picked from commit 452fc04d1d)
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
CI: Windows builds with CGO cross-compiler toolchain (#112922)
* CI: Windows builds with CGO cross-compiler toolchain
* fix comments
(cherry picked from commit e7a49fc472)
* pkg/build: Add nocgo option (#112834)
Add nocgo option
(cherry picked from commit 2a0f149a63)
* CI: release windows no cgo (#112870)
* fix nocgo option
* set nocgo for windows and darwin
(cherry picked from commit 6b2b9bd7c2)
Alerting: Fix unmarshalling of GettableStatus to include time intervals (#112602)
* move test files into test-data
* add test for the bug
* populate time-intervals of gettableStatus config
(cherry picked from commit 5f9a51418c)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* Auth: Fix render user OAuth passthrough (#111636)
* devenv: fix volumes section when sources don't contain one
* wip
* Working correctly with improvedExternalSessionHandling on
* Remove not needed lines
* Working with the old flow, tests
* Handle compatibility with the feature toggle, tests wip
* Tests
* Cleanup
* Address feedback
* Align tests
* Add comment
* Fix issue with session removal after the invalidation of tokens
* Remove commented out code
* clean up
(cherry picked from commit 53f4803e98)
* Skip gocyclo for TestIntegration_GetCurrentOAuthToken
DOCS: Amazon CloudWatch data source docs revmp (#109945)
* started new configure doc
* updates to the configure doc
* worked on variables doc
* made edits
* query editor edits
* query editor updates
* continued with updates
* added updates
* additional updates, rewrite of auth doc
* finished query editor updates
* cleaned up the intro doc, added ref URIs to other docs
* some final edits
* more edits prior to PR creation
* ran prettier, added a screenshot
* linter fixes
* updates based on questions doc
* ran prettier
* updates based on feedback
* made more edits based on feedback
* more updates based on feedback
* updates based on feedback
* moved alerting under logs
* ran prettier
(cherry picked from commit 725a91e9eb)
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
* Backport npm publishing workflow from main
* Ignore false-cjs in validate-npm-packages
(cherry picked from commit 6916b39439)
* Ignore untyped-resolutions for grafana-i18n in validate-npm-packages
Plugins: Dependencies do not inherit parent URL for preinstall (#111762)
dependencies dont inehrit parent url for preinstall
(cherry picked from commit 073338ec29)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Annotations: avoid IN on getAccessControlFilter if dashboardUID is present (#111213)
Annotations: avoid IN on getAccessControlFilter
(cherry picked from commit 975ba0bf8b)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: maicon <maiconscosta@gmail.com>
Docs: Fix broken links in SAML docs (#111039)
* Rename this heading to match the link in 'Request Initiation'
* Fix link to 'Configure SAML using the Grafana configuration file' and make the link text match
(cherry picked from commit 004f30fcb7)
Add index IDX_folder_org_id_parent_uid_uid (#110131)
* Add index IDX_folder_org_id_parent_uid
* Force index on Dashboard Permission Filter (MYSQL)
---------
(cherry picked from commit cfe73925cd)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: maicon <maiconscosta@gmail.com>
Add permission role_id action index (#110125)
* Add permission role_id action index
* Drop permission role_id index
---------
(cherry picked from commit 99fc606e17)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: maicon <maiconscosta@gmail.com>
Fix: Fix redirection after login when Grafana is served from subpath (#110889)
Fix short link (/goto) redirection when Grafana is served from subpath
(cherry picked from commit ccc87a03f0)
LDAP: Restore test user mapping functionality (#110841)
* Migrate LdapPage from connect() to React-Redux hooks
* Convert LDAP debug page into a drawer and hook it into settings
* prettier
* Use the Text component and make the input and button look like they do on the main settings page.
* Bring back isLoading and put in a LoadingPlaceholder
* i18n-extract
* rejigger
* linter fix
(cherry picked from commit 585b53bc7d)
Co-authored-by: John Troy <jtroy@users.noreply.github.com>
CloudWatch: Use default region when query region is unset (#109089)
CloudWatch: use default region when region is unset
(cherry picked from commit 5f4097a159)
Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
Alerting: Fix bug where rules with identical mute/active intervals produced conflicting routes (#110935)
Alerting: Fix hash collision in NotificationSettings fingerprint
(cherry picked from commit fc3636acf2)
Co-authored-by: Alexander Akhmetov <me@alx.cx>
Fix link to site which is no longer relevant (#110214)
Fix link to abandoned web page
Wikipedia isn't likely to get hijacked in the same way.
(cherry picked from commit 17f6b31e8c)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Recording rule fields were not being copied correctly when duplicating an alert rule. This manifests as missing `TargetDataSourceUID` fields from the `Record` part of the rule when rules in a group are re-ordered.
Added some additional tests to ensure we cover the generation of recording rules in tests and fixed the copying logic to ensure all fields are copied correctly.
(cherry picked from commit c73b3ccf6e)
[DOC] Tempo DS: Clone a provisioned data source doc (#110114)
* Tempo DS: Clone a provisioned data source doc
* Chagnes from prettier
* Update docs/sources/datasources/tempo/configure-tempo-data-source.md
# Conflicts:
# docs/sources/datasources/tempo/configure-tempo-data-source.md
Dashboard: Resume tracking changes after save from JSON model page (#109607)
(cherry picked from commit e285cc2ddc)
Co-authored-by: Bogdan Matei <bogdan.matei@grafana.com>
Alerting: Fix subpath handling in the alerting package (#109448)
Take subpath into account when building contact points APIs URL
(cherry picked from commit a0cf529465)
Config: Fix date_formats options being moved to a different section (#109339)
* Config: Fix date_formats options being moved to a different section
* fix builder cache key
(cherry picked from commit 0069d112fc)
Docs: MSSQL data source overhaul (#107478)
* created config doc
* updated the config doc
* updates to the configure doc
* updates to configure doc
* updated the templates doc
* more query editor edits
* final edit on templates doc
* final query editor edits and new screenshots
* added tables to configure
* final edits
* final edits
* final edits
* added admonition and updates based on feedback
* ran prettier
(cherry picked from commit 0cc636665a)
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
MySQL documentation major improvements (#107690)
* added keywords and fixed description
* Update (dateColumn) description
* Mount docs from the current repository
* Clean up variables
* Improve timeFilter and timeGroup macro description
* Fix timefilter macro example formatting
* Fix time macro example formatting
* Remove extra spaces from timefilter macro example
* Introduce new table and Add examples for time, timeFilter and timeGroup Macros
* Improve existing examples of timeGroupAlias Macro
* Remove data frame description
* fixed the homepage with valid links
* Add Table Panel results for Macros
* fixed and define the configuration part for grafana mysql user
* fixed port typo
* remove the sqlDatasourceDatabaseSelection based https://github.com/grafana/grafana/issues/105232
* added annotation single tag example
* Change format type
* fix minor typos and run prettier
* Address Macros specific changes
* Revert column name and replace URL with version substitution
* re-added the text for the feature flag
* revert back the changes for the grafana mysql usage
* fixed links as per writers toolkit guide
* run prettier
* Update docs/sources/datasources/mysql/query-editor/_index.md
thanks
---------
(cherry picked from commit f7f8a52bda)
Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com>
Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>
Co-authored-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Alerting: Document Mimir compatibility for Prometheus conversion API endpoints (#108741)
Document Mimir compatibility for Prometheus conversion API endpoints
(cherry picked from commit 412704c9de)
Co-authored-by: Alexander Akhmetov <me@alx.cx>
Transformations: Rename Regression Analysis to Trendline (#108631)
* Rename regression analysis transformation
* fix a couple translations
* remove extra word
* Fix tests
* Change frame name to use regression
(cherry picked from commit ffb8f4ea0c)
Alerting: Add rule group name validation to the Prometheus conversion API (#108740)
Alerting: Add rule group name validation to the conversion API
(cherry picked from commit f969eb0277)
Co-authored-by: Alexander Akhmetov <me@alx.cx>
* Folders: disable TestIntegrationFoldersGetAPIEndpointK8S
it's breaking the enteprise CI pipeline
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Run only against sqlite
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* noop: force backend change
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* PoC: check if testing.Short is called from integration tests only.
* Rename helper function.
* Fix logic.
* Remove skipping of integration tests from non-integration tests.
* Remove skipping of integration tests from non-integration tests.
* Fix import.
* Secrets: make operations sync
* k8s gen / update query to list secure values to include the version
* always store new version of a secret
* make update-workspace
* go mod tidy
* update queries
* update queries
* improve and use testutils in decrypt_store_test
* fix broken test
* make update-workspace
* ./hack/update-codegen.sh secret
* update Test_SecureValueMetadataStorage_CreateAndRead
* undo dependency changes
* linter: fix remaining errors
---------
Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
* Bump nanogit 2025-07-09
This version contains significant performance improvements in memory and
CPU thanks to optimizing buffers, using a faster zlib library and using
streaming instead of loading everything in memory.
* feat(plugin-configs): update configs to work with nodes strip-types feature
* build(parca): use nodes experimental-strip-types so build works with node 22 - 24
* build(decoupled-plugins): support nodes strip types feature for webpack builds
* build(e2e-test-plugins): update build scripts and config to work with node strip types
* style(plugin-configs): fix import/order lint errors
* refactor(plugins): use allowImportingTsExtensions in favour of ts-ignore comments
* refactor(plugin-configs): clean up ts-ignore and ts-expect-error comments in webpack.config
* refactor(plugin-configs): fix up changes for nodes strip-types flag
* chore(loki): fix up build command for node 24 support
* feat: reconfigure expression button for improved UX
* chore: fix broken test
* chore: refactor to use improved UX + combine another UI PR.
* chore: i18n
* chore: memoize options + add data test ids for tracking
* chore: common component for expression dropdown
* chore: streamline common component
* chore: add event tracking
* chore: put event tracking in its own PR
* v2 of pills for tables
* cleanup bettererrrrr
* cleanup pretty
* i18n changes
* add in the option for value mapping
* value mapping
* change to just use the value mapping from the table component
* tests fixed
* betterer all better now
* fix pretty
* i18n
* fix gen issue
* i18n
* fix merge issue
* Refactor pillcell to an interface for said pill, cleanup tests
* mind the space says prettier
* Update dependency chance to v1.1.13
* use same version of chance everywhere
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: joshhunt <josh.hunt@grafana.com>
* Folders: reenable unit test TestFoldersCreateAPIEndpointK8S
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* reenable unit test TestFoldersGetAPIEndpointK8S
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Add access token as third source for user info extraction
- Add extractFromAccessToken method to extract user info from JWT access tokens
- Mutualize code by creating parseUserInfoFromJSON helper method
- Rename methods for clarity: extractFromToken -> extractFromIDToken, retrieveRawIDToken -> retrieveRawJWTPayload
- Update test suite to include comprehensive access token retrieval scenarios
- Support three sources in priority order: ID token, API response, access token
- Maintain backward compatibility while adding new functionality
* Update Generic OAuth documentation to reflect access token support
- Add access token as a third source for user information extraction
- Update configuration sections to mention access tokens alongside ID tokens and UserInfo endpoint
- Document the priority order: ID token → UserInfo endpoint → access token
- Update configuration option descriptions to reflect new functionality
- Maintain consistency with implementation changes
* Refactor access token test cases to use parameter instead of hardcoded logic
- Add AccessToken field to test case struct for explicit access token specification
- Remove hardcoded string matching logic that determined access token based on test name
- Update all access token test cases to include the AccessToken field with appropriate JWT values
- Improve test maintainability and clarity by making access tokens explicit parameters
- Remove unused strings import that was only needed for the hardcoded logic
* fix doc lint
* reduce cyclomatic complexity
* Use panel.id from the dashboard to filter alterts properly
* add unit test
* Fix linting
* add fix back
* fix betterer in test, use same pattern as DashboardDatasourceBehaviour
* Dashboard: Add ability to search by folder name in library panels
* restore to main to fix linting issues
* restore from main to avoid go linting issues
* add logic to the writers.go that search by folder title if folder is not passed
* add missing left joing from the folder table
* Add extra logic to prevent folder searches without permission
* fix go linting issue about memory
* Add test when searching by folder name
* Refactor tests to include a bit more validation
* apply feedback and use SearchFolder from search folder service
* clean up comments
* Update pkg/services/libraryelements/database.go
Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
* Fix logic of early return
* Extract into a function and remove the left join
* Apply feedback to be aligned with idiomatic go
* Apply suggestion from @evictorero
Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
* fix liting
---------
Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
* Tidy up storybook a little bit
* change sort order, delete some stories
* More tidy up of actions
* More tidy up of actions
* tweak story sorting, again
* Make all internal stories public
* fix sort
* Add ESLint rule to enforce storybook titles
* update verify storybook test
* simplify glob
* BrowseDashboardsPage: added ProvisionedFolderPreviewBanner to display new provisioned folder on branch alert
* add comment
* fix test
* i18n
* Added test for PreviewBannerViewPR
* fix test, i18n fix
* PublicDashboards: Use API to render public dashboard badge
* i18n
* Keine console bitte
* Update public/app/features/dashboard-scene/scene/NavToolbarActions.tsx
* Update tests
* Update dependency react-calendar to v6
* add esmodules to jest config
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Update dependency marked to v16
* mark marked as esmodule for jest
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* introduce ExtraConfigsCrypto
* delete getLastConfiguration and move all code into method Get
* update legacy store to encrypt ExtraConfigs same way we do in MultiOrgAlertmanager
* update legacy store init
* delete PersistConfig
* remove unnecessary unmarshalling
* add better error
* add tests for legacy store
* add tests that cover extra config validation
* add integration test for conflicting routes
---------
Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* mark up and add confirmText to lint rule
* mark up and add ariaLabel to lint rule
* add confirmText to propertiesToCheck
* mark up and add body to propsToCheck
* mark up latest
* mark up 'Dashboard saved'
* mark up filterbyvalue options
* mark up tooltip options
* mark up and add lint rules for noOptionsMessage/loadingMessage
* mark up 'Convert field type'
* mark up placeholderText/noOptionsMessage
* mark up run query
* mark up variable editor fields
* mark up week start options
* mark up dashboard link options
* mark up prom options
* mark up builder/code toggles
* make CI happy
* kick CI
* fix(plugin_loader): don't import an app plugin twice
* review: extract IIFE to a separate function (async part of plugin loading)
* fix: remove code for testing
* feat(grafana-data): expose PluginContext
This is aimed to be used in the `PluginErrorBoundary` (which is a class component, and cannot use the hook.)
* feat(PluginErrorBoundary): add an error boundary for plugins
* feat(ExtensionsErrorBoundary): add an error boundary for extensions)
* feat(Extensions/Utils): wrap components with error boundaries
* feat(Plugins): wrap root plugin page with an error boundary
* fix: Fallback component should always be visible for onClick() modals
* review: use object arguments instead of positional ones for `renderWithPluginContext()`
* review: update `wrapWithPluginContext()` to receive args as an object
* refactor(AppChromeExtensionPoint): remove the error boundary
We have an error boundary on the extensions-framework level now
* refactor(ExtensionSidebar): remove the ErrorBoundary from the extensions
This is handled on the extensions-framework level now.
* test(ExtensionSidebar): add tests
* chore: translation extraction
* chore: prettier formatting
* fix(PluginErrorBoundary): remove unnecessary type casting
* compare dashboard updated at while fetching
* test added
* added created field in dashboard dto meta object for k8s api. fixed cache updation check
* code refactor
* code formatting with prettier
* added created at field in DashboardPageProxy.test.tsx
* wip
* Add working actions for GMA rules based on Prom-only API
* Remove Ruler-loader related code for Grafana rules
Co-authored-by: Sonia Augilar <sonia.aguilar@grafana.com>
* Remove outdated tests
* add some comments
* remove commented code
* remove showLocation property
* Add missing mocks in tests
* Add showLocation to GrafanaRuleListItem, improve useAbilities, address PR feedback
* Enhance GrafanaGroupLoader tests: Add permission checks and More button functionality
- Introduced user permission grants for alerting actions in tests.
- Added tests for rendering the More button with action menu options.
- Verified that each rule has its own action buttons and handles permissions correctly.
- Ensured the edit button is not rendered when user lacks edit permissions.
- Confirmed the correct menu actions are displayed when the More button is clicked.
* Update translations
---------
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
Co-authored-by: Sonia Augilar <sonia.aguilar@grafana.com>
* Add scopes to queries in DataSourceWithBackend
* Remove Prometheus-specific solution
* Readd prometheus support
* move scopes reordering ti loki ds
* Add tests and logQLScope feature flag
* Move featureToggles to before/after each
* Remove irrelevant file change
* wip
* Use serviceaccount model from /apps/iam
* revert version update
* Add tembinding, userteam, other improvements
* Change serviceaccounttoken spec
* Revert the change of ServiceAccountToken
* Revert the change of UserTeam
* Clean up
* Remove files that are not needed for now
* Lint
* Update sql query's integration tests
* Fix tests
* update openapi spec
* Move LastSeenAt to the annotations
* Updte openapi_snapshots
* Change lastSeenAt annotation name
* TableNG: wrapped header text option
* reorganize variable names and code for easier reuse
* refine height math
* move empty string check to after null check
* add tests for useHeaderHeight
* maybe a bit faster
* cleanup to avoid creating fns and objects all the time, some tests
* fix unit test
* cell was using panel height
* add borders between header cells to make resizing more obvious
* fix tests
* changes from mob review
* jk
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* wip: trying to understand how to get the ds info from migrator
* add datasource info provider
* Use DS service to fetch DS data
* add more tests cases to match with migrator cases
* Add snapshots
* Non-existing DS
* Add different DS for snapshots
* fix import
* Fix tests: guard against double initialization
* don't use full datasource package in test
* min version should be 35
* fix test
* fix conversion test
* Dashboards: Support schemaVersion v35 migration in backend
* Dashboards: Support schemaVersion v34 migration in backend
* Dashboards: Support schemaVersion v33 migration in backend
* Apply suggestions from code review
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* Apply feedback
* Remove unused parameters
* Refactor to follow Go patterns
* Update logic
* Only write final migration result as output
* Compare backend and frontend results
* Improve snapshots to cover all possible use cases
* Linter
* wip make it consistent v33
* apply feedback
* Return default when the ref cannot be found
* Update apps/dashboard/pkg/migration/schemaversion/v33.go
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* apply feedback
* Use same mocks backend/frontend
* restore migrations
* update snapshots
* Adapt migration tests to use min versions
* Ensure v40-v41 works
* Ensure v39-v40 works
* Simplify the naming of the files
* adjust jest to new input convention
* Ensure every migration v36-v41 works
* Improve v38 naming
* Ensure v36 migrates correctly
* Skip v36 refs migrations on rows
* Treat rows as frontend and ensure same results for v36
* Ensure v34 runs with the same logic than the frontend
* Leave empty stadistics as valid option
* ensure v33 is working as the frontend
* Update tests
* Undo frontend changes for legend handling
* Remove filtering by version in the frontend
* linter
* Clean up v33 input JSON
---------
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* Remove dbProviderFunc function.
This removes one extra indirection that made the code bit more difficult to navigate.
* Remove indirection function types implementing single-method interfaces.
This streamlines the code and makes it bit easier to navigate.
* Update pkg/storage/unified/sql/sqltemplate/dialect_mysql.go
Co-authored-by: Mustafa Sencer Özcan <32759850+mustafasencer@users.noreply.github.com>
---------
Co-authored-by: Mustafa Sencer Özcan <32759850+mustafasencer@users.noreply.github.com>
* Add more unit tests to cover dashboardv2 and cross version unmarshalling
Signed-off-by: Bruno Abrantes <bruno@brunoabrantes.com>
* Change import name of meta v1
* Rename TestLargeDashboardSupport since there are tests for multiple versions
* Simplify TestLargeDashboardSupportV2
* Use v1 in TestLargeDashboardSupportCrossVersion, simplify original dash
* Marshal spec in TestLargeDashboardSupportCrossVersion
* Remove TestLargeDashboardSupportCrossVersion
---------
Signed-off-by: Bruno Abrantes <bruno@brunoabrantes.com>
Co-authored-by: Bruno Abrantes <bruno@brunoabrantes.com>
* Alerting: Fix notification policy conflicts originating from provenance mismatch
Sometimes the provenance field on the notification policy route can mismatch with the actual provenance in the provenance store.
This leads to 409s when trying to update the notification policy via the k8s apis.
We avoid this by ignoring the provenance field when calculating the fingerprint.
Co-authored-by: Matt Jacobson <matthew.jacobson@grafana.com>
* fix tests which validate stability
---------
Co-authored-by: Matt Jacobson <matthew.jacobson@grafana.com>
* Zanzana: Add detailed instructions for running and instrumenting
* Running Zanzana standalone server WIP
* Describe how to run zanzana server
* Fix readme link
* Update cli info
* update how to run postgres
* LogLine: remove new lines in unwrapped mode
* Displayed fields: fix displayed fields when the body is included
* LogLine: prevent overflows from extremely long lines with incorrect width measurement
* Update tests
* virtualization: test calculateFieldDimensions
* getGridTemplateColumns: consider displayed fields to set the grid sizes
* LogList: hide overflowing fields in unwrapped mode
* processing: extract regex
* LogLine: improve hover and selected state
* virtualization: strip ansi color codes for measurement
* Update tests
* LogLine: improve log line pre-resize state
* Revert "LogLine: improve log line pre-resize state"
This reverts commit a6b4ddded5.
* LogLine: improve hover/active color
* 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
* add generated tags to wire
* add enterprise wire gen target to makefile
* make gen-go invoke enterprise
* change go:generate command
* handle empty genTags properly
* update golden files for wire
* use build tag for swagger generator
* fix comments
* Plugins: Fix and encode invalid gRPC header values
* Rename the method
* Run sanitizeHTTPHeaderValueForGRPC only if string includes utf8
* Update test
* Simplify
* Update
* do not double encode encoded characters
* Update test
* Update
* Add test case based on review
* Update test
* Fix organization deletion error messages
- Improve error message clarity when attempting to delete active organization
- Fix incorrect 'Failed to update organization' message to 'Failed to delete organization'
- Update comment to be more precise about the check being performed
Fixes#92792
* Improve error handling in organization deletion service
- Add contextual error message when dashboard deletion fails during org deletion
- Include organization ID in error message for better debugging
- Import fmt package for error formatting
This helps administrators understand which specific organization failed
during the deletion process when dashboard cleanup encounters issues.
* Fix typo in unified resource access error message
Change 'Namespace missmatch' to 'Namespace mismatch' for correct spelling.
* Plugins: adds basic PopupExtension point
* Simplify the extension point.
* Excluding the app chrome extension to be rendered on login/signup pages.
* Added feature toggle to be able to disable the app chrome extensions.
* Adding an error boundary around the extension point.
* Changed the way we use the feature toggle.
* moved to use the helper function instead of filtering.
* removed duplace info.
* chore: remove leftover useMemo
---------
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* automatically rename integration tests to follow the common convention
* name tests differently
* alter column type to bigint
* update another column to bigint
* add another alter
* fix subquery for mysql
* Add ofrep pkg
* api server: Use namespace from request in case user is not authenticated
* Add handlers to ofrep api builder
* Add NewOpenFeatureService to initialize mt apiserver
* allow specifying CA and insecure
* Compare namespace with eval ctx stackID
* Organize ofrep package
* Implement AllowedV0Alpha1Resources
* Revert folderimpl changes
* Handle default namespace
* Fix extracting stack id from eval ctx
* Add more logs
* Update pkg/registry/apis/ofrep/register.go
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* Update pkg/registry/apis/ofrep/register.go
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* Apply review feedback
* Replace contexthandler with types
* Fix identifying authed request
* Refactor checks in the handlers
* Remove anonymous from isAuthenticatedRequest check
---------
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Gabriel Mabille <gabriel.mabille@grafana.com>
Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* fix: use fieldConfig.defaults.noValue in barchart and statetimeline
* change name of test
* remove todo comment
* lean on PanelDataErrorView in the case where no fields are present
* update StateTimeline and StatusHistory to use PanelDataErrorView
* fix test
* self-review cleanup
* WIP
* Update yarn.lock
* Align uuid dependency
* Add e2e test and update
* Update cue version
* Fix lint
* Update snapshot test
* Fix test that was importing from coupled module
* Fix lint
* Update public/app/plugins/datasource/loki/package.json
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Add max count config for indexing
* Build empty index when max count is exceeded
* Address linting
* Refactor buildIndexes
* Add test for max count threshold
* Update test doc comments
* Refactor TestBuildIndexes_MaxCountThreshold to not use mock framework
* Rename mocks used in TestBuildIndexes_MaxCountThreshold
* Refactor mockResourceIndex
* Test setting of indexing threshold configs
* Tweak comments, log
* Fix logging in buildEmptyIndex
* Export and reuse TestDocumentBuilderSupplier
* Reuse MockResourceIndex
* Restore dashboards: Enable search and filtering
* Remove sorting
* Configurable sort
* Move cache to a separate file
* Get tags
* Reset cache on delete
* Use store
* Add sort
* Use fuzzyFind for search
* Move fuzzy search to grafana/data
* Move @leeoniya/ufuzzy package
* Use the new util
* Improve sort
* Error handling
* IAM: Register CoreRole apis
* one line store instantiation
* Small refactor for readability
* Add authorizer for CoreRole
* Nit
* Error strings should not end with punctiation
* Account for error
* Switch to use the local resource client
* error should not start with upper casing
* noopStorageErr should have a name starting with err
* Update workspace
* I don't know why I don't have the same output as the CI 🤷
* Dependency xOwnership
* imports
* Import order
* Rename alias to make it clear this is legacy
* add flag for running zanzana server insecurely
* Only allow insecure connections in dev environment
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
---------
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* InfluxDB: Add an optional time range filter for tag queries in the query panel autocomplete
* Betterer updates
* Update test
---------
Co-authored-by: Nikolay Tsvetkov <nikolay.cvetkov@gmail.com>
* CI: Remove concurrency from release-build.yml
* CI: Remove concurrency from release-build.yml
* remove artifacts-list publish because it is already being published
Bump Nanogit
This version includes multiple fixes:
- Properly parsing side-band errors.
- Handle multiple matches in GetRef .
- Properly sort tree entries with folders based on git specification.
* grpc: wrapContext should not replace existing metadata, but append to it.
* Add test for wrapContext if there's no previous metadata.
* Rename encodeIdentityInMetadata to encodeIdentityInMetadataPairs
* fix: mark apps as preloaded after being preloaded
* move marking as preloaded into `preload`
* add tests
* refactor: make it reuse promises of already loaded plugins
* fix: review notes
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* apiserver/folders: use exact match on GetFolderByTitle in legacy
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* dispatch GE release build when this one is triggered
* Add publish-artifact workflow
* workflow_call is its own job
* add needs section in publish
* fix workflow reference
* fix permissions
* Use pattern arg instead of name
* fix artifacts path
* log in to docker hub in build job
* remove duplicate key
* bucket_path -> bucket-path
* remove 'parent' input
* PATH -> ARTIFACT_PATH
* use find instead of rsync
* set min/maxdepth
* use cp -r
* Add publish-artifact.yml to CODEOWNERS
* refer to the workflow on main specifically
* fix: increase login_attempt.ip_address column length for IPv6 support
- Expand ip_address column from VARCHAR(30) to VARCHAR(50) to accommodate IPv6 addresses
- Add database migration with support for PostgreSQL, MySQL, and SQLite
- Add comprehensive integration tests for various IPv6 address formats
- Resolves 500 errors when login fails over IPv6, now returns proper 401 errors
Fixes#106362
* test: add missing test skip to TestIntegrationIPv6AddressSupport
Skip integration test when running with -short flag to separate unit and integration tests
* Update pkg/services/sqlstore/migrations/login_attempt_mig.go
Co-authored-by: Victor Cinaglia <victor@grafana.com>
* fix missing bracket
* fix: resolve PostgreSQL timestamp overflow in IPv6 test
- Use controlled time mock instead of time.Now() to avoid timestamp conversion issues
- Follow existing test patterns with xormStore and mock time functions
- Add proper Since parameter to GetIPLoginAttemptCount query
- Fixes PostgreSQL error: 'pq: value "-62135596800" is out of range for type integer'
* fix: resolve PostgreSQL UTF-8 encoding error in IPv6 test
Replace string(rune(i)) with fmt.Sprintf to avoid null bytes (0x00)
when i=0, which caused 'invalid byte sequence for encoding UTF8' error
---------
Co-authored-by: Victor Cinaglia <victor@grafana.com>
* Add kvstore interface
* add owner
* go lint
* remove comment
* update comment
* remove GetOptions
* add sortorder unspecified
* nit
* nit
* nit
* move txn
* use io.reader
* use io.reader
* change again the default order + comments
* change again the default order + comments
* use readcloser for Save
* markup timeseries panel edit
* mark up matchers ui
* mark up bar chart
* mark up stat panel
* mark up gauge
* mark up bar gauge
* mark up table component
* mark up pie chart
* mark up state timeline
* mark up heatmap
* mark up status history
* mark up histogram
* mark up text panel
* mark up alert list
* mark up dashboard list
* mark up news panel
* mark up annolist
* mark up logs panel
* mark up node-graph
* mark up traces
* mark up trend
* mark up xychart
* fix build
* wip
* use initScenesTranslations
* comment
* use just plain resource loaded from scenes lib
* update to the published scenes version
* rename loadPluginResources to loadNamespacedResources
* XYChart: Add support for x=time
* prettier
* Add time axis demo to provisioned dashboard for XY
* Add details about time fields to the documentation
---------
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
* LogList: memoize styles
* virtualization: refactor to support multiple instances
* LogList: refactor to support multiple virtualization instances
* Update tests
* LogLine: unfocus test
* virtualization: refactor class to use the provided font size
* LogLine: split component to reduce re-renders
Several niche bugs have surfaced as a result of the decrypt code Grafana uses in receivers API being different than what is used to decrypt secrets before sending to remote AM. Example:
- Dingding notifier not abiding by new Patching added to local AM, thus causing missing url errors.
* noop refactor to simplify decryptConfiguration
* Move compat function package
* Use new receiver models to encrypt/decrypt in remote AM
* make viz colors configurable when creating the theme
* fix bug with palette not showing last color
* attempt to constrain the types better
* better generics
* remove reverseMap
* ensure there's an empty options default
* Fix docs
* Remove first time field from sorting for consistent indexing, add margin to radio
* integrate in with sort
* find first
* Move lonely test to proper block, add test for logic change, refine logic
* bonus points
* Chore: Change Library Panels CODEOWNERS to sharing
* change auto triage for library panels to redirect to sharing squad
* move sharing squad to appropiate section
* Bump nanogit library
This version of nanogit will be optimized for performance, specially for
bulk writes. It will store packfiles in a temporary file if there are
too many and clean up after push or when the writer is removed.
* Format code in nanogit/git.go
* feat: Implement optional URL path sanitization in BackendSrv methods
* add comment
* revert
* remove namespace import from backendsrv
* change method to validatePath, remove query params and fragments
* Moved validatePath call into fetch and make it throw an error instead
* update pluginSettings tests
* prettier
* Update public/app/features/plugins/pluginSettings.ts
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
* change name to validatePath
* fix other tests
* rename property in backend_srv tests
* rename to validatePath in backend_srv, add extra tests
* Move path validation into parseUrlFromOptions
* fix
* Add additional check
* Add test
---------
Co-authored-by: joshhunt <josh.hunt@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
* Add tracing to live calls.
Clients using /api/live/ws use long-running request and post various commands via the request. This PR adds tracing span to each client-initiated action like subscribing/unsubscribing to/from channel, RPC call, publishing an event.
Server-initiated messages are not included in the trace yet.
* Fix for repeated row variables
* Add unit tests
* Do not recursively replace queries that self-reference
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* wip: trying to understand how to get the ds info from migrator
* add datasource info provider
* Use DS service to fetch DS data
* add more tests cases to match with migrator cases
* Add snapshots
* Non-existing DS
* Add different DS for snapshots
* fix import
* Fix tests: guard against double initialization
* don't use full datasource package in test
* min version should be 35
* fix test
* fix conversion test
* Dashboards: Support schemaVersion v35 migration in backend
* Dashboards: Support schemaVersion v34 migration in backend
* Apply suggestions from code review
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* Apply feedback
* Remove unused parameters
---------
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* DeleteProvisionedDashboardDrawer: delete provisioned dashboard flow set up with drawer
* clean up
* add tests
* more test and clean up
* revert endpoint change
* adjust tests
* remove unuse codes
* fix type, fix test, add read only message
* small changes
* fix test, i18n fix
* comments
* Fix bug for file deletion using a branch
* PR comments update
* Use the provided ref for parser so that URLs work
* call useDeleteRepositoryFilesWithPathMutation in delete drawer component directly
* remove console log
* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* PR comments
* use string for fields
* extract handle request logic from save form and delete form and put into one hook
* Add test for useProvisionedRequestHandler
* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard-scene/settings/DeleteProvisionedDashboardForm.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard-scene/settings/DeleteProvisionedDashboardForm.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* use drawer close in both save form and delete form
* Add back panelEditor onDiscard
* add panelEditor onDiscard to delete flow
* Update public/app/features/dashboard-scene/settings/DeleteProvisionedDashboardForm.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
---------
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Drone: Remove verify_storybook pipeline
Already exists in GitHub Actions.
* Drone: Remove lint_backend pipeline
Already exists in GHA.
* Drone: Remove backend tests
These already exist in GitHub Actions.
* Drone: Remove shellcheck pipeline
* Drone: Remove unused images
* Drone: Remove lint_frontend pipeline
Already in GHA.
* Drone: Remove test_frontend pipeline
Already exists in GHA.
* Drone: Remove integration_benchmarks pipeline
This was last used in January. GHA does not have it, but it is relatively trivial to run locally.
* refactor language provider
* update tests
* more tests
* betterer and api endpoints
* copilot updates
* betterer
* remove default value
* prettier
* introduce new methods
* provide unit tests for labelValues
* update metadata fetch
* move all cache related stuff in caching.ts
* provide interface
* provide deprecation messages
* unit tests for new interface
* separation of concerns
* update tests
* fix unit test
* fix some types
* Revert "fix some types"
This reverts commit 7e64b93b5f.
* revert interface usage
* betterer
* use PrometheusLanguageProviderInterface in everywhere
* introduce resource clients
* unit tests
* act accordingly with the feature toggle
* some more unit tests
* add feature toggle
* Revert "add feature toggle"
This reverts commit 5c93ac324f.
* remove feature toggle
* update tests
* backward compatibility
* fix scope issues
* comment update
* stronger types
* prettier
* betterer
* use new methods in metrics browser and query field
* always return data
* Revert "always return data"
This reverts commit 38e493c189.
* Revert "Revert "always return data""
This reverts commit b5d3b5d2b0.
* handle error
* lint
* use new method in query builder
* fix metrics modal tests too
* use labelValues method while searching in combobox
* update metrics modal regex search
* lint
* fix unit test
* introduce resource clients and better refactoring
* prettier
* type fixes
* betterer
* no empty matcher for series calls
* better matchers
* add additional tests
* proper match string for series
* introduce series cache
* introduce series cache for series label values
* lint
* cache values too
* utf8 safe label values query with series endpoint
* fix unit tests
* caching for labels api client
* betterer
* support new language provider methods in variable editor
* use queries and adhoc filters to extract matchers
* filter out __name__
* improve match string in series query label value calls
* update unit tests
* betterer
* use new language provider methods in completions and query hints
* betterer
* refactor language provider
* update tests
* more tests
* betterer and api endpoints
* copilot updates
* betterer
* remove default value
* prettier
* introduce new methods
* provide unit tests for labelValues
* update metadata fetch
* move all cache related stuff in caching.ts
* provide interface
* provide deprecation messages
* unit tests for new interface
* separation of concerns
* update tests
* fix unit test
* fix some types
* Revert "fix some types"
This reverts commit 7e64b93b5f.
* revert interface usage
* betterer
* use PrometheusLanguageProviderInterface in everywhere
* introduce resource clients
* unit tests
* act accordingly with the feature toggle
* some more unit tests
* add feature toggle
* Revert "add feature toggle"
This reverts commit 5c93ac324f.
* remove feature toggle
* update tests
* backward compatibility
* fix scope issues
* comment update
* stronger types
* prettier
* betterer
* use new methods in metrics browser and query field
* always return data
* Revert "always return data"
This reverts commit 38e493c189.
* Revert "Revert "always return data""
This reverts commit b5d3b5d2b0.
* handle error
* lint
* use new method in query builder
* fix metrics modal tests too
* use labelValues method while searching in combobox
* update metrics modal regex search
* lint
* fix unit test
* introduce resource clients and better refactoring
* prettier
* type fixes
* betterer
* no empty matcher for series calls
* better matchers
* add additional tests
* proper match string for series
* introduce series cache
* introduce series cache for series label values
* lint
* cache values too
* utf8 safe label values query with series endpoint
* fix unit tests
* caching for labels api client
* betterer
* support new language provider methods in variable editor
* use queries and adhoc filters to extract matchers
* filter out __name__
* improve match string in series query label value calls
* update unit tests
* betterer
* betterer
* refactor language provider
* update tests
* more tests
* betterer and api endpoints
* copilot updates
* betterer
* remove default value
* prettier
* introduce new methods
* provide unit tests for labelValues
* update metadata fetch
* move all cache related stuff in caching.ts
* provide interface
* provide deprecation messages
* unit tests for new interface
* separation of concerns
* update tests
* fix unit test
* fix some types
* Revert "fix some types"
This reverts commit 7e64b93b5f.
* revert interface usage
* betterer
* use PrometheusLanguageProviderInterface in everywhere
* introduce resource clients
* unit tests
* act accordingly with the feature toggle
* some more unit tests
* add feature toggle
* Revert "add feature toggle"
This reverts commit 5c93ac324f.
* remove feature toggle
* update tests
* backward compatibility
* fix scope issues
* comment update
* stronger types
* prettier
* betterer
* use new methods in metrics browser and query field
* always return data
* Revert "always return data"
This reverts commit 38e493c189.
* Revert "Revert "always return data""
This reverts commit b5d3b5d2b0.
* handle error
* lint
* use new method in query builder
* fix metrics modal tests too
* use labelValues method while searching in combobox
* update metrics modal regex search
* lint
* fix unit test
* introduce resource clients and better refactoring
* prettier
* type fixes
* betterer
* no empty matcher for series calls
* better matchers
* add additional tests
* proper match string for series
* introduce series cache
* introduce series cache for series label values
* lint
* cache values too
* utf8 safe label values query with series endpoint
* fix unit tests
* caching for labels api client
* betterer
* fix errors
* refactor language provider
* update tests
* more tests
* betterer and api endpoints
* copilot updates
* betterer
* remove default value
* prettier
* introduce new methods
* provide unit tests for labelValues
* update metadata fetch
* move all cache related stuff in caching.ts
* provide interface
* provide deprecation messages
* unit tests for new interface
* separation of concerns
* update tests
* fix unit test
* fix some types
* Revert "fix some types"
This reverts commit 7e64b93b5f.
* revert interface usage
* betterer
* use PrometheusLanguageProviderInterface in everywhere
* introduce resource clients
* unit tests
* act accordingly with the feature toggle
* some more unit tests
* add feature toggle
* Revert "add feature toggle"
This reverts commit 5c93ac324f.
* remove feature toggle
* update tests
* backward compatibility
* fix scope issues
* comment update
* stronger types
* prettier
* betterer
* use new methods in metrics browser and query field
* always return data
* Revert "always return data"
This reverts commit 38e493c189.
* Revert "Revert "always return data""
This reverts commit b5d3b5d2b0.
* handle error
* lint
* introduce resource clients and better refactoring
* prettier
* type fixes
* betterer
* no empty matcher for series calls
* better matchers
* add additional tests
* proper match string for series
* introduce series cache
* introduce series cache for series label values
* lint
* cache values too
* utf8 safe label values query with series endpoint
* fix unit tests
* import fixes
* more import fixes
* fix unit tests
* refactor language provider
* update tests
* more tests
* betterer and api endpoints
* copilot updates
* betterer
* remove default value
* prettier
* introduce new methods
* provide unit tests for labelValues
* update metadata fetch
* move all cache related stuff in caching.ts
* provide interface
* provide deprecation messages
* unit tests for new interface
* separation of concerns
* update tests
* fix unit test
* fix some types
* Revert "fix some types"
This reverts commit 7e64b93b5f.
* revert interface usage
* betterer
* use PrometheusLanguageProviderInterface in everywhere
* introduce resource clients and better refactoring
* prettier
* type fixes
* betterer
* no empty matcher for series calls
* better matchers
* import fixes
* refactor language provider
* update tests
* more tests
* betterer and api endpoints
* copilot updates
* betterer
* remove default value
* prettier
* introduce resource clients and better refactoring
* prettier
* type fixes
* betterer
* no empty matcher for series calls
* better matchers
* addressing the review feedback
What is this feature?
Implements the POST endpoint for deleting imported Mimir Alertmanager configurations:
POST /api/convert/api/v1/alerts
The API endpoint creates the extra Alertmanager configuration with the provided identifier and matchers.
**What is this feature?**
This PR implements a new Prometheus historian backend that allows Grafana alerting to write alert state history as Prometheus-compatible `ALERTS` metrics to remote Prometheus-compatible data sources.
The metric includes a few additional labels:
* `grafana_alertstate`: Grafana's full alert state, more granular than Prometheus.
* `grafana_rule_uid`: Grafana's alert rule UID.
Grafana states are included in the `grafana_alertstate` label also mapped to Prometheus-compatible `alertstate` values:
| Grafana alert state | `alertstate` | `grafana_alertstate` |
|---------------------|-----------------------|-----------------------|
| `Alerting` | `firing` | `alerting` |
| `Recovering` | `firing` | `recovering` |
| `Pending` | `pending` | `pending` |
| `Error` | `firing` | `error` |
| `NoData` | `firing` | `nodata` |
| `Normal` | _(no metric emitted)_ | _(no metric emitted)_ |
* Logs Panel: remove default value to it's taken from local storage code
* processing: do not remove newlines, let truncation handle
* LogList: check and pass unescaped content to context
* LogLine: prevent mutation of searchWords
* grammar: use parseFlags
* grammar: escape regex
Adds a new "Allow as recording rules target" toggle to Prometheus datasource configuration that controls whether the datasource can be selected as a target for writing recording rules.
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
* add native histogram dropdown to tempo config for service graph
* add docs for configuring native histograms
* add config native histogram options to types
* add native histogram metric to graph transform
* add native histogram to service map query for links
* add native histogram duration metric for duration queries
* use native histogram for duration queries
* export for tests
* add tests for native histogram links, queries and dataframes
* update tempo devenv to use native histograms
* use union for histogramType
* run prettier
* remove comment
* Add nanogit package
* Add nanoGit feature flag
* Put logger into nanogit context
* Commit go mod and go sum updates
* Add more stuff around logging
* Nanogit also in extra one
* Add owner to dependency
This adds the ability to filter rules with the prometheus compatible api using:
1. `receiver_name` to filter by contact point name
2. `health` to filter by the health status of the rule (one of `ok`, `error`, `nodata`, or `unknown`)
This also ensures that groups with no rules (due to filters) are not returned.
* capture errors on metrics
* rename seconds to sql_command_duration_milliseconds to match unit that has been captured, and update buckets
* rename sql_command_errors_total to sql_command_count
* docs: minor k8s inspired doc changes
* docs: revert to v1 as recommended first major
* Update contribute/architecture/k8s-inspired-backend-arch.md
Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>
---------
Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>
* I18n: Allow pseudo-locale to be enabled in production builds
* fix tests now that pseudo is around
* remove psuedo locale from i18n package
* load en-us from plugin resources for pseudo
* fix tests + remove 'hidden' option
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Add grafana-build action and workflow
* Fix the --verify flag stalling on tar.gz builds
* Add event sources for main / release branches
* Update CODEOWNERS
* WIP - time filtering
* Replace variable test
* Change tests
* Validator is already tested
* Change test to match evaluation
* Add line to docs
* Revert "Add line to docs"
This reverts commit 783f247c33.
* Put transformations docs update in the right place, cannot build without an update, WIP
* Run build
* Use regex test and rewind
* Does this help
* make config optional
* Document `remote_cache` is only used if a remote database is used
* Update _index.md
---------
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
* Don't show result from other parents
* Use global search hook for scopes even inside scopes category
* Remove console.log
* Move code to separate files
* Add tests
* Renamed utils file
* datasources: querier: more robust error handling, and report no error for st
* do not leak error details out
* apply the change to the real file, not just to the test
* Dashboards: Add undo/redo actions for changing dashboard title
* Run make i18n-extract
* Dashboards: Add undo/redo support for dashboard description
* fix typo
* Add tests for DashboardTitleInput & DashboardDescriptionInput
* WIP for improved hover state for calendar range
* TimeRangePicker: Add hover state when selecting a date range
* reorder styles to reduce duplication
* oops that wasn't supposed to go in
* ignore border radius false positive
* Update dependency @grafana/llm to v0.22.0
* mark some packages as esm for jest
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* declare dingding url as secret
patch raw settings before parsing because DingDing's config parser does not know about secrets
* fix integration test
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* LogList: add key bindings hook
* LogListContext: add search support
* LogList: create and integrate LogListSearch
* useKeyBindings: close search with escape
* LogListSearch: implement go to results
* LogLine: support highlight in logs with ansi colors
* LogListSearchContext: extract from LogListContext
* LogListSearch: highlight matches in ansi logs
* LogListSearch: fix count
* LogListSearch: implement optional results filtering
* Translations
* LogListSearch: display within the panel and add tooltip
* Translations
* LogList: highlight search words and search matches
* LogListSearch: remove ufuzzy
Unfortunately we can't highlight ufuzzy matches
* LogListSearch: clean up removed ufuzzy implementation
* Prettier
* LogListSearch: search in displayed fields
* useKeyBindings: switch to native event listeners
* LogListSearch: fix effect loop
* LogListSearch: remove character so people don't think this text comes from AI
* LogLine: add text search test cases
* LogList: add integration test case
* LogListSearch: use uncontrolled input and react transitions
* LogListSearch: import t from i18n
* LogListControls: add search control
* LogListSearch: escape regexes
* Add to available channels
* Export
* Fix bug in deeply nested secrets
BE: Slice re-use bug when traversing deeply.
FE: Only at most one level of nesting was being taken into account
when determining secureFields keys. This change adds a new field on
NotificationChannelOption: secureFieldKey. This is populated on API GET via
transform. This change gives us the option to hardcode secureFieldKey in the
backend and no longer calculate the key via settings topology.
* Update grafana/alerting to 3e20fda3b872
* Prettier
* Linting
* Fix IntegrationConfig test to catch secure field mismatch
* fix(#92944): add StateTimeline Null+NaN handling
* chore: remove console.warns from debugging
* test: initialize a couple of simple tests
* test: more tests for hasMappedNaN and hasMappedNull
* chore: revert some of the let-const syntax cleanup for a later PR
* chore: rename should draw method
* chore: fix comment typo
* refactor(timeline-chart-utils): un-nest hasSpecialMappedValue() helper
* test(timeline-chart-utils): unit test hasSpecialMappedValue() helper
* chore: fix code comment typos in changed files
* refactor(timeline-chart): reduce helper DRY-ness for better performance
* fix(timeline-chart): check Y value for truthiness, not if it is finite
* test(state-timeline): additional gdev test panels with null + NN values
* fix(timeline-chart): allow Y value of zero in checks
---------
Co-authored-by: Jesse David Peterson <jesdavpet@users.noreply.github.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
* 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
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
---------
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
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.
* Dashboard: ValueFormat - add custom 'financial' currency format without abbreviations
- Add fullCurrency formatter function that displays complete numeric values
- Apply performance suggestions from old PR
- Add unit tests
- Update documentation
* remove unnecesary `true` format support
* chore(packages): remove rollup dts plugin
* build(packages): add rollup copy plugin settings to copy ts declarations to esm and cjs builds
* build(packages): remove copy settings as result doesnt pass attw cli checks
* build(packages): use single types output in dist/types directory
* ci(packages): update prepare and validate scripts for single type builds
* fix(grafana-schema): copy raw types to dist/esm directory for grafana/scenes support
* add test
* make it fail
* get test work reliably
* get or create db section
* remove unnecessary code
* move test to first
* add comment
* apply PR feedback
* Dashboards: Add restore endpoints to the API
* Fix unified api
* Fix resource version
* Add tests
* Update api
* Update type guards
* Update comments
* Add missing type
* Cleanup
* Move spec checking logic to v1 client
* Handle mixed versions in deleted dbs list
* Update tests
* comment
* type
* 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
Co-authored-by: vinayteki95 <vinayteki95@users.noreply.github.com>
* Fix top table calculations
---------
Co-authored-by: vinayteki95 <vinayteki95@users.noreply.github.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Don't show result from other parents
* Use global search hook for scopes even inside scopes category
* Remove console.log
* Don't show non leaf scopes in global search
* 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
* Docs: Adding clarification for resetting adming password with CLI with external DB
* adjusting bulleted points
* Cutting unneeded wording
* adjusting wording to avoid Grafana being possessive
* Changing Postgres to PostgreSPQL
* experiment v2 to v1 in exporting
* refactor code to export to v1 resource
* Add unit test and fix linting
* fix typescript
* fix linting
* handle error gracefully when is not possible to convert to v1
* feat(sql): allow custom table names in TableSelector
Restores the ability to enter custom table names not present in the database
by adding `allowCustomValue` to the Select component. This matches previous
functionality where users could manually specify table names not returned
by db.tables().
fixes: #106348
* empty line 45
* Add group and namespace filtering for GMA rules
* Add group and namespace filtering for DMA rules
* Fix view mode handling
* Preserve group and namespace filters when switching views
* update "no rules" logic for Grafana managed rules
* use groupFilter function for filter logic
* Add populateCache docs, tidy up api consts
* Fix imports in tests
* Fix failing import tests
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* docs(alerting): Import to Grafana-managed rules
* apply latest evaluation changes
* Add additional conversion details to How it works section
* fix ref link
* fix Data source input name
* more details about the `Target data source` input
* RepeatRowSelect: Use Combobox instead of deprecated Select component
* Add test (broken)
* Don't disable combobox if repeat is set
* Run i18n-extract
* add mockGetBoundingClientRect to combobox test
---------
Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
* refactor(grafana-ui): move all exports from components barrel file to entry point
* refactor(grafana-ui): move all exports from types barrel file to entry point
* refactor(grafana-ui): explict exports for utils
* refactor(grafana-ui): move themes to explicit exports
* refactor(grafana-ui): use explicit exports for options, slate-plugins and schema
* fix(grafana-ui): put back missing components
* chore(grafana-ui): delete first level barrel files
* refactor(grafana-ui): update all internal barrel file imports
* refactor(grafana-ui): start fixing storybook mdx files
* style(grafana-ui): fix linting issues, update betterer result
* chore(grafana-ui): delete nested component barrel files
* refactor(grafana-ui): update imports to use non-barrel files
* refactor(grafana-ui): update imports to non-barrel files for story and test
* fix(grafana-ui): put back missing FileListItem component and types
* refactor(grafana-ui): update mdx to use direct imports
* fix(grafana-ui): align exports with grafana 12
* LogList: create font size option
* LogList: prevent option fontSize bouncing
* LogListContext: fix stored container size bigger than container
* LogList: render smaller font size
* virtualization: adjust to variable font size
* virtualization: strip white characters of at the start successive long lines
* LogList: add font size to log size cache
* LogList: use getters instead of fixed constants
* LogLine: prevent unnecessary overflow calls
* virtualization: strip ansi color codes before measuring
* LogListDetails: adjust size on resize and give logs panel a min width
* LogsPanel: add showControls as a dashboard option
* virtualization: update test
* virtualization: add small test case
* processing: update font size
* LogListControls: update test
* Extract translations
* Logs Panel: enable controls by default
* LogListContext: update mock
* ControlledLogRows: add missing prop
* LogLine: remove height ref
* LogList: dont touch the debounced function on successive calls
* LogLine: update test
* LogsPanel: make controls default to false again
* LogsPanel: make controls default to false again
* LogLineDetails: fix height resizing and make close button sticky
* LogLine: memo log component
* LogLineDetails: fix close button position
* New Logs Panel: Add Popover Menu support (#106394)
* LogList: add popover menu support
* LogList: test popover menu
* Chore: remove unnecessary optional chain op
* LogLinedDetails: fix close button position with and without scroll
* Alerting: Use default_datasource_uid as the default target for recording rules
* Add tests
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
* Add pills in search bar for context
* Add scope actions
* Add selection functionality
* Show selected scope on secondary row
* Fix selected scope titles
* Add some basic tests
* Test for toggle by name
* Remove unnecessary mocking
* Small cleanups
* Lint fixes
* Fix test
* Update public/app/features/scopes/selector/ScopesSelectorService.ts
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* Bump input and breadcrumbs test
* Change breadcrumbs color
* Makes the breacrumb spacing consistent
* Add basic global search
* Change scope selector data structures
* Fix scope selector functionality
* Fix errors in selector and cmdk actions
* Fix cmdk actions
* Fix global search in cmdk
* Fix some merge edits
* merge diffs
* Small merge fixes
* Fix ScopesSelectorService.test.ts
* Fix tests
* Remove unrelated lint fixes
* Move ScopesTreeItemList.tsx into separate file
* Simplify if condition
* Use node.title in the scopesRow
* Use better dependency array for actions
* Make recentScopes more robust
* Fix beterrer
* Update betterer file
* Add test for changeScopes early return
* Fix input tooltip title access
---------
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
pkgs/tsdb/[grafana-pyroscope-datasource|parca]: Fix use of request headers in responses
In the parca and the grafana-pyroscope-datasource we were wrongly using the request headers instead of the response
header when communication the results to the backend.
This PR fixes this bug.
Was reported by an user via community slack, who faced issues, with a request header of `content-length: 0` being
inserted by a intermediate proxy.
What is this feature?
Ensures that resolved notifications are sent when alert states transition from Error to Normal after the configured number of evaluation intervals: Missing series evaluations to resolve.
Why do we need this feature?
Before this change, when an alert was transitioning from Error to Normal, in case when the labels on the new Normal alert instance are the same, Grafana would not send resolved notifications for the Error alert state. The alert would be resolved after a few evaluation intervals automatically in the alertmanager, following the endsAt.
With this change the resolved notification is sent after the configured number of evaluation intervals: Missing series evaluations to resolve.
The help text for active timings on an alert was confusing, indicating that the time range would cause the alert not to
notify, when it actually works as the only time the alert would notify.
* SCIM: fix provisioned user role assignment from SAML assertion
* revert org_sync_test changes
* clean up tests
* skip user lookup during org sync
* sanitize log output
* only log non-sensitive fields
* grafana-data: Fix error when field values are null
* Slightly terser
* update frame test to have falsy value that should be kept
remove null string output from null value test
* handle falsy frame values as non-null
---------
Co-authored-by: samsch <git@samsch.org>
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.
* Zanzana: Split client and server logs
* Zanzana: Improve error handling and logging
* log internal error at the server side
* refactor
* improve errors for list request
* update go modules
* handle errors for read and write
* refactor
* reset go.mod changes
* Alerting: Optimize prometheus api permission checks
This improves the performance of the Prometheus API by performing the permission checks for rule read permission in a folder upfront, rather than checking permissions for each rule group individually. This reduces the number of permission checks and should speed up the API response time.
* refactor vars
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
When a rule configured with `ExecErrState` state of `Alerting`, has an instance which is Alerting then has a data source error, then successfully evaluates and continues to be Alerting, the cached instance keeps the error cached until it is no longer firing.
This is unexpected and leads to misleading results.
* 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
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
---------
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
* docs(alerting): remove admonition to an outdated tutorial
* amended note and link to new tutorial
* link
* minor copy changes
* run prettier
* update copy
---------
Co-authored-by: tonypowa <tonypowa@gmail.com>
* Alerting docs: document ability to import rules to GMA from Prometheus YAML
documentation for prom YAML import feature.
- took out reference that said users can't import prometheus rules in the tool.
- added the More > Import alert rules UI path to the tool
- added a step for the YAML file upload button.
* 💅prettier✨
* Update _index.md
* Add export folder action to the new list view
* merge folder actions in one more button
* fix checking permissions
* remove commented code
* early return when no bulkactions are allowed
* fix css width
* address review comments
* move BulkActions component outside the parent component
* remove unnecessary check
* bring back accidentally removed code
* remove duplicated modal
* TraceView: Resource attributes links extension point
* Add data source info to context
* Remove console log
* Removing unused linkGetters and more
* More tests
* Fixing last todos
* Fixing
* Fixing
* Change link style
* Rename extension context
* Fix lint error
* LogsPanel: integrate new panel via feature flag
* Log Line: move sampled/errors/deduplication count outside of log line body
* LogList: increase overscan count
* Logs Panel: enable deduplication for infinite scrolling
* Logs Panel: remove margin overflowing drilldown
* Logs Panel: add missing dependency to effect
* Logs Panel: pass missing callback
* Remove console log
* LogLine: show cursor pointer only when interactable
* LogLineDetails: make resize handler more obvious
* LogsPanel: add missing props to from panel
* LogLineMenu: add support for custom items
* LogsPanel: pass custom menu items to LogList
* Fix imports
* Chore: comments and missing argument
* LogLineMenu: pass log to event listener
* LogListContext: filter log details when no longer present in the new response
* chore: log
* LogsPanel: conditionally show options per feature flag status
* LogLine: align logs when some of them are sampled or with errors
* Chore: update tests
* LogLineMenu: test custom options
* LogsSamplePanel: show controls
* LogsPanel: move return after hooks to prevent bugs
* ds-querier: add new metric for the total request
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* fix logger and trace
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* ds-querier: rewrite downstream 500s to 400
---------
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
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.
* re-organize folders regarding import feature
* Revert folder changes
* Add Yaml import input fields
* Set recording rules target if empty
* wip
* Convert YAML content to RulerRulesConfigDTO and use this for the import payload
* fixing some issues
* wip
* add tracking
* use yaml filename for namespace in case is not specified in the yaml content
* refactor
* add alertingImportYAMLUI ff check for yaml option
* Add test for parseYamlToRulerRulesConfigDTO
* move import feature to the More menu at the top
* add test for filterRulerRulesConfig, and fix the function
* extract parseYamlToRulerRulesConfigDTO to a separate file
* Add permission check for the import button
* Change data flow in import form, add basic tests for the import form
* remove commented code
* Add yaml import form test
* Add more tests
* Tidy up, remove type assertions in yaml converter
* Improve yaml file validation in the form
* Fix lint issues
* Fix lint
* use only Admin role for checking if the feature is available for the user
* Fix parsing recording rules
* Fix file re-selection in YAML import
* prettier
* refactor
* Remove FileReader, add more explanation to file upload reset
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
* update TableNG to use the grafana fork of react-data-grid, which supports React 18
* react-data-grid got rid of their CJS
* fix jest.config formatting
* Docs: Adding info on configuring cors via reverse proxy
* Adding info regarding grafana.ini CORS configuration
* some clarification and typo fixes
* expanding the instructions
* run prettier
* fixing indentation
* adjusting an admonition
* adjusting information based on review
* Pyroscope: Add annotations frame to series response
* Adapt to API change, add tests
* Run make lint-go
* Fix conflicts after rebase
* Add annotation via a separate data frame
* Process annotations fully at the datasource
* Add mod owner for go-humanize
* Pyroscope: Annotations in Query Response can be optional
---------
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* first
* second
* third"
* 4th
* format
* typo
* $labels
* all pretty no pity
* order
* order2
* typo
* order4
* link renamign
* titles
* test without title heading
* test with colon in h1
* removed H1s
* save transparent setting
* make sure we test both transparent and non transparent
* no more legacy rows
* schema changes
* Add testing, fix first row offset
* Remove legacy row from transform test
* Remove panel that's not present in layout
* Remove expects after removing the row, fix lint issues
* Remove unused commit
* update codegen
* update openapi snapshot
* Fix snapshot
* add missing default prop
* Fix repeating, fix first row, fix not flushing last row
* Use correct repeater
* fix lint, remove unused empty check
* update codegen
* update openapi test snapshot
* Create libpqToPGX feature toggle
* Refactor PostgreSQL datasource to support PGX with feature toggle
- Updated `ProvideService` to accept feature toggles for enabling PGX.
- Modified integration tests to use the new PGX connection method.
- Introduced new functions for handling PGX connections and queries.
- Enhanced TLS configuration handling for PostgreSQL connections.
- Updated existing tests to ensure compatibility with PGX and new connection methods.
* Update PostgreSQL datasource to enhance connection pooling and error handling
- Increased `MaxOpenConns` to 10 in integration tests for improved connection management.
- Refactored connection handling in `newPostgresPGX` to return a connection pool instead of a single connection.
- Updated health check error handling to utilize context and feature toggles for better error reporting.
- Adjusted `DisposePGX` method to close the connection pool properly.
- Enhanced query execution to acquire connections from the pool, ensuring efficient resource usage.
* Cleanup
* Revert postgres_test unnecessary changes
* Rename feature toggle from `libpqToPGX` to `postgresDSUsePGX`
* Add null check to dispose method
* Fix lint issues
* Refactor connection string generation
* Address comment in health check file
* Rename p to pool
* Refactor executeQueryPGX and split into multiple functions
* Fix lint issues
* The returning error message from PGX is enough no need to separate the error code.
* Move TLS handling to newPostgresPGX function
* Disable ssl for integration tests
* Use MaxIdleConns option
* Remove old feature toggle
* Rename`generateConnectionConfigPGX` to `generateConnectionStringPGX`
* Add back part of the error messages
* Don't show max idle connections option when PGX enabled
* Address comments from Sriram
* Add back Sriram's changes
* PostgreSQL: Rework tls manager to use temporary files instead (#105330)
* Rework tls manager to use temporary files instead
* Lint and test fixes
* Update pkg/tsdb/grafana-postgresql-datasource/postgres.go
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Update betterer
---------
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
---------
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* use -C when go-mod-dir is provided
* remove unused target variable
* use my branch for testing
* fix syntax?
* use condition in bash instead
* dagger-for-github doesn't support multiline command
* just skip using the composite action
* update setup-go
* add missing space
* grafana-main -> .grafana-main
* use 'patch' as version
* use generated token for cloning / pushing
* colons in wrong place
* update generate-token action
* reduce permissions needed
* add org prefix to repositories list
* ok the repo names did not work like that
* pull-request -> pull_request
* add workflows: write permission
* push branch on dry_run
* Add missing DRY_RUN flag
* initialize LATEST_FLAG as array
* use RELEASE_BRANCH as the base branch
* use workflow in main
* done testing; use main
* LogList: add version with no scroll
* LogList: fix support for permalinked and pinned logs
* LogLineDetails: improve resizable
* LogList: improve height adjustment when details are open
* LogList: let the people select text
* Revert "LogList: add version with no scroll"
This reverts commit f26cdce696.
* LogList: update test
* New Logs Panel: rename permalinkedRowId to permalinkedLogId
* LogListContext: update mock
* ControlledLogRows: implement custom scrollIntoView
* Logs Panel: fix re-render regression
* LogLine: tweak hover and expanded colors
* Update API docs for team groups search
* update team sync doc
* remove param block
---------
Co-authored-by: Gabriel Mabille <gabriel.mabille@grafana.com>
* feat: map GF_INSTALL_PLUGINS to use preinstall plugins feature
* ref: process GF_INSTALL_PLUGINS as sync install
* fix: check GF_INSTALL_PLUGINS_FORCE in the docker run
* ref: use preinstall_sync for GF_INSTALL_PLUGINS
* ref: logs and deprecation msg for GF_INSTALL_PLUGINS
* chore: deprecated log formatting
* Home: update setup guide link/title to Getting Started Guide
* Home: check plugin presence to show getting started guide
* Home: remove now unused homeSetupGuide feature toggle
* Home: use sentence case for Getting started guide item
* Fix static handler redirect logic to ensure proper clean up URLs before redirection.
(cherry picked from commit f50ec8e0d10c24fd79f6c454974a2fc6e9694ef2)
* make serializer a single source of truth for passing k8s props on save
* remove resourceVersion when updating
* don't pass result.version to resourceVersion
* remove k8s update on saveCompleted from dash scene
* Authz: Define app resources
* Add coreroles and cluster roles
* Restore CODEOWNERS from main
* ManagedPermissions -> ResourcePermissions
* Rework changes
* Update apps/authz/kinds/v0alpha1/rolebindingspec.cue
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Update apps/authz/kinds/v0alpha1/rolespec.cue
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Make
* WIP first set of comments
* typox
* Copy folder Makefile
* Remove uid
* Rename authz -> iam
* Rename to iam
* Dockerfile
* Remove name
* Mv up
* Try with postprocess
* linting
* Use same version
* apimachinery v0.32.3
* update-workspace
---------
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* add script for tooling
* add to make
* not to forget
* reworked go tools
* add tool installation script
* adding readme
* updating readme
* updating readme
* cleanup install.sh and makefile
* update the readme file
* cleanup scripts
* switch variables.mk to lazy evaluation
* add tools ache to gitignore
* get rid of absolute path in hte Variables.mk file
* switch to reusable function for path generation
* add debug statements
* add create cache tool dir
* add debuig statements to make file
* drop tool cache
* fix race condition n ci
* fix race condition n ci
* cleanup workspace
* add lefthook.rc to codeowners
* copy .citools folder to docker image
* switch back to main branch of grafana-build
* Add .citools to the drone builder
* fix wording in generate.sh and README.md
* Add empty state handling for GMA rules
* Add handing empty states for Grafana and Datasource rules
* Update translations, fix lint errors
* Add empty state translation
* WIP layout update
* implement hover styles
* update pagination
* fix list item indent
* clean up actions part 1
* only apply text fill to v2 list view
* add missing returnTo for rule viewer
* fix list styles for list view
* i18n
* update bulk actions to regular folder actions for list v2
* fix a few tests
* simplify paginated loaders for new list view
* i18n
* more UI feedback
* fix test
* comment
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Dashboards E2E - edit pane - query variable
* update test to use gdev cloudwatch; remove duplicate label and mocks
* wait for the api call to fetch the editor options
* Rename Annotations 'Options' to 'legacyOptions'
* use new legacyOptions in StandardAnnotationQueryEditor
* use new legacyOptions in transformSaveModelSchemaToScene
* use legacyOptions in transformSceneToSaveModelSchemaV2
* Fix bug with ds query editors not taking the latest state
* update snapshot
* update unified storage README with instructions on how to run the distributor locally and fix race condition causing the server to crash on startup randomly
When we have labels selected and want to refresh the list of metrics that match this grafana would use an expensive
/api/v1/series call instead of /api/v1/label/__name__/values with matchers, even if the datasource is configured to be
ble to use matchers in label values calls.
Signed-off-by: Michael Hoffmann <mhoffmann@cloudflare.com>
* Dashboards/E2E: Add test validating panel title and description modification
* Use component selector for headerContainer
* Add flows for changing panel title and description
* setup distributor module
* move lifecycler into resource server provider
* remove ring/client pool setup from distributor module and use the same ring/client pool between storage server module and distributor module
* implement resourcestore server methods
* make healthcheck fail if ring is not running
* fix filesChanged command
* try this instead
* try again...
* try again...
* AGAIN
* maybe?
* maybe?
* just trying this up, im pretty sure this is what it was originally
* Revert "just trying this up, im pretty sure this is what it was originally"
This reverts commit a036cbb32f.
* directly use crowdin-download output
---------
Co-authored-by: joshhunt <josh.hunt@grafana.com>
* Provisioning: Refactor createOnCacheEntryAdded
* Use custom list resource type
* add generated types and transformers
* Switch to type guards
* Do not create new array
* replace usage of folder guardians with access control evaluators
* remove NewByFolderUID guardian
* bring up to date
* fix test
* more test fixes, and don't fetch the folder before evaluating lib element access
* change what error is returned
* fix alerting test
* try to fix linter errors
* replace the use of newByFolder guardian with direct access control evaluator checks
* remove newByFolder guardian
* get rid of dashboard and folder guardians
* undo unwanted change
* undo unwanted change
* undo unwanted change
* update code owners
* 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
docs: remove content for legacy graph panel
Given the legacy panel is not compatible with G12 - our current docs should not cover it and we can remove from the page
* add pr-patch-check-event workflow_call
* remove unneded permission
* sender -> sender_login
* Add my branch as a target for testing
* fix branch name
* use pull_request event
* fix repo in list
* maybe repositories not prefixedby org?
* fix permissions
* remove my branch
* Missing @
* Add missing CODEOWNER entry
* call workflow from my branch and add oidc debugger
* add my branch to list for testing
* remove my branch; use workflow from main; remove oidc debug
* retrigger CI
* replace usage of folder guardians with access control evaluators
* remove NewByFolderUID guardian
* bring up to date
* fix test
* more test fixes, and don't fetch the folder before evaluating lib element access
* change what error is returned
* fix alerting test
* try to fix linter errors
* replace the use of newByFolder guardian with direct access control evaluator checks
* remove newByFolder guardian
* remove unintentional changes
* remove unintentional changes
* undo unwanted change
* ds-querier: handle execute errors better
* fix: change how GetResponseCode works to return 418 if rsp is nil
418 is a bit of an easter egg which in this case works since we don't
have an rsp but we do know something went wrong, so a 200 won't work.
Also changed this to return the code in the frame, not sure why we
weren't.
* tests: fix GetResponseCode tests
* log no rsp case
* bring back og error log
* feat: preinstall_sync config - process and installation logic
* ref: add preinstall_sync list to preinstalled plugins of frontendsettings
* fix: conf blank line for sections
* ref: remove plugins async flag, and rename PreinstallPlugins
* docs: default installed plugin list
* move preserve to scenePage level, fix issues with restoring variables and failing to reload dd
* refactor and fix preserve/reload url state
* cleanup
* lint
* lint
* reference this PR in comment
* feat: remove kube-aggregator for OSS and provide injection points with runner iface
* upgrade authlib to support expiresIn
* new FT
* new FT again
* update go.mod
* get rid of the slice implementation
* reconcile conflicts
* gracefully handle enterprise not being linked situation with kubeAggregator FT true
* allow dataplane agg and kube agg to both be added to delegate chain
* make update-workspace
* address feedback
* revert go.mod changes
* go.mod updates
* elaborate on why and how of skipping the Ready channel handling
* after rebase and make run
* replace usage of folder guardians with access control evaluators
* remove NewByFolderUID guardian
* bring up to date
* fix test
* more test fixes, and don't fetch the folder before evaluating lib element access
* change what error is returned
* fix alerting test
* try to fix linter errors
* we don't assign general folder write permissions, reverting to the previous logic for general folders
* start marking up azuremonitor
* more markup
* finish mark up
* add package and correct imports
* convert to functional component + use correct t import
* fix duplicate key + typo
* add extract config + fake french translations to test
* run prettier and fix unit tests
* use nx
* enable i18n lint rules for azure monitor
* remove fake french translations
* await initPluginTranslations
* top level await breaks unit tests
* leave as class component for now
* 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): Add two common examples in `Learn` section
* Update docs/sources/alerting/learn/examples/multi-dimensional-alerts.md
Co-authored-by: Johnny Kartheiser <140559259+JohnnyK-Grafana@users.noreply.github.com>
* Update docs/sources/alerting/learn/examples/multi-dimensional-alerts.md
Co-authored-by: Johnny Kartheiser <140559259+JohnnyK-Grafana@users.noreply.github.com>
* mention `summary` annotation in multi-dimensional alerts example
* Remove note about alert grouping
* minor edits to section: `Differences with time series`
* minor grammar change
---------
Co-authored-by: Johnny Kartheiser <140559259+JohnnyK-Grafana@users.noreply.github.com>
* update docs on how to configure SCIM with okta
* fix enterprise link
* add introductory paragraph under "Configure provisioning settings"
This paragraph has been added to avoid stacked headings that break the flow of the documentation and hurt SEO
* split SCIM connector base URL config for cloud and onprem
---------
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
* chore(e2e): update plugin-e2e to canary version for testing
* chore(e2e): bump playwright/test to 1.52.0
* empty commit
* chore: bump to major version
* Trigger build
---------
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
* Dependencies: Bump github.com/openfga/openfga from v1.8.6 to v1.8.12
* Linter: Replace x/exp/rand with math/rand/v2
* NGAlert: Fix test after linter fixes
Adds settings for SQL expressions:
sql_expression_cell_output_limit
Set the maximum number of cells that can be returned from a SQL expression. Default is 100000.
sql_expression_timeout
The duration a SQL expression will run before being cancelled. The default is 10s.
Grafana frontend code sends adhoc filters to the backend in both the
`tags` and `adhocFilters` params.
The values in `tags` have dashboard variables interpolated, while those
in `adhocFilters` don't. This PR updates the frontend code to
also interpolate variables into the `adhocFilters` param.
The duplicated values are left as they are in `tags`, in case some other
spooky code at a distance relies on that.
* Table: Avoid creating links in cells when data links have empty href
* Copy logic to TableNG
* Do not add non-clickable links to context menu
* Don’t pass if undefined
* Add tests to cover datalink logic changes
* Trigger Build
---------
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
* Ignore locales files more generically
* Use `ignore-path` for prettier
If we don't specify this, it will use `.gitignore` as well, which will ignore enterprise files.
This means that the code in enterprise will drift and easily ends up with prettier issues
* add e2e for grouping into tabs and rows
* enable kubernetesDashboards feature toggle for e2e tests
* remove unnecessary kubernetesDashboard feature flag enablement
* refetch when series limit is changed
* when series limit is empty use the default series limit
* tests for timerange handling
* attempt to reduce the test file size
* remove ineffective memory tests
* update test
* clearer tests
* update help text
* update limit tooltip
* rename /mtfe route to /femt to match project name
* set correct navTree JSON property name
* call GetWebAssets in the request handler to prevent stale assets during development
* Call /bootdata and render grafana
* set nonce on script
* write csp header in index handler
* write report-only csp as well
* debug stuff
* more debug logging
* move importing app into a seperate, async-loaded module
* Clean up comments
* make /femt redirect to / in the frontend
* remove console.log
* remove stale commented code
* call __grafana_load_failed if bootstrap fails
* comment for __grafana_boot_data_promise
* remove console.log
* remove blank newline
* codeowners
* Spike: Extras
* Attempt to wire it up
* Hack
* Fix issue with jobs
* Wire more things up
* Fix more wiring stuff
* Remove webhook secret key from main registration
* Move secret encryption also outside register
* Add TODOs in code
* Add more explanations
* Move connectors to different package
* Move pull request job into webhooks
* Separate registration
* Remove duplicate files
* Fix missing function
* Extract webhook repository logic out of the core github repository
* Use status patcher in webhook connector
* Fix change in go mod
* Change hooks signature
* Remove TODOs
* Remove Webhook methos from go-git
* Remove leftover
* Fix mistake in OpenAPI spec
* Fix some tests
* Fix some issues
* Fix linting
Adds ability to set notifications settings using the Prometheus conversion API.
The API now supports a new optional header: X-Grafana-Alerting-Notification-Settings which can be used to specify notification settings.
The value of the header is the AlertRuleNotificationSettings structure in JSON:
mimirtool rules load alerts.yaml --extra-headers 'X-Grafana-Alerting-Notification-Settings: {"receiver": "my-webhook", "group_by": ["cluster", "pod"]}'
set folder permissions to "view"
alerts are allowed to be created in folders where the user only has the
"read" permission, "write" permissions is not required and is only used
to allow creating new folders.
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
provision Prometheus: added example field how to set the scrape interval
When using Prometheus as a datasource Grafana can optionally know the scrape interval of Prometheus. In the GUI it is easy to spot, however when provisioning the datasource the example was lacking this information.
This commit adds this missing field as an example.
* Update grafana alerting from de176b4a0309 to 83b6de6b0a35
Includes:
- https://github.com/grafana/alerting/pull/319
- https://github.com/grafana/alerting/pull/317
* Remove unused SendWebhook method from sender struct
grafana/alerting hasn't used the grafana webhook sender for a while now,
so this method is no longer used anywhere.
- Removed SendWebhook from the sender struct and rename it to emailSender
so that its use is clearer.
- Also, for similar reasons, the Webhook method on Grafana's
webhook sender `sendWebRequestSync` should not call grafana/alerting code for
NewTLSClient. The previous grafana/alerting function is vendored into grafana.
* Use BuildReceiverIntegrations new func signature
* Mark labels and annotations as optional in Grafana ruler DTO
* Refactor AlertsFolderView to use folder-specific endpoint for rules loading
* Improve tests for BrowserFolderAlertingPage
* Update translations
* Revert go changes
* update gen files
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* query variable editor
* add regex, sort, refresh
* make the label and spacing consistent
* add test for changing datasource
* make the preview label consistent with all labels on the editor
* Remote Alertmanager: Consider auto-gen routes when flagging a config as 'default'
* remove always-nil error from isDefaultConfiguration
* remove unnecessary context.Background() in test
* pass orgID to autogenFn call during AM creation
* fix test
* make update-workspace
* Fix incorrect country for Asia/Singapore timezone
* Add test
* link to gh issue
* skip test
---------
Co-authored-by: joshhunt <josh.hunt@grafana.com>
* 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
* add active_time_intervals to route model
* update k8s compat layer
* update notification policies service to validate active time intervals
* update integration tests
* update openapi
* add active time interval to model
* update route generator to include active time interval
* Update storage list and rename methods to handle active intervals
* update api model
* update provisioning and export models
* update ui to allow active timing config
* update i18n
* fix snapshots for ui tests
* run prettier
* Alerting: Active time intervals UI naming (#104402)
* update naming in UI
* update naming in the edit page title
* update translations
* update alerting module
---------
Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
* refactor: remove unused code in the function
* test: add unit tests for admission handler
* Revert "refactor: remove unused code in the function"
This reverts commit b8f48dbdbf.
* revert: added again due to incorrectly made test scenario
* test: add unit tests for admission handler
* Re-enable `jsx-a11y` recommended rules
* apply rule in correct place, couple of fixes
* fix up some a11y issues
* add ignore for keyboard a11y for now
* readd testid
* close carousel on backdrop click
* use type="button"
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* 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
* Add pause/unpause bulk actions button in the alert list view
* add delete bulk action
* Add tracking and refactor FolderActionMenuItem
* update translations and text
* update text
* add finally
* use ability for delete action
* don't show bulk actions if no action is allowed
* invalidate tags for delete action
* revert invalidating and redirect to list page instead
* redirect when pausing/unpausing
* add pause/unpause endpoints
* add translations
* add folder name in delete modal
* address pr review
* disable pause/unpause
* update redirect
* remove unnecessary prop
* rename FolderActionMenuItem component to PauseUnpauseActionMenuItem
* address review comments
* fetch rules before redirecting in list view 1
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>
* jaeger backend migration
* move processing to JaegerClient.Search
* fix upload query error source type
* suggestions
* lint
* fix link to traceid query
* fix tests
* fix tests
* use consistent types
* add tests for TransformSearchResponse fn
* test search function
* fix filtering using tags
* suggestion
* remove unnecessary arguments
* use logfmt parser for tags
* test
* test
* use logfmt for query tags
* update
* go fmt
* run backend for all queryTypes
* run make update-workspace
* assign owner to logfmt pkg in go.mod
* apply suggestions
* update tests
* trigger workflows?
* Docs: SAML docs refactoring
* Cleanup the root page
* Update the root file
* Refactor Azure AD guide
* Change the order of the tree
* Remove the index file again, back from main
* SAML UI page review and editing
* Review and edit SAML config options page
* SAML signing and encryption edit/review
* Remaining pages and aliases
* Fix PR comments
* More fixes
* Update _index.md
* Update _index.md
* Update _index.md
* Apply suggestions from code review
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Handle PR comments
---------
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* LogLine: introduce truncation limit
* Processing: turn LogListModel into a class
* LogLine: introduce collapsed/expanded state and read from model
* Virtualization: correct extra line for controls in size
* LogLine: fix collapsed state initialization
* Add new criteria to define long lines to truncate
* Virtualization: better truncation limit
* Check collapsed state based on container size
* Update function name
* Extract translations
* LogLine: update unit test
* virtualization: add unit test
* processing: update unit test
* Fix focused test
* processing: process fields on demand
* Logs: consider loading state from explore
* LogList: improve resize and recalculation
* chore: build?
* feat: filter and sort sub tables
* chore: extract row processing into it's own function for filtering and sorting
---------
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
* add tag handler for snowflake ids
* add snowflake generator
* fill snowflake id back to the bean
* table driven test, mockable snowflake generator
* use math/rand/v2
* snowflake without time.sleep
* more explicit bitwise modulo
* rename snowflake to randomid
* use push event instead of pull_request_target
* pull request sha -> push sha
* remove PR specific stuff from pr-patch-check
* use my branch for testing
* use main now that it's working
* initial updates
* additional updates - index and config dos
* made edits, renamed the index files.
* Close unclosed shortcode
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* updated main and config docs
* edits to query editor and templates
* final edits to landing page
* added updates
* made a few additional edits
* edits
* final edits and changes per dev feedback
* reviewed titles and headings; ran prettier
* added ref URIs
* Update docs/sources/datasources/prometheus/template-variables/_index.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update docs/sources/datasources/prometheus/configure/_index.md
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* Update docs/sources/datasources/prometheus/template-variables/_index.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* updates based on feedback
* ran prettier
* updates due to feedback
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* add set/get feature toggles functions to grafana/ui
* configure grafana/ui feature toggle localeFormatPreference in app init
* revert more complex approach and use contained access to global
* Bring back contact points filter
* Use GMA Prometheus endpoint as main source of truth on the list page
* refactor: improve error handling in GrafanaRuleLoader
* Refactor ChannelOptions and related components for improved secure field handling
- Updated ChannelOptions to utilize integrationPrefix for path management.
- Introduced getOptionMeta for dynamic option metadata handling.
- Enhanced ChannelSubForm to manage secure fields and subform deletions.
- Refactored OptionField and SubformField to support new secure field logic.
- Adjusted types for better clarity and integration with the form context.
* Fix Combobox sizing
* Refactor ChannelSubForm and ChannelOptions for improved field handling
- Updated ChannelOptions to enhance secure field management.
- Refactored ChannelSubForm to replace Select with Combobox for better user experience.
- Adjusted type options handling in ChannelSubForm to align with new Combobox implementation.
- Cleaned up unused code and improved overall readability.
* Refactor contact point components for improved secure field handling and remove obsolete secure settings field
- Removed secureSettings from various components and tests to streamline the receiver configuration.
- Updated GrafanaReceiverForm to manage secure fields more effectively.
- Enhanced test cases for Slack contact points to ensure proper field behavior based on user input.
- Introduced a factory for creating mock Grafana contact points and receiver configurations for better test coverage.
* Improve conversion from form values to grafana receivers
* Revert Combobox migration and bring back Select for contact point type selector
* Update Grafana OnCall to Grafana IRM in notifier settings and enhance test coverage for SNS contact points
- Renamed notifier settings from 'Grafana OnCall' to 'Grafana IRM' in mockGrafanaNotifiers.
- Updated test cases in GrafanaReceiverForm to handle SNS contact points, including secure field management.
- Improved test assertions and added new tests for SNS integration to ensure correct behavior and state management.
- Refactored related components for better clarity and maintainability.
* Add secret fiels removal tests
* Fix mocks, remove Combobox changes
* Update snapshots
* Remove obsolete snapshot
* feat: pass read-only props to extension components
This initial commit is used to verify that things are broken in case
the datasource object is not cloned before passed in as a prop.
* chore: update tests
---------
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
* Add pills in search bar for context
* Add scope actions
* Add selection functionality
* Show selected scope on secondary row
* Fix selected scope titles
* Add some basic tests
* Test for toggle by name
* Remove unnecessary mocking
* Small cleanups
* Lint fixes
* Fix test
* Update public/app/features/scopes/selector/ScopesSelectorService.ts
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* Bump input and breadcrumbs test
* Change breadcrumbs color
* Makes the breacrumb spacing consistent
---------
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* ci(levitate): remove backticks and escaping to fix json parsing
* ci(levitate): use code tag over escaping backticks - HTML FTW
* chore(prometheus-package): dummy commit to test levitate changes
* ci(levitate): use actions/github-script@v7 everywhere
* Add format validation for allowed_organizations and allowed_groups
* Refactor, introduce ListFormatValidation
* Add tests
* Update apps/advisor/pkg/app/checks/authchecks/list_format_validation.go
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
* Update apps/advisor/pkg/app/checks/authchecks/list_format_validation.go
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
* Use one step instead of multiple separate ones
---------
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
* Update dependency downshift to v9.0.9
* change conditional typing to error on the onChange property with an easier to read error instead of on the component
add workaround for type script not being able to infer when onChange can accept null
add type test
* better Combobox types!
* remove unused import
* make type changes more backwards compatible
* improve comment
* even better comments
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: samsch <git@samsch.org>
* 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>
* replace xorm.io/xorm imports
* replace xorm from other go.mod files
* clean up workspace
* nolint does not make sense anymore as it is not a module
* try if nolint directive helps
* use nolint:all for xorm
* add more nolints
* try to skip xorm in linter config
* exclude xorm differently
* retrigger ci
* Fix TestIntegrationUpdatingProvisionionedDashboards* tests when running on Spanner by fixing case-insensitive search for dashboard title.
* Fix use of case-insensitive LIKE when running on Spanner.
* Fix use of LikeStr in anonstore.
* Fix use of LikeStr in ngalert/store and org/orgimpl.
* Fix use of LikeStr in queryhistory search.
* Fix use of LikeStr in serviceaccounts.
* Fix use of LikeStr in serviceaccounts.
* Fix use of LikeStr in services/team.
* Remove LikeStr method.
* convert to ts
* fix path
* add yarn install step
* revert to commonjs for now
* weird syntax...
* test task creation
* just use workflow step id
* update workflow
* get workflow step id from crowdin
* testing...
* final test
* tidy up
* typescript with type assertion until upstream is fixed
* fix CODEOWNERS
* Fix: do not map when identifying default grafana ds
* add also datasource type
* Refactor code, add unit test
* Fix types references and linting
* Update public/app/features/manage-dashboards/state/actions.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Chore: Fix remaining levitate zizmur issues and move to use vault
* Levitate CI: Remove secrets usage for WIF identity provider and SA (#104783)
---------
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
* introduce alerting notification app
* move code as is and remove from old registry
* update api server registration
* update make file and remove unnecessary args, copy some useful make commands from dashboards
* update codeowners
* move constants inside module and remove dependency from grafana
* add support for selectors to the app builder
* tweak ringKey/ringName for consistency and allow us to configure memberlist cluster label config
* allow setting memberlist cluster label verification disabled field
---------
Co-authored-by: Peter Štibraný <pstibrany@gmail.com>
* Add some clone tests
* Add case to create ref if it doesn't not exist
* Add unit tests for context cancellation
* Bare repository not needed
* Make tests work without git command
Delete epic-add-to-platform-ux-parent-project.yml
This is an old workflow which is no longer used.
Co-authored-by: Mihaela Maior <mihaela.maior@grafana.com>
* Updates the instrumentation_server service to use mux instead of the builtin router, and have it store the router in the module server: this is so we can register the /ring endpoint to check the status of the ring
* Create a new Ring service that depends on the instrumentation server and declares it as a dependency for the storage server
* Create standalone MemberlistKV service for Ring service to use
* Update the storage server Search and GetStats handler to distribute requests if applicable
* adding ml items to main navigation if plugin is installed
* undoing testing change
* updating based on feedback and fixing role to be specific to access to ml plugin
* cleanup unneeded constants
* cleanup diff
* updateing GetOrgID call
* adding greyscale ml logo and using that for consistency
* use currentColor
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* New Crowdin translations by GitHub Action
* kick CI
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Sanitize paths before evaluating access to route
* use util.CleanRelativePath
---------
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
* make sure that user permission cache is cleared after new dashboard and folder creation
* more test fixes
* Update pkg/services/dashboards/service/dashboard_service.go
* check identity type in SetDefaultPermissionsAfterCreate, set default permissions for service accounts
* set SA permissions for folders as well
* fix tests
* feat(add): datasources:query support for using the authlib/authzservice
* added test for datasources
* refactor to create the translation right away
* Update pkg/services/authz/rbac/mapper.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* fix tests
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* create the most basic frontend-server module
* expose prom metrics??
* add todo list
* move frontend-service to its own folder in services
* check error from writer.Write
* reword comment, add launch config
* Alerting: Add extended definition to prometheus alert rules api
This adds `isPaused` and `notificationSettings` to the paginated rules api to enable the paginated view of GMA rules.
refactor: make alert rule status and state retrieval extensible
This lets us get status from other sources than the local ruler.
* update swagger spec
* add safety checks in test
* Add unit test for unimplemented methods
* Add unit test for GoGitRepo_Read
* Add tests for Delete
* Add more tests
* Add unit test for GoGitRepo_Push
* Add unit test for ReadTree
* Add test for GitHubRepository_LatestRef
* Add test for GitHubRepository_LatestRef
* Add test for GitHubRepository_CommentPullRequest
* Add remaining tests for GitHubRepository
* Add remaining tests for GitHubRepository
* Fix linting
* Refactor current solution
* Run traceid queries with enabled node graph through backend
* Update test
* Fix lint
* Uodate based on feedback, don't spread
* replace and return the builtin variables
* don't parse the expression twice
* improve the replacement logic
* better code with more tests
* lint
* betterer
* rename the test suite
* Add unit tests IsAuthenticated
* Add unit tests RepoExists
* Add unit tests GetContents
* Add initial unit tests GetTree
* Add unit tests for CreateFile
* Add unit test UpdateFile
* Add unit tests DeleteFile
* Add unit tests for Commits
* Add unit tests for helpers
* Add unit test CompareCommits
* Add GetBranch tests
* Add unit tests BranchExists and CreateBranch
* Add unit tests Webhooks
* Remove unused code
* Add unit tests CommentPullRequest
* Add more cases for GetTree
* Complete coverage
* Fix linting
* remove prometheusUsesCombobox feature toggle
* betterer
* fix the unit test
* create MetricsLabelsSection unit tests
* fix unit tests
* fix unit tests in PromQueryBuilder.test.tsx
* prettier
* remove timeouts
* Revert "remove timeouts"
This reverts commit 84af1fd46b.
* Test validate
* Complete tests for validate
* Add tests for validate
* Add unit tests Read
* Add unit tests ReadTree
* Add unit tests Create
* More specific on apierrors
* Improve coverage
* Add unit tests for Update
* Add unit tests for Write
* Add tests for deletion
* Add test for recursion error
* Add unit tests History
* Add basic scenarios webhook method
* Add cases for push
* Add unit tests for pull request event
* Remove addressed FIXME
* Meta import
* Use sha256
* Fix linting error use of As
* 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>
* Add FiredAt field to the State
* Update featuretoggle files
* Fix lint errors
* Fix test compilation
* Remove random print line + formatting
* Address PR comments
* remove unused part of xorm
* remove onlytodb and onlyfromdb tags
* only keep snapemapper, since we always assumed it is the only one available in xorm
* SQLTemplates: Add helper to ensure all templates have a test-case associated
* UnifiedStorage: Add missing sql template test case
* LegacyDashboards: Add sql templates fs to test cases for exhaustiveness check
* RBACStore: Add sql templates fs to test cases for exhaustiveness check
* LegacyIAM: Add missing sql template test cases
* Add user-facing feature toggle functionality for the new alerting list view
- Implemented `useFeatureToggle` hook to manage feature toggles using local storage.
- Added unit tests for `useFeatureToggle` to verify behavior for various toggle states.
- Updated `RuleList` components to utilize the new feature toggle for alerting list view.
- Introduced `RuleListPageTitle` component to handle toggling between list views with a badge indicator.
* Add tests
* Fix imports and remove unused code
* Add a new feature flag for list v2 preview button
* Hide v2 preview button behind the new feature flag
* Update list v2 feature toggle stage
* Alerting: List view feature toggle button PR review (#104161)
* Add test for undefined feature toggles case
* Tweak tests to use test utils and user
* Add i18n for toggle button and tweak props spreading
* Update translations
---------
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
* 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
* Add recent scopes to command palette
* Remove parent action
* Support updating select set of scopes
* Filter out currently selected scope
* Add recent scopes to drawer
* Add expandable section
* Add recent scopes component
* Only show recommended for leaf nodes
* Small style fixes
* Always write to recent after fetching new scopes
* Add feature toggle check for command palette
* Use i18n
* Remove unused prop
* Add test cases for recent scopes in selector
* Add more test cases
* Add clear test action
* Remove unused imports
* Geomap: Tooltip for multiple features same coord
* Add basic test coverage
* Be explicit with sorting to avoid truthiness error
* Add sorting to tests and clean up
* Check again for duplicates
* WIP: Separate signature package
* Add some unit tests
* Test factory
* Finish unit test coverage signature package
* Fix register
* Add FIXME
* Add more coverage
* Add more coverage
* Fix migrate tests
* Fix unit tests
* convert it to functional component
* useReducer
* usePromQueryFieldEffects
* clean up the code
* remove localStorage provider
* introduce usePromQueryFieldEffects.test.ts
* simpler state management
* remove mocks
* linting + betterer
* Split PrometheusMetricsBrowser into small functional components
* remove /series endpoint usages for Metrics Browser
* add time ranges
* remove unused file
* fix unit test
* use limit
* re-fetch labels when a label value is selected
* reset the label keys when selector is empty
* select multiple labelValue
* fix unit tests
* add comments
* don't show unpresented labelKeys
* don't clear out selected label keys that are in local storage
* show values properly
* fix clearing
* don't discard already selected label values when a new label value selected
* remove unnecessary unit test
* clear all selections
* if metrics list is empty remove all label keys too
* re-populate values when all label selections are removed
* safety
* more comments
* updating the whole fetching mechanism
* buildSafeSelector
* loadSelectedLabelsFromStorage
* fetchMetrics
* fetchLabelKeys
* fetchLabelValues
* more unit test and comment
* timeRange changes will trigger re-fetch
* some more comments
* fix the unit test
* lint
* fix unit tests
* fix timerange causing problem
* remove fethcing message
* proper initialization
* fix value fetching during metric selection
* fix value fetching
* fix unit tests
* fix a bug
* comments
* some precaution
* fix the test
* fetch metrics when metric selection is changed
* trigger initialize when seriesLimit is change
* Revert "trigger initialize when seriesLimit is change"
This reverts commit c6cbbc1386.
* remove redundant comments
* e2e: improves flakiness
* Chore: refactor flaky test
* e2e: more refactor
* e2e: do not keep successfull test run videos
* e2e: do not log selectors
* chore: updates after pr feedback
* chore: updates after pr feedback
* chore: adds retries to flaky e2e test
* e2e: skip flaky tests
* e2e: skip flaky tests
* e2e: revert back to timeout
* chore: removes all the skips
Throw errors when trying to call List in legacy with an RV specified
Change ResourceVersion to microseconds
Co-authored-by: Marco de Abreu <18629099+marcoabreu@users.noreply.github.com>
* Alerting: Update docs for RBAC
This updates the documentation for RBAC to match the changes from 032299011a
* add note about RBAC permissions with datasource permissions
* writers toolkit update
* Rename and make folder migrator public
* Move skipRepo out of tree
* Move folder logic out of worker
* Use wrapper function for clone
* Introduce storage swapper
* Use RepositoryResources interface
* Add TODO
* Signature with option
* Use plural for folders
* Split more logic out of worker
* Refactor further
* Remove todo
* Refactor further
* Test worker
* Add test for unified storage
* Add mock for bulk store
* Clean line
* Test more about storage
* Happy path storage test
* Finish storage tests
* Add more interfaces
* Add some tests legacy
* Complete test coverage legacy
* Complete coverage legacy
* Fix compilation
* Add initial folders tests
* Finish coverage for folders
* Test namespace cleaner
* Fix typo
* Add some tests for resources
* Finish coverage migrate package
* Update tests
* Fix jobs tests
* Unit test users
* Convert user tests to table tests
* Fix linting in tests
* Fix typo
* Use PreloadAllUserInfo
* Add FIXME
* SQL Expressions: Bump GMS for STDDEV(), VARIANCE()
Bump Go MySQL Server to the latest version, to get support for STDDEV()
and VARIANCE() functions, and their aliases.
See https://github.com/dolthub/go-mysql-server/pull/2928
* Update app-code to comply with latest GMS version
* Run `go mod tidy`
* Update test which had depended on STDDEV being missing
* Run `make update-workspace`
* DataData DS: Add Frame type to Random Walk queries
* Time column should not be nullable
Conversion for the SQL (server-side) expression was failing with:
`failed to convert data frames to long format for sql: missing time field`
Because we weren't seeing a match at:
`if f.Type() == data.FieldTypeTime {`]
here:
acb0e6b609/pkg/expr/convert_to_full_long.go (L155)
The DataPlane docs (https://grafana.com/developers/dataplane/timeseries)
state that:
> - The Time field(s):
> - Should have no null values
So making the fix here
Alerting: fix flaky tests
Some test conditions introduced in #103403 are flaky because they rely on random behavior of the generator.
Sometimes rules are generated with an updated by (which warrants the lookup of the users). This makes it so those tests which are checking the user lookup always have rules with updated by.
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>
'Add noMargin prop to Card components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.',
'Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.',
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.
# Due to a race condition, after initial call to `go tool` golang may report a wrong binary location pointing to the invalid `/tmp/go-buildXXX` directory
definecompile_tool
$(shell \
(cd$(src_dir)/$(1) \
&& GOWORK=offgotool -n$(2) > /dev/null \
&& GOWORK=offgotool -n$(2)) | sed 's/^[[:space:]]*//g'; \
tools_dir := $(shell cd $(dir $(lastword $(MAKEFILE_LIST))) && pwd)
src_dir := $(tools_dir)/src
# Due to a race condition, after initial call to `go tool` golang may report a wrong binary location pointing to the invalid `/tmp/go-buildXXX` directory
define compile_tool
$(shell \
(cd $(src_dir)/$(1) \
&& GOWORK=off go tool -n $(2) > /dev/null \
&& GOWORK=off go tool -n $(2)) | sed 's/^[[:space:]]*//g'; \
# 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
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.