* adding some logs to better understand what might be happening
* only focus this PR on improve logging in finalizer handling
* debug log before calling finalizers
* working on finalizers
* removing last todos, adding unit tests
* better use SupportedFinalizers name
* addressing comments
* wip: fix tests and add delete error in status
* chore: codegen
* chore: codegen openapi
* Merge remote-tracking branch 'origin/main' into provisioning-finalisers-fix-2
* update frontend client
* fix: errors in testing
* fix: breaking test
---------
Co-authored-by: Daniele Ferru <daniele.ferru@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
- Fix metricEditorMode logic to match frontend hasOwnProperty behavior
- Fix metricQueryType to only set when property doesn't exist
- Fix statistics processing to handle all types like frontend does
- Fix null statistic handling to match frontend behavior
- Fix object string representation to match JavaScript behavior
- Add comprehensive test coverage for all CloudWatch migration scenarios
- Achieve 100% backend-frontend consistency for v34 migration
* Fix v34 CloudWatch migration backend-frontend inconsistencies
- Fix metricEditorMode logic to match frontend hasOwnProperty behavior
- Fix metricQueryType to only set when property doesn't exist
- Fix statistics processing to handle all types like frontend does
- Fix null statistic handling to match frontend behavior
- Fix object string representation to match JavaScript behavior
- Add comprehensive test coverage for all CloudWatch migration scenarios
- Achieve 100% backend-frontend consistency for v34 migration
* Improve v34 CloudWatch migration test coverage
- Add targeted tests for hasOwnProperty logic coverage
- Add comprehensive getSuffixForStat coverage (all data types)
- Add generateNextRefId double letter generation tests
- Simplify test cases while maintaining full coverage
- Achieve 93%+ coverage on all critical v34 functions
- Remove redundant test cases for better maintainability
* Clean up v34 CloudWatch migration code
- Remove unnecessary comments and documentation
- Simplify function signatures and logic
- Maintain functionality while improving readability
- Keep essential logic intact with cleaner code
* Only remove unnecessary comments
* update tests to assert against snapshot
* remove channel_config package replaced by schemas from alerting module
* update references to use new schema
* Add a CI step for checking app SDK codegen status
What
This commit adds a CI step for checking the status of code generated
with Grafana App SDK. The step fails if there is a git diff as a result
of the codegen step.
It also updates generated code to make sure we're starting from a
correct state.
Why
This ensures that when the schemas or the SDK version are updated, the
codegen mismatch is caught early at the PR stage.
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Format generated code
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
---------
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* migrate to new manifest format
* rename app to alerting.notifications to not conflict with rules
* disable custom field selectors as they are not supported in appinstaller
* codegen fix
* Return user role from the legacy store
* Lint
* Add tests, gen openapi
* make generate
* revert go.mod, go.sum, go.work.sum changes
* Update go.mod and go.sum
* initialize permissionstore if ignoring legacy storage
* pass through feature toggles
* extract repeated logic to method
* remove extra TODOs
* workspace
* implement team creation for legacy store
* add generated code
* add basic integration test
* add new fields to get and list teams
* fix sql tests for teams
* register dual writer for team resource
* add generated code
* add more sql tests for team creation
* address feedback
* add integration tests
* add origin to receiver
* populate origin of the receiver
* set CanUse to false if origin is not Grafana
* set provenance if origin is imported
* set Grafana origin by default in conversion API
* set canUse annotation
* reject update\delete operations on resources with origin other than Grafana
* fail to create with wrong origin
* Chore: Update authlib
* exclude incompatible version of github.com/grafana/gomemcache
* Update go-jose to v4
* fix jose imports
* remove jose v3 from go.mod
* fix tests
* fix serialize
* fix failing live tests
* add v1 of ES256 testkeys. Port tests to use ES256 instead of HS256
* accept more signature algs for okta and azuread
* azure social graph token sig
* accept more signature algs for oauth refresh and jwt auth
* update workspace
* add a static signer for inproc
* rebase and fix ext_jwt
* fix jwt tests
* apply alex patch on gomemcache
* update linting
* fix ext_jwt panic
* update workspaces
---------
Co-authored-by: Jo Garnier <git@jguer.space>
This renames `data` to `expressions` for clarity in the rules apis.
Also makes certain fields that are redundant optional in the case of pure expressions, so that users don't have to specify them when they are not needed (e.g. not datasource queries).
* support panel actions
* refactor
* add test; move action transformer to utils
* refactor so v2 headers and queryParams are just a simple record
* update open api
* update actions to be same shape accross all dashboard schemas and add validation on the backend
* cleanup
* update snapshot
* add tests to validation