Some refactoring that will simplify next changes for dry-run PRs. This should be no-op as far as the created ngalert resources and database state, though it does change some logs.
The key change here is to modify migrateOrg to return pairs of legacy struct + ngalert struct instead of actually persisting the alerts and alertmanager config. This will allow us to capture error information during dry-run migration.
It also moves most persistence-related operations such as title deduplication and folder creation to the right before we persist. This will simplify eventual partial migrations (individual alerts, dashboards, channels, ...).
Additionally it changes channel code to deal with PostableGrafanaReceiver instead of PostableApiReceiver (integration instead of contact point).
* fix id token hint information
* Update docs/sources/setup-grafana/configure-security/configure-authentication/keycloak/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Separate overlapping legacy and UA alerting routes
api/alert-notifiers, alerting/list, and alerting/notifications existed in both
legacy and UA.
Rename legacy route paths and nav ids to be independent of UA ones.
* 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
Backend:
* Update the Grafana Alerting engine to provide feedback to HysteresisCommand. The feedback information is stored in state.Manager as a fingerprint of each state. The fingerprint is persisted to the database. Only fingerprints that belong to Pending and Alerting states are considered as "loaded" and provided back to the command.
- add ResultFingerprint to state.State. It's different from other fingerprints we store in the state because it is calculated from the result labels.
- add rule_fingerprint column to alert_instance
- update alerting evaluator to accept AlertingResultsReader via context, and update scheduler to provide it.
- add AlertingResultsFromRuleState that implements the new interface in eval package
- update getExprRequest to patch the hysteresis command.
* Only one "Recovery Threshold" query is allowed to be used in the alert rule and it must be the Condition.
Frontend:
* Add hysteresis option to Threshold in UI. It's called "Recovery Threshold"
* Add test for getUnloadEvaluatorTypeFromCondition
* Hide hysteresis in panel expressions
* Refactor isInvalid and add test for it
* Remove unnecesary React.memo
* Add tests for updateEvaluatorConditions
---------
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
* Adding the link to the E2C migration guide
* Update docs/sources/introduction/grafana-enterprise.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Add/Remove columns values to the filter using a UX similar to the github inbox
* Align select all checkbox and fix wording
* Update docs/sources/panels-visualizations/visualizations/table/index.md
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
---------
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* use floating-ui instead of react-popper-tooltip in Tooltip
* remove useTheme2 usage
* remove escape handling logic in favour of useDismiss
* don't need this useEffect anymore
* convert Toggletip to use floating-ui
* use explicit version
* convert OperationInfoButton to use Toggletip
* convert nestedFolderPicker to use floating-ui
* convert Dropdown to use floating-ui and remove react-popper-tooltip
* fix Modal/Tooltip tests
* revert to old toggletip behaviour
* revert OperationInfoButton to not use Toggletip
* add mock for requestAnimationFrame
* remove requestAnimationFrame mock
* remove fakeTimers where they're not used
* use floating-ui in ButtonSelect
* Fix filters unit tests
* only attach description if label is different
* use 'fixed' strategy for Toggletip
* use stroke and strokeWidth
* set move: false to only show the tooltip if a hover event occurs
* update type for onClose