Skip to content

Conversation

@collado-mike
Copy link
Contributor

Description

The PolarisEntityManager is almost entirely used as a means to access the PolarisMetaStoreManager and the RealmEntityManagerFactory is really just an alternative to the MetaStoreManagerFactory. In order to narrow dependencies (as described in #417 ), so that components can declare dependency only on the interfaces they need (e.g., PolarisGrantManager or PolarisCredentialVendor), this removes most references to the PolarisEntityManager and uses the PolarisMetaStoreManager directly. This will make declaring dependencies on pluggable components (like authorization grants) easier.

The only piece of logic the PolarisEntityManager actually implements is the construction and preparation of the Resolver, so its getter methods are removed and only the classes that require a Resolver have any dependency on the PolarisEntityManager.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Interface-only changes, so all existing unit and integration tests still pass.

Test Configuration:

  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

Please delete options that are not relevant.

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • If adding new functionality, I have discussed my implementation with the community using the linked GitHub issue

Copy link
Contributor

@dennishuo dennishuo left a comment

Choose a reason for hiding this comment

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

Nice refactor! Definitely PolarisEntityManager seems a bit vestigial; once it's more clearly just for assembly of the Resolver with the EntityCache maybe it can be renamed/distilled into a ResolverFactory or something along those lines.

@collado-mike collado-mike requested a review from adutra as a code owner November 7, 2024 17:30
@collado-mike collado-mike enabled auto-merge (squash) November 7, 2024 17:30
@collado-mike collado-mike merged commit 05edcdd into apache:main Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants