* 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.
'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.',
# 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.
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:
needs:detect-changes
permissions:
contents:read
id-token:write
# Run this workflow only for PRs from forks; if it gets merged into `main` or `release-*`,
# the `lint-frontend-prettier-enterprise` workflow will run instead
description: 'The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example:7.4.3,7.4.3-preview or 7.4.3-preview1'
# We need "write" permissions on the PR to be able to add a label.
pull_request_target: # zizmor:ignore[dangerous-triggers] We need this to have labelling permissions. There are no user inputs here, so we should be fine.
types:
- opened
permissions:{}
jobs:
label-if-external:
name:Add 'pr/external' label if the PR is external
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.