Skip to content
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

[Core] Make type option required for SavedObjects.find #42236

Merged
merged 4 commits into from
Aug 12, 2019

Conversation

rudolf
Copy link
Contributor

@rudolf rudolf commented Jul 30, 2019

Summary

Make the type option required for SavedObjectsFindOptions the interface used by SavedObjects.find() since not supplying will throw a runtime exception https://github.com/elastic/kibana/blob/master/src/core/server/saved_objects/service/lib/repository.ts#L409.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@rudolf rudolf added Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Jul 30, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@rudolf rudolf added the release_note:skip Skip the PR/issue when compiling release notes label Jul 30, 2019
@rudolf rudolf force-pushed the saved-objects-find-options branch from 098be95 to 10fd3e6 Compare July 30, 2019 11:59
@epixa epixa mentioned this pull request Aug 1, 2019
20 tasks
@rudolf rudolf force-pushed the saved-objects-find-options branch 2 times, most recently from 854ec04 to f82aa42 Compare August 6, 2019 19:12
@elastic elastic deleted a comment from elasticmachine Aug 6, 2019
@elastic elastic deleted a comment from elasticmachine Aug 6, 2019
@elastic elastic deleted a comment from elasticmachine Aug 6, 2019
@rudolf rudolf force-pushed the saved-objects-find-options branch from f82aa42 to 0313b50 Compare August 6, 2019 19:20
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

type: noteSavedObjectType,
...options,
});
const savedObjects = await savedObjectsClient.find(options);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XavierM making type required in SavedObjectsFindOptions means we either have to include the type in every getAllSavedNote() call, or change the signature of getAllSavedNote()'s options parameter to not be SavedObjectsFindOptions.

@rudolf rudolf requested review from XavierM and a team August 7, 2019 11:35
@rudolf rudolf marked this pull request as ready for review August 7, 2019 11:39
@rudolf rudolf requested a review from a team as a code owner August 7, 2019 11:39
@rudolf rudolf requested a review from joshdover August 9, 2019 13:24
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@rudolf
Copy link
Contributor Author

rudolf commented Aug 9, 2019

@elastic/siem Anyone able to review these minor changes I made to the SIEM plugin?

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Make sense!

@rudolf rudolf merged commit f7a71f2 into elastic:master Aug 12, 2019
@rudolf rudolf deleted the saved-objects-find-options branch August 12, 2019 14:33
rudolf added a commit to rudolf/kibana that referenced this pull request Aug 12, 2019
* Make type option required for SavedObjects.find

* getSortedObjectsForExport test for type or objects
rudolf added a commit that referenced this pull request Aug 12, 2019
* Make type option required for SavedObjects.find

* getSortedObjectsForExport test for type or objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.4.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants