diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bfd40e4e03..440bed269d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ This release upgrades the project to `go` version 1.16. Because of the version bump to `go`, the macOS build for this release requires at least version 10.12 Sierra to run. +### Notebooks and Annotations + +Support for Notebooks and Annotations is included with this release. + ### SQLite Metadata Store This release adds an embedded SQLite database for storing metadata required by the latest UI features like Notebooks and Annotations. @@ -53,6 +57,7 @@ This release adds an embedded SQLite database for storing metadata required by t 1. [21910](https://github.com/influxdata/influxdb/pull/21910): Added `--ui-disabled` option to `influxd` to allow for running with the UI disabled. 1. [21938](https://github.com/influxdata/influxdb/pull/21938): Added route to delete individual secret. 1. [21958](https://github.com/influxdata/influxdb/pull/21958): Telemetry improvements: Do not record telemetry data for non-existant paths; replace invalid static asset paths with a slug. +1. [21972](https://github.com/influxdata/influxdb/pull/21972): Added support for notebooks and annotations. ### Bug Fixes diff --git a/flags.yml b/flags.yml index 2ed35961be1..3e9ee6858b4 100644 --- a/flags.yml +++ b/flags.yml @@ -55,26 +55,6 @@ contact: Query Team lifetime: permanent -- name: Notebooks - description: Determine if the notebook feature's route and navbar icon are visible to the user - key: notebooks - default: false - contact: Monitoring Team - lifetime: temporary - expose: true - -# This notebooksApi flag only controls the specific API calls that the frontend uses, -# not if the notebooks button is enabled on the sidebar. The notebooks flag (above) controls -# the display of the notebooks button on the sidebar. The notebooksAPI flag should be set to true -# to ensure the UI sends requests that the OSS backend can handle. -- name: Notebooks Service API - description: Enable the Equivalent notebooksd Service API - key: notebooksApi - default: true - contact: Edge Team - lifetime: temporary - expose: true - - name: Inject Latest Success Time description: Inject the latest successful task run timestamp into a Task query extern when executing. key: injectLatestSuccessTime @@ -94,22 +74,6 @@ default: false expose: true -- name: UI CSV Uploader - description: Adds the ability to upload data from a CSV file to a bucket - key: csvUploader - default: true - contact: Monitoring Team - expose: true - lifetime: temporary - -- name: Editable Telegraf Configurations - description: Edit telegraf configurations from the UI - key: editTelegrafs - default: true - contact: Monitoring Team - expose: true - lifetime: temporary - - name: Default Monaco Selection to EOF description: Positions the cursor at the end of the line(s) when using the monaco editor key: cursorAtEOF @@ -137,7 +101,7 @@ - name: Annotations UI description: Management, display, and manual addition of Annotations from the UI key: annotations - default: false + default: true contact: Monitoring Team lifetime: temporary expose: true diff --git a/kit/feature/list.go b/kit/feature/list.go index d8dafb077d3..a337bccccc1 100644 --- a/kit/feature/list.go +++ b/kit/feature/list.go @@ -86,34 +86,6 @@ func QueryTracing() BoolFlag { return queryTracing } -var notebooks = MakeBoolFlag( - "Notebooks", - "notebooks", - "Monitoring Team", - false, - Temporary, - true, -) - -// Notebooks - Determine if the notebook feature's route and navbar icon are visible to the user -func Notebooks() BoolFlag { - return notebooks -} - -var notebooksApi = MakeBoolFlag( - "Notebooks Service API", - "notebooksApi", - "Edge Team", - true, - Temporary, - true, -) - -// NotebooksServiceApi - Enable the Equivalent notebooksd Service API -func NotebooksServiceApi() BoolFlag { - return notebooksApi -} - var injectLatestSuccessTime = MakeBoolFlag( "Inject Latest Success Time", "injectLatestSuccessTime", @@ -156,34 +128,6 @@ func TimeFilterFlags() BoolFlag { return timeFilterFlags } -var csvUploader = MakeBoolFlag( - "UI CSV Uploader", - "csvUploader", - "Monitoring Team", - true, - Temporary, - true, -) - -// UiCsvUploader - Adds the ability to upload data from a CSV file to a bucket -func UiCsvUploader() BoolFlag { - return csvUploader -} - -var editTelegrafs = MakeBoolFlag( - "Editable Telegraf Configurations", - "editTelegrafs", - "Monitoring Team", - true, - Temporary, - true, -) - -// EditableTelegrafConfigurations - Edit telegraf configurations from the UI -func EditableTelegrafConfigurations() BoolFlag { - return editTelegrafs -} - var cursorAtEOF = MakeBoolFlag( "Default Monaco Selection to EOF", "cursorAtEOF", @@ -230,7 +174,7 @@ var annotations = MakeBoolFlag( "Annotations UI", "annotations", "Monitoring Team", - false, + true, Temporary, true, ) @@ -247,13 +191,9 @@ var all = []Flag{ memoryOptimizedFill, memoryOptimizedSchemaMutation, queryTracing, - notebooks, - notebooksApi, injectLatestSuccessTime, enforceOrgDashboardLimits, timeFilterFlags, - csvUploader, - editTelegrafs, cursorAtEOF, refreshSingleCell, rangeAnnotations, @@ -267,13 +207,9 @@ var byKey = map[string]Flag{ "memoryOptimizedFill": memoryOptimizedFill, "memoryOptimizedSchemaMutation": memoryOptimizedSchemaMutation, "queryTracing": queryTracing, - "notebooks": notebooks, - "notebooksApi": notebooksApi, "injectLatestSuccessTime": injectLatestSuccessTime, "enforceOrgDashboardLimits": enforceOrgDashboardLimits, "timeFilterFlags": timeFilterFlags, - "csvUploader": csvUploader, - "editTelegrafs": editTelegrafs, "cursorAtEOF": cursorAtEOF, "refreshSingleCell": refreshSingleCell, "rangeAnnotations": rangeAnnotations, diff --git a/notebooks/transport/http_test.go b/notebooks/transport/http_test.go index 26217ebcbce..dbbf851aeb9 100644 --- a/notebooks/transport/http_test.go +++ b/notebooks/transport/http_test.go @@ -9,11 +9,9 @@ import ( "github.com/golang/mock/gomock" "github.com/influxdata/influxdb/v2" - "github.com/influxdata/influxdb/v2/kit/feature" "github.com/influxdata/influxdb/v2/kit/platform" "github.com/influxdata/influxdb/v2/mock" "github.com/stretchr/testify/require" - "go.uber.org/zap" "go.uber.org/zap/zaptest" ) @@ -200,9 +198,7 @@ func TestNotebookHandler(t *testing.T) { func newTestServer(t *testing.T) (*httptest.Server, *mock.MockNotebookService) { ctrlr := gomock.NewController(t) svc := mock.NewMockNotebookService(ctrlr) - // server needs to have a middleware to annotate the request context with the - // appropriate feature flags while notebooks is still behind a feature flag - server := annotatedTestServer(NewNotebookHandler(zaptest.NewLogger(t), svc)) + server := NewNotebookHandler(zaptest.NewLogger(t), svc) return httptest.NewServer(server), svc } @@ -227,15 +223,3 @@ func doTestRequest(t *testing.T, req *http.Request, wantCode int, needJSON bool) } return res } - -func annotatedTestServer(serv http.Handler) http.Handler { - notebooksFlag := feature.MakeFlag("", "notebooks", "", true, 0, true) - notebooksApiFlag := feature.MakeFlag("", "notebooksApi", "", true, 0, true) - - return feature.NewHandler( - zap.NewNop(), - feature.DefaultFlagger(), - []feature.Flag{notebooksFlag, notebooksApiFlag}, - serv, - ) -}