-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Makes spaces optional in observability plugin #151147
Conversation
c3de0a0
to
c8774b2
Compare
Closes #149973 # Summary This PR makes `spaces` an optional plugin. In Logs UI we use only the space id and there we want to fallback to the default space id when the space plugin is disabled. The difference to the changes in the other PRs is that we will consider the default space as "active" space if the space plugin is disabled: so in this case we will return the default space id as this is the only property we need from the `getActiveSpace` response. # Testing 1. In the `kibana.dev.yaml` add `xpack.spaces.enabled: false` 2. Before we have this [PR](#151147) merged you should do [this change](https://github.com/elastic/kibana/pull/151147/files#diff-1b17eae66f358505fae8d86df37e155a25e8db996fce93ee6016582fb341092e) on the branch while testing 3. Inside Logs the `Anomalies` and `Categories` pages should load the default space --------- Co-authored-by: kibanamachine <[email protected]>
So testing this has proven to be complicated. When I open the Kibana UI with this PR change, I don't see observability in the navigation at all. At first, I thought this might be because we depend on a plugin which still depends on "spaces", but the Kibana log output doesn't indicate that. As seen here, "observability" is included in the array of 124 plugins that started. [2023-02-15T14:49:42.005-05:00][INFO ][node] Kibana process configured with roles: [background_tasks, ui]
np bld log [14:49:49.690] [info][@kbn/optimizer] [22/152] initial bundle builds complete
[2023-02-15T14:49:53.861-05:00][INFO ][plugins-service] Plugin "apm" has been disabled since the following direct or transitive dependencies are missing, disabled, or have incompatible types: [infra]
[2023-02-15T14:49:53.863-05:00][INFO ][plugins-service] Plugin "cloudDefend" has been disabled since the following direct or transitive dependencies are missing, disabled, or have incompatible types: [fleet]
[2023-02-15T14:49:53.863-05:00][INFO ][plugins-service] Plugin "cloudChat" is disabled.
[2023-02-15T14:49:53.863-05:00][INFO ][plugins-service] Plugin "cloudExperiments" is disabled.
[2023-02-15T14:49:53.863-05:00][INFO ][plugins-service] Plugin "cloudFullStory" is disabled.
[2023-02-15T14:49:53.863-05:00][INFO ][plugins-service] Plugin "cloudGainsight" is disabled.
[2023-02-15T14:49:53.864-05:00][INFO ][plugins-service] Plugin "cloudSecurityPosture" has been disabled since the following direct or transitive dependencies are missing, disabled, or have incompatible types: [fleet]
[2023-02-15T14:49:53.866-05:00][INFO ][plugins-service] Plugin "enterpriseSearch" has been disabled since the following direct or transitive dependencies are missing, disabled, or have incompatible types: [spaces, infra]
[2023-02-15T14:49:53.866-05:00][INFO ][plugins-service] Plugin "fleet" has been disabled since the following direct or transitive dependencies are missing, disabled, or have incompatible types: [spaces]
[2023-02-15T14:49:53.868-05:00][INFO ][plugins-service] Plugin "infra" has been disabled since the following direct or transitive dependencies are missing, disabled, or have incompatible types: [spaces]
[2023-02-15T14:49:53.876-05:00][INFO ][plugins-service] Plugin "profiling" is disabled.
[2023-02-15T14:49:53.880-05:00][INFO ][plugins-service] Plugin "securitySolution" has been disabled since the following direct or transitive dependencies are missing, disabled, or have incompatible types: [cloudSecurityPosture]
[2023-02-15T14:49:53.881-05:00][INFO ][plugins-service] Plugin "spaces" is disabled.
[2023-02-15T14:49:53.882-05:00][INFO ][plugins-service] Plugin "synthetics" has been disabled since the following direct or transitive dependencies are missing, disabled, or have incompatible types: [spaces]
[2023-02-15T14:49:53.885-05:00][INFO ][plugins-service] Plugin "ux" has been disabled since the following direct or transitive dependencies are missing, disabled, or have incompatible types: [infra, apm]
[2023-02-15T14:49:53.925-05:00][INFO ][http.server.Preboot] http server running at http://localhost:5601/local
[2023-02-15T14:49:53.997-05:00][INFO ][plugins-system.preboot] Setting up [1] plugins: [interactiveSetup]
[2023-02-15T14:49:54.014-05:00][WARN ][config.deprecation] The default mechanism for Reporting privileges will work differently in future versions, which will affect the behavior of this cluster. Set "xpack.reporting.roles.enabled" to "false" to adopt the future behavior before upgrading.
[2023-02-15T14:49:54.138-05:00][INFO ][plugins-system.standard] Setting up [124] plugins: [translations,monitoringCollection,licensing,globalSearch,globalSearchProviders,features,mapsEms,licenseApiGuard,customBranding,eventLog,usageCollection,taskManager,cloud,guidedOnboarding,telemetryCollectionManager,telemetryCollectionXpack,kibanaUsageCollection,share,screenshotMode,banners,newsfeed,ftrApis,fieldFormats,expressions,screenshotting,dataViews,charts,esUiShared,customIntegrations,home,searchprofiler,painlessLab,grokdebugger,management,security,snapshotRestore,lists,indexManagement,remoteClusters,crossClusterReplication,indexLifecycleManagement,encryptedSavedObjects,actions,notifications,telemetry,licenseManagement,files,cloudDataMigration,advancedSettings,console,contentManagement,bfetch,data,watcher,upgradeAssistant,fileUpload,ingestPipelines,ecsDataQualityDashboard,alerting,unifiedSearch,unifiedFieldList,savedSearch,savedObjects,graph,savedObjectsTagging,savedObjectsManagement,eventAnnotation,embeddable,reporting,uiActionsEnhanced,presentationUtil,expressionShape,expressionRevealImage,expressionRepeatImage,expressionMetric,expressionImage,controls,dataViewFieldEditor,triggersActionsUi,transform,stackConnectors,stackAlerts,ruleRegistry,visualizations,canvas,visTypeXy,visTypeVislib,visTypeVega,visTypeTimeseries,rollup,visTypeTimelion,visTypeTagcloud,visTypeTable,visTypeMetric,visTypeHeatmap,visTypeMarkdown,dashboard,dashboardEnhanced,expressionXY,expressionTagcloud,expressionPartitionVis,visTypePie,expressionMetricVis,expressionLegacyMetricVis,expressionHeatmap,expressionGauge,lens,maps,cases,timelines,sessionView,kubernetesSecurity,threatIntelligence,aiops,discover,osquery,observability,monitoring,logstash,discoverEnhanced,dataVisualizer,ml,visTypeGauge,dataViewManagement] Interestingly, the "Dashboards" app appears in the left-hand nav, but doesn't load. To debug, I placed debug log messages throughout the And the Observability section returns to the navigation. The main difference appears to be something to do with observables being used to register navigation elements. I am logging out When spaces isn't disabled (behavior from before this PR), I get the following logs:
When spaces is disabled via config,
I need to continue this investigation later about what causes |
Update: The observability plugin does a check to see if at least one of the main observability sections is available and if none of them are, the top-level Observability pages (overview, alerts, cases, etc) are not shown in the navigation at all. However, since I created this PR, it appears as though other observability apps have already merged their spaces-optional changes, so after having merged those changes in, it should be possible to test these changes in this PR now. |
Tested this against Line 32 in 27f2eee
We should change that line to: if (capabilities[feature] && capabilities[feature].show === false) { Since missing features (plugins) won't be available in the |
Good catch, @simianhacker -- I've pushed a fix for that null pointer issue. I'm not sure if we use those track metric telemetry values at all, but just in case, I wanted to track the two scenarios (capability totally missing vs. capability explicitly set as I'm still investigating an issue with the infra plugin where the empty state screens change when spaces are disabled. |
Closes elastic#149973 # Summary This PR makes `spaces` an optional plugin. In Logs UI we use only the space id and there we want to fallback to the default space id when the space plugin is disabled. The difference to the changes in the other PRs is that we will consider the default space as "active" space if the space plugin is disabled: so in this case we will return the default space id as this is the only property we need from the `getActiveSpace` response. # Testing 1. In the `kibana.dev.yaml` add `xpack.spaces.enabled: false` 2. Before we have this [PR](elastic#151147) merged you should do [this change](https://github.com/elastic/kibana/pull/151147/files#diff-1b17eae66f358505fae8d86df37e155a25e8db996fce93ee6016582fb341092e) on the branch while testing 3. Inside Logs the `Anomalies` and `Categories` pages should load the default space --------- Co-authored-by: kibanamachine <[email protected]>
Here is what the Observability Overview page looks like with As you can see all of the solution (plugins) are missing from the navigation and the page is not populated with data. Here is what it looks like without Spaces disabled: @jasonrhodes Is this the expected behavior for this pr? |
@simianhacker Looks like the required spaces dependency for the "infra" plugin was accidentally re-introduced in a bad merge, causing what you saw in the UI for this branch. That's now been fixed and merged into this branch as well. This is what I see locally when I have spaces disabled: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything is working as expected now... Thanks @jasonrhodes!
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
## Summary This PR makes spaces optional in the "observability" plugin as requested in elastic#149687 To test this, use the following setting in your kibana.yml config file: ```yaml xpack.spaces.enabled: false ``` When you log in, there will be no spaces choice. <img width="2543" alt="Screenshot 2023-02-21 at 11 53 18 AM" src="https://user-images.githubusercontent.com/159370/220409537-43a216d5-81c9-4b29-97d8-47705bdacd06.png">
Summary
This PR makes spaces optional in the "observability" plugin as requested in #149687
To test this, use the following setting in your kibana.yml config file:
When you log in, there will be no spaces choice.