grafana/pkg/services/featuremgmt
Giuseppe Guerra cca9d89733
Plugins: Angular detector: Remote patterns fetching (#69843)
* Plugins: Angular detector: Remote patterns fetching

* Renamed PatternType to GCOMPatternType

* Renamed files

* Renamed more files

* Moved files again

* Add type checks, unexport GCOM structs

* Cache failures, update log messages, fix GCOM URL

* Fail silently for unknown pattern types, update docstrings

* Fix tests

* Rename gcomPattern.Value to gcomPattern.Pattern

* Refactoring

* Add FlagPluginsRemoteAngularDetectionPatterns feature flag

* Fix tests

* Re-generate feature flags

* Add TestProvideInspector, renamed TestDefaultStaticDetectorsInspector

* Add TestProvideInspector

* Add TestContainsBytesDetector and TestRegexDetector

* Renamed getter to provider

* More tests

* TestStaticDetectorsProvider, TestSequenceDetectorsProvider

* GCOM tests

* Lint

* Made detector.detect unexported, updated docstrings

* Allow changing grafana.com URL

* Fix API path, add more logs

* Update tryUpdateRemoteDetectors docstring

* Use angulardetector http client

* Return false, nil if module.js does not exist

* Chore: Split angualrdetector into angularinspector and angulardetector packages

Moved files around, changed references and fixed tests:
- Split the old angulardetector package into angular/angulardetector and angular/angularinspector
- angulardetector provides the detection structs/interfaces (Detector, DetectorsProvider...)
- angularinspector provides the actual angular detection service used directly in pluginsintegration
- Exported most of the stuff that was private and now put into angulardetector, as it is not required by angularinspector

* Renamed detector.go -> angulardetector.go and inspector.go -> angularinspector.go

Forgot to rename those two files to match the package's names

* Renamed angularinspector.ProvideInspector to angularinspector.ProvideService

* Renamed "harcoded" to "static" and "remote" to "dynamic"

from PR review, matches the same naming schema used for signing keys fetching

* Fix merge conflict on updated angular patterns

* Removed GCOM cache

* Renamed Detect to DetectAngular and Detector to AngularDetector

* Fix call to NewGCOMDetectorsProvider in newDynamicInspector

* Removed unused test function newError500GCOMScenario

* Added angularinspector service definition in pluginsintegration

* Moved dynamic inspector into pluginsintegration

* Move gcom angulardetectorsprovider into pluginsintegration

* Log errUnknownPatternType at debug level

* re-generate feature flags

* fix error log
2023-06-26 15:33:21 +02:00
..
strcase Chore: Upgrade Go to 1.19.1 (#54902) 2022-09-12 12:03:49 +02:00
testdata FeatureFlags: define features outside settings.Cfg (take 3) (#44443) 2022-01-26 09:44:20 -08:00
codeowners.go Chore: update user-essentials to frontend-platform (#69533) 2023-06-05 12:24:17 +01:00
features.go FeatureFlags: Change alpha/beta language to align with release staging language (#69422) 2023-06-08 09:16:55 -07:00
manager_test.go FeatureFlags: define features outside settings.Cfg (take 3) (#44443) 2022-01-26 09:44:20 -08:00
manager.go Fixing typos (#70487) 2023-06-22 09:43:38 +01:00
registry.go Plugins: Angular detector: Remote patterns fetching (#69843) 2023-06-26 15:33:21 +02:00
service_test.go chore: move models/licensing into licensing service (#61878) 2023-01-23 11:53:43 -05:00
service.go FeatureFlags: Change alpha/beta language to align with release staging language (#69422) 2023-06-08 09:16:55 -07:00
settings_test.go FeatureFlags: define features outside settings.Cfg (take 3) (#44443) 2022-01-26 09:44:20 -08:00
settings.go Chore: Replace yaml.v2 with yaml.v3 (#59897) 2022-12-06 21:17:17 +01:00
toggles_gen_test.go FeatureFlags: Change alpha/beta language to align with release staging language (#69422) 2023-06-08 09:16:55 -07:00
toggles_gen.csv Plugins: Angular detector: Remote patterns fetching (#69843) 2023-06-26 15:33:21 +02:00
toggles_gen.go Plugins: Angular detector: Remote patterns fetching (#69843) 2023-06-26 15:33:21 +02:00
usage_stats_test.go Previews: remove dashboard previews backend (#66176) 2023-04-13 21:42:24 +04:00
usage_stats.go UsageStats: track enabled features (#47407) 2022-04-08 12:42:33 +02:00