-
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
Saved objects extensions refactor merge #142878
Saved objects extensions refactor merge #142878
Conversation
Adds public types for extensions, temporarily omiting these from public mocks and saved objects service Adds extensions to saved objects start contract, temporarily omitting them from the saved objects service start implementation adding extensions to saved objects implementation Still wip adding extensions and factories to implementation more small changes Starts removing wrappers Updates saved objects service mock Updates more types around extensions and wrappers removal Adds saved objects extensions to plugin_context Adds extensions mocks to public saved objects server mocks Updates two more tests
…eferences. Functional unit tests passing.
buildkite test this |
7f2ac2f
to
1bcbbdc
Compare
9bda5d3
to
1f277e6
Compare
1bccc60
to
9935fef
Compare
…bjects by adding the new internalOptions parameter.
…with bulk delete tests.
…-ref HEAD~1..HEAD --fix'
…naHeiligers/kibana into merge-saved-objects-extensions
💚 CLA has been signed |
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.
OLM changes LGTM (code review only)
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.
Even if I think we need to discuss about the follow-ups and their prioritization, ihmo the PR is safe to be merged in its current state, so ihmo we should do it asap to free the owner from the burden of maintaining/rebasing the PR.
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.
As discussed on Slack, I think there's room for better decoupling the repository from the extensions which could help simplify the complexity that this PR adds to the repository. But on the whole this PR improves the overall complexity so we don't need to block on that but can iterate on it in follow-up PRs.
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 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, great job! Let's file issues for the most contentious changes and deal with them in the follow-ups.
packages/core/saved-objects/core-saved-objects-api-server/src/saved_objects_client.ts
Outdated
Show resolved
Hide resolved
// If a user tries to create an object with `initialNamespaces: ['*']`, they need to have 'create' privileges for the Global Resource | ||
// (e.g., All privileges for All Spaces). | ||
// Inversely, if a user tries to overwrite an object that already exists in '*', they don't need to 'create' privileges for the Global | ||
// Resource, so in that case we have to filter out that string from spacesToAuthorize (because `allowGlobalResource: true` is used | ||
// below.) |
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.
TL;DR - We could move some of the logic into the extension, but I am inclined to leave as is for now and open an issue to investigate the impact and determine a clear delineation of responsibilities between the repo and extension.
++ It's worth exploring in the follow-up for sure. We had a somewhat related discussion in the original PR as well and figured that it wasn't an easy change, we might have a better outcome if we deal with this in isolation from other changes.
packages/core/saved-objects/core-saved-objects-server/src/security.ts
Outdated
Show resolved
Hide resolved
.../core/saved-objects/core-saved-objects-api-server-internal/src/lib/scoped_client_provider.ts
Outdated
Show resolved
Hide resolved
…saved_objects_client.ts Co-authored-by: Aleh Zasypkin <[email protected]>
@azasypkin I think this is considerably better than what was there. Templating, or I guess "generics" in typescript, was the right answer. Thanks! |
…rizationParams interface to use Sets for actions.
💛 Build succeeded, but was flaky
Failed CI Steps
Test Failures
Metrics [docs]Public APIs missing comments
Public APIs missing exports
Unknown metric groupsAPI count
ESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @jeramysoucy |
Merges the changes of #134395 into the new packages structure.
Resolves #133835
Description
This PR represents a fully manual merge of the saved objects refactor of client wrapper system into repository extensions. These changes are being manually merged due to significant changes of the saved objects implementation in the main branch, specifically the migration to the new packages structure.
Other changes