* chore(ci): Run golangci-lint in GitHub Actions
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* chore(ci): Remove lint-backend step from Drone
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Assigns ownership of Alerting backend components to grafana/alerting-backend, due
to deprecation of the existing grafana/alerting-backend-product team.
* chore: bump Go to 1.22.4
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* use go-version-file for ephemeral instances workflows too
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* WIP
* add configure irm componet and pass it to Nav
* add check if theres datasource for Alerts
* update incident steps links
* uncomment done property in the interface
* Fix not having data sources in store and removing warning using wrong Icon name type
* call incidents api in done step
* Show checked steps with an icon instead of a badge
* Implemnt check contact point ready in essentials
* Fix codeowners and prettify file
* Check if there is one oncall integration in at least one contact point
* Refactor
* Check for oncall integration being created
* Add the test oncall integration action
* Do not hide any card in irm page, and refactor
* Refactor: move hooks to a separate file
* Implement oncall chatops checks
* update incidents hook
* Show new irm page only on cloud and for admins
* fix prettier in irmhooks
* remove unused import
* fix prettier in irm hooks
* fix axios method
* Add progress bar on essentials
* Update texts and some styles
* Refactor
* fix api call
* fix check is plugin is installed
* fix async call
* fix lint
* Do not show check icon when done field is undefined in a step
* refactor
* Add test for Essentials
* check if incident plugin installed
* call incidents api to get steps
* add the new api to get config
* fix prettier
* memoize the api call
* fix lint
* add proper api call
* check if response is valid
* fix typo
* use state to save the values
* fix lint
* fix response schema
* fix prettier
* update incident steps copy
* udapte texts in respond tooltips
* Fix confiure IRM route check
* Fix logic for the data source check: check if there is a data source that is alerting compatible
* Use existing header prop in NavLandingPage instead of creating a new prop
* fix wrong updated file
* Update logic for default contact point check and update some links
* Update texts and show only one item for oncall integration with alerting checks
* Update texts following suggestions in the doc
* Fix getting default contact point and update oncall link for slack tab
* Update texts, buttons and checks following last meeting action items
* remove unnecessary component drawer
* Track interactions: user open or close essentials drawer
* Refactor
* remove unnecessary createMonitoringLogger for tracking irm events
* remove unnecessary style
* refactor
* refactor
* Add fallback links and labels for action buttons when step is done
* Update irm card styles
* remove extra space after progress bar numbers
* remove progress bar border
* Address pr review comments
* remove unnecessary AlertmanagerProvider
* fix logic behind default contact point check
* update test
* Address pr review comments part1
* add aria and properties role for Progressbar
* Reorganize hooks into separate folders/files for each app
* move done field to the step level
* Handle empty dropdown options
* Handle loading state
* Update tooltip for connecting alerting to oncall
* Use RTKQ for incidents
* handle loading for oncall hooks
* refactor getting configuration for each app
* fix incident rtkq query to be a query instead of mutation
* refactor: rename variable
* Address some nits in the review
---------
Co-authored-by: reemtariqq <reem.tariq@grafana.com>
* Create basic feature toggle
* Rename context to reflect it contains query history and query library
* Update icons and variants
* Rename hooks
* Update tests
* Fix mock
* Add tracking
* Turn button into a toggle
* Make dropdown active as well
This is required to have better UI and an indication of selected state in split view
* Update Query Library icon
This is to make it consistent with the toolbar button
* Hide query history button when query library is available
This is to avoid confusing UX with 2 button triggering the drawer but with slightly different behavior
* Make the drawer bigger for query library
To avoid confusion for current users and test it internally a bit more it's behind a feature toggle. Bigger drawer may obstruct the view and add more friction in the UX.
* Fix tests
The test was failing because queryLibraryAvailable was set to true for tests. This change makes it more explicit what use case is being tested
* Remove active state underline from the dropdown
* Add basic types and api methods
This is just moved from the app. To be cleaned up and refactored later.
* Move API utils from Query Library app to Grafana packages
* Move API utils from Query Library app to Grafana packages
* Move API utils from Query Library app to Grafana packages
* Add basic table for query templates
* Add sorting
* Style cells
* Style table cells
* Allow closing Query Library drawer from the toolbar
* Remove Private Query toggle
It will be moved to the kebab
* Add empty state
* Remove variables detection for now
Just to simplify the PR, it's not needed for Explore yet.
* Simplify getting useDatasource.tsx
* Rename cell
* Move QueryTemplatesTable to a separate folder
* Use RTK Query to get list of query templates
* Clean up query templates table
* Simplify useDatasource hook
* Add a test
* Retrigger the build
* Remove unused code
* Small clean up
* Update import
* Add reduxjs/toolkit as a peer dependecy
* Revert "Add reduxjs/toolkit as a peer dependecy"
This reverts commit aa9da6e442.
* Update import
* Add reduxjs/toolkit as a peer dependecy
* Revert "Add reduxjs/toolkit as a peer dependecy"
This reverts commit 2e68a62ab6.
* Add @reduxjs/toolkit as peer dependency
* Add @reduxjs/toolkit as peer dependecy
* Move reactjs/toolkit to dev dependecies
* Minor clean up and use react-redux as a peer dependency
* Move query library code to core features
* Update code owners
* Update export
* Update exports
* Use Redux store instead of APIProvider
* Await for query templates to show during the test
* Add more explicit docs that the feature is experimental
---------
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
* ci: use go.mod as source of truth for actions/setup-go action
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* updating upgrading-go-version.md doc
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* chore: bump Go to 1.21.9
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* regen .drone.yml
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* add deps and script
* add codegen rtk api clise for cloud migration
* rename all the mock exports to mock
* Reset changes to package.json and yarn.lock
* codeowners
* test(jest): isolate script tests to prevent jest errors in grafana-server/tmp tests
* chore(codeowners): update so generate-transformations matches in docs and tests directory
* Move some thema code inside grafana
* Use new codegen instead of thema for core kinds
* Replace TS generator
* Use new generator for go types
* Remove thema from oapi generator
* Remove thema from generators
* Don't use kindsys/thema for core kinds
* Remove kindsys/thema from plugins
* Remove last thema related
* Remove most of cuectx and move utils_ts into codegen. It also deletes wire dependency
* Merge plugins generators
* Delete thema dependency 🎉
* Fix CODEOWNERS
* Fix package name
* Fix TS output names
* More path fixes
* Fix mod codeowners
* Use original plugin's name
* Remove kindsys dependency 🎉
* Modify oapi schema and create an apply function to fix elasticsearch errors
* cue.mod was deleted by mistake
* Fix TS panels
* sort imports
* Fixing elasticsearch output
* Downgrade oapi-codegen library
* Update output ts files
* More fixes
* Restore old elasticsearch generated file and skip its generation. Remove core imports into plugins
* More lint fixes
* Add codeowners
* restore embed.go file
* Fix embed.go
* feat: add incomplete unit test
* refactor: add idea for unit test
* feat: create new e2e test
* feat: add some steps
* feat: add comment
* feat: complete prep work
* feat: complete clean up
* rebase
* feat: add more steps to test flow
* refactor: remove unit test
* refactor: clean up
* refactor: create a provisioned alert rule
* refactor: change location and content
* refactor: e2e test
* refactor: betterer
* refactor: move provisioned alert rule
* refactor: make provisioning file available remote
* refactor: clean up test
* refactor: move provisioned alert rule
* refactor: remove wait()
* feat: restructure first test and add more tests
* feat: add another provisioned alert rule
* feat: add a new test
* feat: complete new test
* refactor: replace data-testid in alert rules
* refactor: replace data-testid
* refactor: fix tests for drone
* refactor: fix third test after review
* refactor: fix last test
* temp
* refactor: improve some things
* refactor: adjust unit tests
* refactor: remove assertions for alert rule details view
* refactor: remove assertions
* refactor: add check for button text
* refactor: remove session storage
* refactor: apply changes from code review
* refactor: add codeowner
* refactor
* refactor
* refactor: clean up
* refactor: clean up
* refactor: clean up
* refactor: increase pa11y threshold for /alerting/list
Removes legacy alerting, so long and thanks for all the fish! 🐟
---------
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Co-authored-by: Sonia Aguilar <soniaAguilarPeiron@users.noreply.github.com>
Co-authored-by: Armand Grillet <armandgrillet@users.noreply.github.com>
Co-authored-by: William Wernert <rwwiv@users.noreply.github.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* Wip
* Wip
* Adapt to load external module
* build: remove cloudmonitoring from built_in_plugins, clean up webpack output
* chore(plugins): remove decoupled plugins from package.json deps
* chore(codeowners): update file for nx.json
* revert(webpack): put back path in config
* build(frontend): use nx to run prod builds of decoupled plugins with yarn build
* style(prometheus): run prettier-write to fix tsconfig.json
* style(backend): remove unused subFile.isDistDir
* revert(locales): remove formatting changes adding new line at end of files
* chore(webpack): clean up dev output
* build(nx): make grafana an nx project, bump lerna and nx
* build(plugin-configs): move cache directory to node_modules
* style(datasource-plugins): add eslint ignore for .gen.ts files
* chore(codeowners): add frontend-ops as owner of project.json
* build(webpack): add getDecoupledPlugins to automatically ignore when watching
* ci(drone): skip nx cache when building frontend packages
* style(ci): fix missing trailing comma
* Revert "style(ci): fix missing trailing comma"
This reverts commit 7520d41576.
* Revert "ci(drone): skip nx cache when building frontend packages"
This reverts commit 46938883ac.
* feat(zipkin): remove from grafana core bundle
* chore(npm): bump nx package to latest 18.0.8
* docs(dev-guide): add a note about what yarn start now builds
---------
Co-authored-by: Andres Martinez <andres.martinez@grafana.com>
* Move files to prometheus-library
* refactor core prometheus to use prometheus-library
* modify client transport options
* mock
* have a type
* import aliases
* rename
* call the right method
* remove unrelated test from the library
* update codeowners
* go work sync
* update go.work.sum
* make swagger-clean && make openapi3-gen
* add promlib to makefile
* remove clilogger
* Export the function
* update unit test
* add prometheus_test.go
* fix mock type
* use mapUtil from grafana-plugin-sdk-go
* Revert "Update dependency @swc/core to v1.4.6"
This reverts commit 4d7220dbdf.
* chore(renovate): ignore swc/core for time being due to bugs in versions ~1.4.5
* chore: bump Go to 1.21.8
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* bump workflows too
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* removed myself from data sources, added to admin (IAM)
* Remove accidental changes
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Rewrite Technical documentation codeowners for readability and consistency
Now it is consistent with the comments at the head of the file, at
least for this section of the repo.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* add playwright test and plugin-e2e
* run tests in ci
* add ds config tests
* add panel edit tests
* add annotation test
* add variable edit page tests
* add explore page tests
* add panel plugin tests
* add readme
* remove comments
* fix broken test
* remove user.json
* remove newline in starlark
* fix lint issue
* ignore failure of playwright tests
* update code owners
* add detailed error messages in every expect
* update message frame
* fix link
* upload report to gcp
* echo url
* add playwright developer guide
* bump plugin-e2e
* add custom provisioning dir
* update plugin-e2e
* remove not used imports
* fix typo
* minor fixes
* use latest version of plugin-e2e
* fix broken link
* use latest plugin-e2e
* add feature toggle scenario verification tests
* bump version
* use auth file from package
* fix type error
* add panel data assertions
* rename parent dir and bump version
* fix codeowners
* reset files
* remove not used file
* update plugin-e2e
* separate tests per role
* pass prov dir
* skip using provisioning fixture
* wip
* fix permission test
* move to e2e dir
* fix path to readme
* post comment with report url
* format starlark
* post comment with report url
* post comment with report url
* fix token
* make test fail
* fix exit code
* bump version
* bump to latest plugin-e2e
* revert reporting message
* remove comments
* readding report comment
* change exit code
* format starlark
* force test to fail
* add new step that posts comment
* fix link
* use latest playwright image
* fix failing test
* format starlark
* remove unused fixture
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
---------
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* Use fixed `/docs/grafana-cloud/alerting-and-irm` URLs for cloud references
* Fix `docs/grafana-cloud/` data sources links
* Fix `docs/grafana-cloud/` Panel & Visualization links
* Fix `/docs/grafana-cloud/` link to Dashboard page
* Set root directory `docs/reference` for non-cloud pages
* Fix `admonition` cannot use a `docs/reference` relative link
* Update `doc-validator`
https://github.com/grafana/technical-documentation/releases/tag/doc-validator%2Fv4.1.0
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Expose betterer results as JSON
* Make prettier and add command
* Add aggregation
* Add json generation to lefthook
* Use relative path
* Add grafanabot as codeowner
* Fix parameter type
* Include changes to results
* Run betterer:json
* clean up intervalv2 functions
* use roundInterval from grafana-plugin-sdk-go
* use from grafana-plugin-sdk-go
* have intervalv2 in publicdashboards and remove tsdb/intervalv2
* legacydata cleanup
* remove unused variables
* Update pkg/tsdb/legacydata/interval/interval.go
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
---------
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
* Revert all previous changes to the workflow
Revert "I18n: Add pr to project board (#82096)"
This reverts commit 30730ebdd8.
Revert "I18n: Fix workflow for adding PR to project board (#82078)"
This reverts commit c16cb7ed3c.
Revert "I18n: Use correct project and pull request ID (#82070)"
This reverts commit 10a130191f.
Revert "Fix incorrect quotes in crowdin-download github action (#82063)"
This reverts commit 945e26516b.
Revert "I18n: Add crowdin PRs to project board (#82059)"
This reverts commit 5b9b990220.
* Add crowdin pr to frontend platform project board
* refactor: clean up first trial
---------
Co-authored-by: Laura Benz <laura.benz@grafana.com>
* introduce feature toggle
* create base service structure
* fix sample metric
* register metrics
* add to codeowners
* separate api dtos from service models
* remove leading newline
* Test using an app instead of token for this workflow
* Rename workflow for testing
* Add a test workflow
* Test 1
* Integrate report
* Checkout repository
* Try with github token instad of the app
* Use short slog instead of adding org
* Add failure to pipeline when breakikng
* Change exit code to report
* Improve message
* Restore files
* Temporarily lift restriction
* Put pack path restriction
* remove comment
* playing around with csv parsing action
* switch to workflow dispatch
* working script
* add a check to not run on forks
* adding check comment
* no idea who should own, adding myself for now
* adding the cleanup script too
* bumping grafanas go version to 1.21.5
* adding how to upgrade go doc
* removing the whole ci-build and corresponding pipelines
* clarifying that we have to run make drone
* fixing starlark linter and removing unused code
* Adding note about enterprise
* trying to change the underyling image to avoid musl issues
* only need to golang one
* remove GRN and switch tenant to namespace
* clean up remaining references
* simplify and remove inconsistency in With* parameters
* parse listing keys so we can use db index
* bump the schema version
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* I18n: Set description of Crowdin PR using GH Actions
* pin action sha
* Apply suggestions from code review
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
---------
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* inital changes, db migration
* changes
* Implement basic GetAll, Delete
* Add first batch of tests
* Add more tests
* Add service tests for GetForProvider, List
* Update http_server.go + wire.go
* Lint + update fixed role
* Update CODEOWNERS
* Change API init
* Change roles, rename
* Review with @kalleep
* Revert a mistakenly changed part
* Updates based on @dmihai 's feedback
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* Chore: Replace grafana-authnz-team with identity-access-team as code owner
* Chore: Replace grafana-authnz-team with identity-access-team as code owner
* Fix the failing test
* Update workflow that synchronizes the `make docs` procedure
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Update .github/workflows/update-make-docs.yml
* Only try and commit, push, and open a PR if there are changes
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* attempt to fix levitate workflow
* add comment to force levitate to run
* update node version in levitate workflow
* change to test levitate
* remove dummy comment
* try upgrading react-redux
* memoize getNavModel selector, don't return a new object in command palette selector
* use createSelector to memoize some alert manager selectors correctly
* memoize selectors correctly in appNotifications
* memoize some datasource selectors
* use fake timers to avoid the debounce causing flakiness
* remove duplicate import
* just use memoize-one
* update some comments, remove some things from the ignore list
* remove @mdx-js/react since storybook now directly depends on it
* add issue link to comment
* exclude @locker from grouped patch updates
* ignore grafana-e2e from renovate