Skip to content

Conversation

@prdoyle
Copy link
Contributor

@prdoyle prdoyle commented Mar 14, 2025

We'd like to be able to adjust logging independently for different components / modules.

@prdoyle prdoyle added >non-issue auto-backport Automatically create backport pull requests when merged test-entitlements v8.18.1 v8.19.0 v9.0.1 v9.1.0 :Core/Infra/Entitlements Entitlements infrastructure labels Mar 14, 2025
@prdoyle prdoyle self-assigned this Mar 14, 2025
@prdoyle prdoyle requested a review from a team as a code owner March 14, 2025 16:11
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Mar 14, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@prdoyle
Copy link
Contributor Author

prdoyle commented Mar 14, 2025

D'oh indeed, Homer, d'oh indeed.

expected:<ModuleEntitlements[componentName=plugin1, entitlementsByType={}, fileAccess=org.elasticsearch.entitlement.runtime.policy.FileAccessTree@7b5089eb, logger=org.elasticsearch.common.logging.internal.LoggerImpl@33cd69a]>
but was:<ModuleEntitlements[componentName=plugin1, entitlementsByType={}, fileAccess=org.elasticsearch.entitlement.runtime.policy.FileAccessTree@7b5089eb, logger=org.elasticsearch.common.logging.internal.LoggerImpl@199d0076]>

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

Looks fine. One nit that could be a followup as it's not performance critical (only happens in case entitlement is being denied) and will likely require some refactoring.

@prdoyle
Copy link
Contributor Author

prdoyle commented Mar 14, 2025

FYI this will conflict with #124895.

Update: I've resolved the conflict.

@prdoyle prdoyle enabled auto-merge (squash) March 14, 2025 19:25
@prdoyle prdoyle merged commit 359743b into elastic:main Mar 15, 2025
22 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.18
8.x
9.0

prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request Mar 15, 2025
* Use child loggers broadly in PolicyManager

* Pass ModuleEntitlements to notEntitled

* Store logger name instead of object.

Some of our unit tests check for equality of `ModuleEntitlements` objects,
and they are entitled to do so (no pun intended).

* Alright, let's cache 'em

* Memoize at point of creation, not point of use

* Explanatory comments
prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request Mar 15, 2025
* Use child loggers broadly in PolicyManager

* Pass ModuleEntitlements to notEntitled

* Store logger name instead of object.

Some of our unit tests check for equality of `ModuleEntitlements` objects,
and they are entitled to do so (no pun intended).

* Alright, let's cache 'em

* Memoize at point of creation, not point of use

* Explanatory comments
elasticsearchmachine pushed a commit that referenced this pull request Mar 15, 2025
* Use child loggers broadly in PolicyManager

* Pass ModuleEntitlements to notEntitled

* Store logger name instead of object.

Some of our unit tests check for equality of `ModuleEntitlements` objects,
and they are entitled to do so (no pun intended).

* Alright, let's cache 'em

* Memoize at point of creation, not point of use

* Explanatory comments
elasticsearchmachine pushed a commit that referenced this pull request Mar 15, 2025
* Use child loggers broadly in PolicyManager

* Pass ModuleEntitlements to notEntitled

* Store logger name instead of object.

Some of our unit tests check for equality of `ModuleEntitlements` objects,
and they are entitled to do so (no pun intended).

* Alright, let's cache 'em

* Memoize at point of creation, not point of use

* Explanatory comments
elasticsearchmachine pushed a commit that referenced this pull request Mar 15, 2025
* Use child loggers broadly in PolicyManager

* Pass ModuleEntitlements to notEntitled

* Store logger name instead of object.

Some of our unit tests check for equality of `ModuleEntitlements` objects,
and they are entitled to do so (no pun intended).

* Alright, let's cache 'em

* Memoize at point of creation, not point of use

* Explanatory comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Core/Infra/Entitlements Entitlements infrastructure >non-issue Team:Core/Infra Meta label for core/infra team v8.18.1 v8.19.0 v9.0.1 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants