-
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
[ML] Server info service refactor #50302
[ML] Server info service refactor #50302
Conversation
Pinging @elastic/ml-ui (:ml) |
id="xpack.ml.jobsList.nodeAvailableWarning.noMLNodesAvailableDescription" | ||
defaultMessage="There are no ML nodes available." | ||
/> | ||
<br /> |
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.
why not use div
instead of br
after inline elements?
|
||
describe('ml_server_info', () => { | ||
beforeEach(async done => { | ||
await loadMlServerInfo(); |
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.
I guess it makes sense to move jest.mock
for mlInfo
here
it('can get could deployment id', async done => { | ||
expect(isCloud()).toBe(true); | ||
expect(cloudDeploymentId()).toBe('85d666f3350c469e8c3242d76a7f459c'); | ||
done(); |
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.
there is no async code inside
} | ||
|
||
const id = cloudDeploymentId(); |
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.
getCloudDeploymentId
? 👀
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.
i purposely left this change as every function in this service except loadMlServerInfo
is a getter and changing one would mean i'd need to change all and that would be a lot of churn.
Does anyone else have an opinion on this? I don't mind changing all, it'd just touch a lot of files.
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.
added getter renaming changes to this PR as all files which use the functions have already been touched for the include path change
💔 Build Failed |
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.
LGTM, in the long run I think I'd prefer getCloudDeploymentId()
but maybe it's better to do that rename in a dedicated PR.
thinking about it, changing the names of these functions won't touch any additional files because i've already had to update all of the include paths to |
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.
LGTM
💔 Build Failed |
💔 Build Failed |
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.
LGTM ⚡️
@elasticmachine merge upstream |
💔 Build Failed |
…a into server-info-refactor
💚 Build Succeeded |
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.
LGTM 👍
* [ML] Server info service refactor * removing new job defaults * changes based on review * renaming all ml server info getter functions * missed a file
…ger-ace-theme * 'master' of github.com:elastic/kibana: (56 commits) [ML] Server info service refactor (elastic#50302) Remove internal platform types exports (elastic#50427) [APM] Document `apm_oss.metricsIndices` and `apm_oss.sourcemap… (elastic#50312) [Telemetry] Server side fetcher (elastic#50015) [SIEM] Detection engine placeholders (elastic#50220) [Uptime] Donut chart loader position centered vertically (elastic#50219) update telemetry banner notice text (elastic#50403) Fix aborting when searching without batching (elastic#49966) [Telemetry] Remove telemetry splash page and add conditional messaging (elastic#50189) Revert chromedriver update (elastic#50324) Remove deprecated argument include_type_name from ES calls (elastic#50285) [Maps] add settings to maps telemetry (elastic#50161) remove visualize loader (elastic#46910) Fix misuse of react-router and react-router-dom (elastic#50120) Move table-list-view to kibana-react (elastic#50046) [ML] Stats bar for data frame analytics (elastic#49464) [ML] Make navigation in tests more stable (elastic#50132) Migrate authorization subsystem to the new platform. (elastic#46145) Bugfix: Interpreter conversion of string to number should throw on NaN elastic#27788 (elastic#50063) Update dependency @elastic/charts to v14 (elastic#49947) ...
* [ML] Server info service refactor * removing new job defaults * changes based on review * renaming all ml server info getter functions * missed a file
Removes
new_job_defaults.ts
in favour of/services/ml_server_info
renames the function
loadNewJobDefaults
toloadMlServerInfo
as more than just new job defaults are being loaded.new_job_defaults
was being deep linked to from other files, so it's best that it's moved to a common location. it also makes sense that the cloud checks to added to this file.This PR contains the refactoring part from #49861 which were originally dropped to avoid unnecessary churn in #50139
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials~~- [ ] This was checked for keyboard-only and screenreader accessibility
For maintainers
- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately