First pass at a backend api built on top off app platform for shared-queries in explore and a query library with templating. Highly Experimental.
Under grafanaAPIServerWithExperimentalAPIs = true
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
This pull request updates our fork of Alertmanager to commit 65bdab0, which is based on commit 5658f8c in Prometheus Alertmanager.
It applies the changes from grafana/alerting#155 which removes the overrides for validation of alerts, labels and silences that we had put in place to allow alerts and silences to work for non-Prometheus datasources. However, as this is now supported in Alertmanager with the UTF-8 work, we can use the new upstream functions and remove these overrides.
The compat package is a package in Alertmanager that takes care of backwards compatibility when parsing matchers, validating alerts, labels and silences. It has three modes: classic mode, UTF-8 strict mode, fallback mode. These modes are controlled via compat.InitFromFlags. Grafana initializes the compat package without any feature flags, which is the equivalent of fallback mode. Classic and UTF-8 strict mode are used in Mimir.
While Grafana Managed Alerts have no need for fallback mode, Grafana can still be used as an interface to manage the configurations of Mimir Alertmanagers and view configurations of Prometheus Alertmanager, and those installations might not have migrated or being running on older versions. Such installations behave as if in classic mode, and Grafana must be able to parse their configurations to interact with them for some period of time. As such, Grafana uses fallback mode until we are ready to drop support for outdated installations of Mimir and the Prometheus Alertmanager.
* Switching dependencie to the correct owner
* switching storrage-blog-go back to backend platform
* reverting some of the mod assignements
* reverting some of the changes
* not sure how it got changed, but switching this one back
* chore: Bump google.golang.org/grpc from 1.59.0 to 1.60.1
* Bump google.golang.org/protobuf to v1.32.0
* Fix make protobuf failing with latest protoc and protoc-gen-go
* Re-generate protobuf files
* Re-generate protobuf files
* Bump grafana-plugin-sdk-go
* go mod tidy
* Nested Folders: Fix /api/folders pagination
We used to check access to the root folders after fetching them from the DB with pagination.
This fix splits logic for fetching folders in:
- fetching subfolders
- fetching root folders
and refactors the query for the latter so that is filters by folders with permissions
* Add tests
* Update benchmarks
* Plugins: add option to disable TLS in the socks proxy
* fix allow_insecure docs
* upgrade github.com/grafana/grafana-plugin-sdk-go from v0.196.0 to v0.197.0
* fix conflicts
* Chore: Bump k8s dependencies to v0.29.0
* update the openapi fork
* use post process spec
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Add Azure settings and update tests
* Filter by plugin ID
* Add forward settings config variable
* Update line
* Add tests
* Update so that data sources are fully defined in config
* Update SDK and test
* Fix lint
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
* Remove unnecessary if
---------
Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
* Send sanitized selectors to the Pyroscope backend for LabelNames and LabelValues
* Clean LabelNames response to remove already used labels
* Improve performance after major changes
* Fix import order
* Further improve rendering performance
* Fix frontend tests
* Fix fake pyroscope client signature
* Bump pyroscope/api dependency to include start/end in LabelNames/LabelValues
* Fix issue with old queries running when using the run button
* Add generated file
* Make code more readable, add a few comments
* Format with prettier
* Fix error when assigning data
* Revert "Add generated file"
This reverts commit c4f33727b8.
* Remove leftover code
* Simplify query editor internal state objects
* Move label selector validation up, improve label filtering
* Simplify query editor state, switch to debounce to reduce rerenders
* Revert cosmetic change
* first round of entityapi updates
- quote column names and clean up insert/update queries
- replace grn with guid
- streamline table structure
fixes
streamline entity history
move EntitySummary into proto
remove EntitySummary
add guid to json
fix tests
change DB_Uuid to DB_NVarchar
fix folder test
convert interface to any
more cleanup
start entity store under grafana-apiserver dskit target
CRUD working, kind of
rough cut of wiring entity api to kube-apiserver
fake grafana user in context
add key to entity
list working
revert unnecessary changes
move entity storage files to their own package, clean up
use accessor to read/write grafana annotations
implement separate Create and Update functions
* go mod tidy
* switch from Kind to resource
* basic grpc storage server
* basic support for grpc entity store
* don't connect to database unless it's needed, pass user identity over grpc
* support getting user from k8s context, fix some mysql issues
* assign owner to snowflake dependency
* switch from ulid to uuid for guids
* cleanup, rename Search to List
* remove entityListResult
* EntityAPI: remove extra user abstraction (#79033)
* remove extra user abstraction
* add test stub (but
* move grpc context setup into client wrapper, fix lint issue
* remove unused constants
* remove custom json stuff
* basic list filtering, add todo
* change target to storage-server, allow entityStore flag in prod mode
* fix issue with Update
* EntityAPI: make test work, need to resolve expected differences (#79123)
* make test work, need to resolve expected differences
* remove the fields not supported by legacy
* sanitize out the bits legacy does not support
* sanitize out the bits legacy does not support
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* update feature toggle generated files
* remove unused http headers
* update feature flag strategy
* devmode
* update readme
* spelling
* readme
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Change x/net ownership
* Update go.mod
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
---------
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
* Update Tempo devenv to include profiles
* Update devenv to scrape profiles from local services
* Cleanup devenv
* Fix issue with flame graph
* Add width prop to ProfileTypeCascader
* Add trace to profiles settings
* Add new spanSelector API
* Add spanSelector to query editor
* Update span link query
* Conditionally show span link
* Combine profile and spanProfile query types and run specific query type in backend based on spanSelector presence
* Update placeholder
* Create feature toggle
* Remove spanProfile query type
* Cleanup
* Use feeature toggle
* Update feature toggle
* Update devenv
* Update devenv
* Tests
* Tests
* Profiles for this span
* Styling
* Types
* Update type check
* Tidier funcs
* Add config links from dataframe
* Remove time shift
* Update tests
* Update range in test
* Simplify span link logic
* Update default keys
* Update pyro link
* Use const
* update with sdk
* do sql
* fix core plugins
* fix proxy settings
* bump SDK version
* tidy
* enable pdc for test
* add codeowners
* bump dep
* go mod tidy
* bump SDK
* Use apache/arrow v13
* remove apache/thrift
* go mod tidy with go1.21.1
* add metrics team as owner
---------
Co-authored-by: Kyle Brandt <kyle@grafana.com>
* Add support for MI authentication to MSSQL
This adds support for managed identity authentication for MSSQL managed
instances running in Azure.
Co-authored-by: baldm0mma <jev.forsberg@grafana.com>
This is preparative work for extending the grafana server cli command to target individual dskit modules that seemed worth breaking into this smaller PR. This moves the CLI flags and various reusable chunks of code into variables and methods.
* gRPC Server: Instrument requests made to the server.
Expose metrics from the gRPC server in order to monitor for failed responses
and response latency. Uses code from the already vendored weaveworks/common.
* Review comments.
* add grafana-apiserver
* remove watchset & move provisioning and http server to background
services
* remove scheme
* otel fixes (#70874)
* remove module ProvideRegistry test
* use certgenerator from apiserver package
* Control collector/pdata from going to v1.0.0-rc8 (as Tempo 1.5.1 would have it)
* Refactor Tempo datasource backend to support multiple queryData types.
Added traceId query type that is set when performing the request but doesn't map to a tab.
* WIP data is reaching the frontend
* WIP
* Use channels and goroutines
* Some fixes
* Simplify backend code.
Return traces, metrics, state and error in a dataframe.
Shared state type between FE and BE.
Use getStream() instead of getQueryData()
* Handle errors in frontend
* Update Tempo and use same URL for RPC and HTTP
* Cleanup backend code
* Merge main
* Create grpc client only with host and authenticate
* Create grpc client only with host and authenticate
* Cleanup
* Add streaming to TraceQL Search tab
* Fix merge conflicts
* Added tests for processStream
* make gen-cue
* make gen-cue
* goimports
* lint
* Cleanup go.mod
* Comments
* Addressing PR comments
* Fix streaming for tracel search tab
* Added streaming kill switch as the disableTraceQLStreaming feature toggle
* Small comment
* Fix conflicts
* Correctly capture and send all errors as a DF to client
* Fix infinite error loop
* Fix merge conflicts
* Fix test
* Update deprecated import
* Fix feature toggles gen
* Fix merge conflicts
* new go mod
* fix
* remove golang.org/x/mod from go.sum
* restore go.sum for x/mod
* bring back x/mod into go.mod as it is used by build pkg
* Assign oauth2 to authnz
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Assign go-kit log to backend platform
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Assign kindsys to as-code
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Update go.mod
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
* Update go.mod
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
* Update go.mod
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
* implement sofia's suggestions, change ownership to BEP for some imports
* Update go.mod
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Update go.mod
Co-authored-by: sam boyer <sdboyer@grafana.com>
* Update go.mod
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* assign grpc to plugins platform
---------
Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
Co-authored-by: sam boyer <sdboyer@grafana.com>
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
This commit adds support for concurrent queries when saving alert
instances to the database. This is an experimental feature in
response to some customers experiencing delays between rule evaluation
and sending alerts to Alertmanager, resulting in flapping. It is
disabled by default.
* Start local schema registry
* Try to use latest version
* Revert "Try to use latest version"
This reverts commit 682385c0e4.
* update schema registry jenny to validate new lineages
* save kind instead of lineage
* handle plugins
* get published schemas from GH + fix plugins
* handle kind not yet published
* Add script to use in workflow + handle maturity
* first pass on publish-kinds GH workflow
* fix script path
* remove unused script
* use make gen-cue instead of script
* trigger publish-kinds on every commit (for test)
* temporary update to use specific thema commit
* wrapping errors
* remove GH token & refactor for rate limit
* Update publish-kinds.yml
* Update publish-kinds.yml
* revert go.mod and go.sum updates
* use Thema specific commit
* Kind registry v2
* fix script path
* fix second script path
* update go.mod
* update schema registry source
* test checks
* add GITHUB_TOKEN
* revert test checks
* actually write next files when publishing
* Add kind set arg
* Add comments
* clean up workflows
* update Thema
* Update .betterer.results
* few fixes after lineage flattening
* Update publish-kinds-next.yml
* add codeowners for new files
* update thema
* apply review feedback
* update go version in workflows
* clean up workflows
* Add step to generate token and test
* Update publish-kinds-next.yml
* fix script
* try with the app name
* Update publish-kinds-next.yml
* clean up and update release workflow
* add comment
* publish kinds only on cue updates
* (WIP) Refactor the ImageStore interface to work with our latest alerting repository
* update alerting package
* refactor, new URLExists method in ImageProvider
* tests for the new methods
* fix linter warnings
* use alertingImages as an alias for grafana/alerting/images
* logs about image uris and not found images
* nerf image not found logs
* extract duplicated code to getImageFromURI() method
* refactor getImageFromURI()
* add index on url
* add comment about migration log
* sync generated files
* Moving POC files from #64283 to a new branch
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* Adding missing permission definition
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* Force the service instantiation while client isn't merged
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* Merge conf with main
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* Leave go-sqlite3 version unchanged
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* tidy
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* User SearchUserPermissions instead of SearchUsersPermissions
* Replace DummyKeyService with signingkeys.Service
* Use user🆔<id> as subject
* Fix introspection endpoint issue
* Add X-Grafana-Org-Id to get_resources.bash script
* Regenerate toggles_gen.go
* Fix basic.go
* Add GetExternalService tests
* Add GetPublicKeyScopes tests
* Add GetScopesOnUser tests
* Add GetScopes tests
* Add ParsePublicKeyPem tests
* Add database test for GetByName
* re-add comments
* client tests added
* Add GetExternalServicePublicKey tests
* Add other test case to GetExternalServicePublicKey
* client_credentials grant test
* Add test to jwtbearer grant
* Test Comments
* Add handleKeyOptions tests
* Add RSA key generation test
* Add ECDSA by default to EmbeddedSigningKeysService
* Clean up org id scope and audiences
* Add audiences to the DB
* Fix check on Audience
* Fix double import
* Add AC Store mock and align oauthserver tests
* Fix test after rebase
* Adding missing store function to mock
* Fix double import
* Add CODEOWNER
* Fix some linting errors
* errors don't need type assertion
* Typo codeowners
* use mockery for oauthserver store
* Add feature toggle check
* Fix db tests to handle the feature flag
* Adding call to DeleteExternalServiceRole
* Fix flaky test
* Re-organize routes comments and plan futur work
* Add client_id check to Extended JWT client
* Clean up
* Fix
* Remove background service registry instantiation of the OAuth server
* Comment cleanup
* Remove unused client function
* Update go.mod to use the latest ory/fosite commit
* Remove oauth2_server related configs from defaults.ini
* Add audiences to DTO
* Fix flaky test
* Remove registration endpoint and demo scripts. Document code
* Rename packages
* Remove the OAuthService vs OAuthServer confusion
* fix incorrect import ext_jwt_test
* Comments and order
* Comment basic auth
* Remove unecessary todo
* Clean api
* Moving ParsePublicKeyPem to utils
* re ordering functions in service.go
* Fix comment
* comment on the redirect uri
* Add RBAC actions, not only scopes
* Fix tests
* re-import featuremgmt in migrations
* Fix wire
* Fix scopes in test
* Fix flaky test
* Remove todo, the intersection should always return the minimal set
* Remove unecessary check from intersection code
* Allow env overrides on settings
* remove the term app name
* Remove app keyword for client instead and use Name instead of ExternalServiceName
* LogID remove ExternalService ref
* Use Name instead of ExternalServiceName
* Imports order
* Inline
* Using ExternalService and ExternalServiceDTO
* Remove xorm tags
* comment
* Rename client files
* client -> external service
* comments
* Move test to correct package
* slimmer test
* cachedUser -> cachedExternalService
* Fix aggregate store test
* PluginAuthSession -> AuthSession
* Revert the nil cehcks
* Remove unecessary extra
* Removing custom session
* fix typo in test
* Use constants for tests
* Simplify HandleToken tests
* Refactor the HandleTokenRequest test
* test message
* Review test
* Prevent flacky test on client as well
* go imports
* Revert changes from 526e48ad45
* AuthN: Change the External Service registration form (#68649)
* AuthN: change the External Service registration form
* Gen default permissions
* Change demo script registration form
* Remove unecessary comment
* Nit.
* Reduce cyclomatic complexity
* Remove demo_scripts
* Handle case with no service account
* Comments
* Group key gen
* Nit.
* Check the SaveExternalService test
* Rename cachedUser to cachedClient in test
* One more test case to database test
* Comments
* Remove last org scope
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* Update pkg/services/oauthserver/utils/utils_test.go
* Update pkg/services/sqlstore/migrations/oauthserver/migrations.go
Remove comment
* Update pkg/setting/setting.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
---------
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* Update all core kinds to flattened lineages
* Regen Go types, without any
* Regen Go types, s/interface{}/any/
* Update generated core typescript
* Update generate docs
* Fix defaults gen in veneer index jenny
* Flatten plugindef lineage
* Convert all plugin kinds to flattened form
* Switch back to interface{} for now
* Switch to fs.Sub in plugin DeclParser
* Mostly undesirable codegen changes, to be fixed
* Update mod and sum
* Update pfs tests to flattened lineages
* Update thema to latest, regen docs
* remove opentracing and use otel instead
* add various samplers for jaeger
* remove useless test that is covered in otel now
* we do not need a struct there
* remove old tests
* restore tests that parse various configurations
* check errors in tests
* Update pkg/infra/tracing/tracing_test.go
fix typo
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* add test for both legacy and new config formats
* use named constants
---------
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* update to alerting 20230418161049-5f374e58cb32
* rename renamed structs in https://github.com/grafana/alerting/pull/73
* update ValidateContactPoint to use BuildReceiverConfiguration
* update logger factory according to changes
* rewrite integration builder
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
Takes a specific code path for data that identifies itself as dataplane instead of "guessing" what the data is.
The data must identify itself by being in the dataplane by having both the following frame metadata properties:
- TypeVersion property that is greater than 0.0
- 'Type' property
The flag is disableSSEDataplane and disables this functionality and uses the old code for all queries regardless.
See https://github.com/grafana/grafana-plugin-sdk-go/blob/main/data/contract_docs/contract.md for dataplane details.
SDK release notes:
* Logs contract: ignore remaining fields by @gabor in #659
* Logs contract: more robust field finding, explicit approach by @gabor in #660
* Tracing: Support multiple OTel propagators by @xnyo in #663
* Tracing: Add more details to HTTP Outgoing Request by @xnyo in #664
* Data: Encode Nanosecond into JSON by @kylebrandt in #647
* Data: cmp tests using FrameTestCompareOptions() will no longer ignore time differences beyond millisecond resolution
* Upgrade grafana-google-sdk-go to v0.1.0
* Upgrade @grafana/google-sdk to 0.1.1
* Update doc with provisioning example
* Remove unused types
* Use config types from the sdk
* Add metrics
* extract kindsys
* reinstate kindsys report
This may end up living somewhere else (or not! who knows!), but the important part is that I don't get rid of it right now :)
I hate the package layout (kindsysreport/codegen) for the main function and will take pretty much any alternative suggestion, but we can change also change it later.
Note that the generated report.json is in a different location - anything using this (ops something) needs to be updated.
* kindsysreport in codeowners
* Alerting: Add metrics for active receiver and integrations
Introduces metrics that allows us to track the number of configured receivers and integration in the Alertmanager for all orgs.
As a bonus, I realised that the alert reception metrics where not being exported nor collected. This does that too.
* update ldap library and use go module path
* add TLS min version and accepted min TLS version
* set default min ver to library default
* set default min ver to library default
* add cipher list to toml
* Update pkg/services/ldap/settings.go
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* Apply suggestions from code review
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* lint
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Loki backend and client depend on a requester
* Instrument all requests to loki using weaveworks TimedClient
* Construct collector in metrics package
Use latest github.com/grafana/grafana-plugin-sdk-go which includes changes to the TypeVersion property (always present in JSON).
Also included is squtil changes: SQL util - allow using the database scan type for converters
* Update oapi library and thema
* Use fork commit to fix elasticsearch and cloudwatch generators
* Update thema
* Fixes
* Update thema with last fixes
* Sync
* Fix test
* Update thema and schemas
* Update thema
* Alerting: Fix Test Receivers when settings are non-strings
As part of the Alerting extraction, we want to make sure we don't have circular depedencies. As such, I had to move `PostableGrafanaReceiver` to a new struct in `grafana/alerting` called `GrafanaReceiver`.
`PostableGrafanaReceiver` has an attribute called `Settings` that uses a Grafana-propietary struct called `RawMessage`, this struct shadows `json.RawMessage`.
When I created `GrafanaReceiver`, I turned settings into a `map[string]string` thinking all settings would end up as strings. This was a mistake, and this test proves that it doesn't work, and breaks the API.
* Add docs generator
* Add json-to-md conversion
* Fix lint issues
* Remove check for kind type
* Disable prettier for generated docs
* Use schema ref names as identifiers for links & headers
* Display the default value (if so) in the description
* Undo 'draft:false' introduced by mistake
* Update pkg/codegen/jenny_docs.go
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Undraft and unlist kinds documentation (#61476)
* Support running containers without root daemon
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Use section shortcode to automatically list child pages
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Undraft and unlist kinds documentation
This page and child pages are directly accessible but are not listed
in the table of contents.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add docs-preview to browse drafted pages
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Replace end of line and pipe characters in table codegen
* Remove draft status from generated docs
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Robert Horvath <robert.horvath@grafana.com>
* add xorm and xorm/core as package
* remove mssql and oracle as driver
* fix some typo
* remove unittest
* remove some cache
* restore the removed part
* remove logfile
Grafana would forward the X-Grafana-User header to backend plugin request when
dataproxy.send_user_header is enabled. In addition, X-Grafana-User will be automatically
forwarded in outgoing HTTP requests for core/builtin HTTP datasources.
Use grafana-plugin-sdk-go v0.147.0.
Fixes#47734
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* Lattice: Point to private prerelease of aws-sdk-go (#515)
* point to private prerelease of aws-sdk-go
* fix build issue
* Lattice: Adding a feature toggle (#549)
* Adding a feature toggle for lattice
* Change name of feature toggle
* Lattice: List accounts (#543)
* Separate layers
* Introduce testify/mock library
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
* point to version that includes metric api changes (#574)
* add accounts component (#575)
* Test refactor: remove unneeded clientFactoryMock (#581)
* Lattice: Add monitoring badge (#576)
* add monitoring badge
* fix tests
* solve conflict
* Lattice: Add dynamic label for account display name (#579)
* Build: Automatically sync lattice-main with OSS
* Lattice: Point to private prerelease of aws-sdk-go (#515)
* point to private prerelease of aws-sdk-go
* fix build issue
* Lattice: Adding a feature toggle (#549)
* Adding a feature toggle for lattice
* Change name of feature toggle
* Lattice: List accounts (#543)
* Separate layers
* Introduce testify/mock library
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
* point to version that includes metric api changes (#574)
* add accounts component (#575)
* Test refactor: remove unneeded clientFactoryMock (#581)
* Lattice: Add monitoring badge (#576)
* add monitoring badge
* fix tests
* solve conflict
* add account label
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* fix import
* solve merge related problem
* add account info (#608)
* add back namespaces handler
* Lattice: Parse account id and return it to frontend (#609)
* parse account id and return to frontend
* fix route test
* only show badge when feature toggle is enabled (#615)
* Lattice: Refactor resource response type and return account (#613)
* refactor resource response type
* remove not used file.
* go lint
* fix tests
* remove commented code
* Lattice: Use account as input when listing metric names and dimensions (#611)
* use account in resource requests
* add account to response
* revert accountInfo to accountId
* PR feedback
* unit test account in list metrics response
* remove not used asserts
* don't assert on response that is not relevant to the test
* removed dupe test
* pr feedback
* rename request package (#626)
* Lattice: Move account component and add tooltip (#630)
* move accounts component to the top of metric stat editor
* add tooltip
* CloudWatch: add account to GetMetricData queries (#627)
* Add AccountId to metric stat query
* Lattice: Account variable support (#625)
* add variable support in accounts component
* add account variable query type
* update variables
* interpolate variable before its sent to backend
* handle variable change in hooks
* remove not used import
* Update public/app/plugins/datasource/cloudwatch/components/Account.tsx
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* Update public/app/plugins/datasource/cloudwatch/hooks.ts
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* add one more unit test
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* cleanup (#629)
* Set account Id according to crossAccountQuerying feature flag in backend (#632)
* CloudWatch: Change spelling of feature-toggle (#634)
* Lattice Logs (#631)
* Lattice Logs
* Fixes after CR
* Lattice: Bug: fix dimension keys request (#644)
* fix dimension keys
* fix lint
* more lint
* CloudWatch: Add tests for QueryData with AccountId (#637)
* Update from breaking change (#645)
* Update from breaking change
* Remove extra interface and methods
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
* CloudWatch: Add business logic layer for getting log groups (#642)
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* Lattice: Fix - unset account id in region change handler (#646)
* move reset of account to region change handler
* fix broken test
* Lattice: Add account id to metric stat query deep link (#656)
add account id to metric stat link
* CloudWatch: Add new log groups handler for cross-account querying (#643)
* Lattice: Add feature tracking (#660)
* add tracking for account id prescense in metrics query
* also check feature toggle
* fix broken test
* CloudWatch: Add route for DescribeLogGroups for cross-account querying (#647)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
* Lattice: Handle account id default value (#662)
* make sure right type is returned
* set right default values
* Suggestions to lattice changes (#663)
* Change ListMetricsWithPageLimit response to slice of non-pointers
* Change GetAccountsForCurrentUserOrRole response to be not pointer
* Clean test Cleanup calls in test
* Remove CloudWatchAPI as part of mock
* Resolve conflicts
* Add Latest SDK (#672)
* add tooltip (#674)
* Docs: Add documentation for CloudWatch cross account querying (#676)
* wip docs
* change wordings
* add sections about metrics and logs
* change from monitoring to observability
* Update docs/sources/datasources/aws-cloudwatch/_index.md
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
* apply pr feedback
* fix file name
* more pr feedback
* pr feedback
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
* use latest version of the aws-sdk-go
* Fix tests' mock response type
* Remove change in Azure Monitor
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
* Remove generic variables from publish github action
* Create publish aws cmd to automate aws releases
* Add tests to publish aws cmd
* Replace fmt with log for prints
* Remove unnecessary type assertions
* Readd mistakenly removed go package
* Replace log with fmt for prints due to conflicts
* Update github tests to conform with casing
* Get pluginmeta mostly moved over to pkg/plugins/plugindef
* Remove dead func
* Fix up pfs, use sync.Once in plugindef
* Update to latest thema
* Chase Endec->Codec conversion in Thema
* Comments on slash header gen; use ToSlash
* Also generate JSON schema for plugindef
* Generate JSON Schema as well
* Fix slot loading from kindsys cue decls
* Remove unused vars
* skip generating plugin.schema.json for now
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Update thema to latest
* Deal with s/Library/*Runtime/
* Commit new, working results of codegen
* We like pointers now
* Always take runtime arg for NewBase()
* Sketchy handwavy pass at entity meta framework
* Little nibbles
* Update pkg/framework/coremodel/entityframework.cue
Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
* Move file into new framework location
* Introduce loaders, Go code
* Complete rename to kind
* Flesh out framework, add svg/dashboard examples
* Cruft removal
* Remove generated kind go files from gitignore
* Refine maturity concept, add SlotKind
* Update embed and go deps
* Export PrefixWithGrafanaCUE
* Make the loader actually work, holy crap
* Many small tweaks to type.cue
* Add Apache 2 licensing exceptions for kinds
* Add new kinds dir, start of generator
* Roll back to earlier oapi-codegen
* Introduce new grafana-specific CUE loaders
* Introduce new tidy code generators framework
* Catch up kind framework with tinkering
* Add slices for the generators
* Add write/verify step to main generator
* Many renames
* Split up kind framework cue files
* Use kind.Decl within generated kinds
* Create kind.SomeDecl wrapper type to cache lineages
* Better names again
* Get one generated implemented, hopefully
* Copy dashboard schema into new kind.cue
* Small fixes to make the initial gen work
* Put svg kind in its new home
* Add generated Go dashboard type
* More renames and cleanups
* Add base kind registry and generator
* Stop blacklisting *_gen.go files
This is not the Go best practice, anyway. All we actually want to ignore
for enterprise is generated wire files.
* Change codegen output directories
pkg/kind -> pkg/kinds
pkg/registry/kindreg -> pkg/registry/corekind
* Rename pkg/framework/kind to pkg/kindsys
* Add core structured kind generator
* Add plural and machine names to kind spec
* Copy playlist over to kind system
* Consolidate kindsys files
* Add raw kind generator
* Update CODEOWNERS for kind framework
* Touch up comments a bit
* More docs tweaks
* Remove generated types to reduce noise for review
* Split each generator into its own file
* Rename Slot kind to Composable kind
* Add handwavy types for customkind loading
* Guard against init calls to framework loader
* First pass at doc on extending the kind system
* Improve attribute example in docs
* Fix wire imports
* Add basic TS types generator
* Fix composable kind category def
* No need for a separate file with generate directive
* Catch dashboard schema up
* Rename generator types to something saner and generic
* Make version configurable in ts/go generators
* Add CommonMeta to ease property access
* Add kindsys prop indicating whether lineage is group
* Put all kind categories back in a single file
* Finish with kindsys group props
* Refactor maturity progression per discussion
- Replace "committed" with "merged"
- All kindcats can use all maturity levels, at least for now
* Convert ts veneer index generator to modular system
* Move over to new jennywrites framework
* Strip down old coremodel generator
* Use public version of jennywrites
* Pull latest thema
* Commit generated Go types
* Add header injection postprocessor
* Move sdboyer/jennywrites to grafana/codejen
* Tweak header output
* Remove dashboard and playlist coremodels
* Fix up backend dashboards devenv test
* Fix TS import patterns to new gen filename
* Update internal imports, remove coremodel registry
* Fix compilation errors, wire generation
* Export and replace the prefix dropper
* More Go struct and field name changes
* Last name fixes, hopefully
* Fix lint errors
* Last lint error
Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
* add explicit build step for go codeql
* support workflow_dispatch for codeql checks
* syntax fix
* enable on push to codeql-go branch
* test
* use go version from go.mod
* explicitly set go version
* tidy up, add workflow_dispatch support to all codeql actions
* Chore: Update grafana-plugin-sdk-go to v0.142.0
* Update tests and golden files for 207 status code
* Chore: Move update flag definition at the top in response_parser_test.go
* retrigger
Co-authored-by: Will Browne <will.browne@grafana.com>