-
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
[Infra UI] Removed unused saved object attribute and unused source configuration code #169430
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
28c9187
to
a7997ec
Compare
updatedSourceConfiguration.configuration | ||
), | ||
}; | ||
} | ||
|
||
private async getStaticDefaultSourceConfiguration() { |
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.
this function looked for sources
field in the kibana infra config and returned it as part of source configuration. It merges it with "default configuration". we can remove this function and just get the default configuration since we aren't using sources
from config in our source configuration anymore.
1f6040e
to
db33848
Compare
@@ -50,42 +50,9 @@ describe('the InfraSources lib', () => { | |||
}); | |||
}); | |||
|
|||
test('adds missing attributes from the static configuration to a source configuration', async () => { |
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.
this is testing for kibana config values in sources
field, which is no longer supported as part of source configuration. I assume at some point in the past metricAlias
and logsIndices
was able to be set in the kibana config from looking at this test. Under xpack.infra.sources.default.metricAlias
, etc.
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Public APIs missing exports
History
To update your PR or re-run it, just comment with: |
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.
@crespocarlos Thanks. You're correct and I updated the testing instructions to expect it to still exist if it already existed on the saved object. I am thinking to not bother removing it and new objects created will no longer have it. |
Resolves #168240
Changes
fields.message
from theinfrastructure-ui-source
saved object who's value was being populated byxpack.infra.sources.default.fields.message
from config. See https://www.elastic.co/guide/en/kibana/master/logs-ui-settings-kb.htmlgetInternalSourceConfiguration
anddefineInternalSourceConfiguration
functions introduced in [Logs UI] Allow for plugins to inject internal source configurations #36066 as I cannot see them being used anywhere. Stops exposingdefineInternalSourceConfiguration
as part of server plugin interface.getStaticDefaultSourceConfiguration
from InfraSources class as we aren't usingsources
from kibana config in source configuration anymore.getAllSourceConfigurations
used only in removed deprecations file f427278#diff-081721894fc437938eb652beae0a0640ddeee532ec5e48af1f3093c8074f1eecL195getAllSavedSourceConfigurations
only used ingetAllSourceConfigurations
How to test
infrastructure-ui-source
saved object no longer hasfields
attributesxpack.infra.sources.default.fields.message: ['testmessage', '@testmessage']
infrastructure-ui-source
saved object and nofields
attribute should exist (unless it previously existed in an already existinginfrastructure-ui-source
saved objectfields.message
is used in logs_shared pluginxpack.infra.sources.default.fields.message
) and never uses the saved object field being removed.