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

[NU-2048] Fix for invalid classloader used for resources in K8sDeploymentManager #7592

Open
wants to merge 4 commits into
base: staging
Choose a base branch
from

Conversation

arkadius
Copy link
Member

Describe your changes

Checklist before merge

  • Related issue ID is placed at the beginning of PR title in [brackets] (can be GH issue or Nu Jira issue)
  • Code is cleaned from temporary changes and commented out lines
  • Parts of the code that are not easy to understand are documented in the code
  • Changes are covered by automated tests
  • Showcase in dev-application.conf added to demonstrate the feature
  • Documentation added or updated
  • Added entry in Changelog.md describing the change from the perspective of a public distribution user
  • Added MigrationGuide.md entry in the appropriate subcategory if introducing a breaking change
  • Verify that PR will be squashed during merge

@arkadius arkadius requested a review from coutoPL February 25, 2025 13:39
@arkadius arkadius changed the title Preview/k8s dm classpath fix [NU-2048] Fix for invalid classloader used for resources in K8sDeploymentManager Feb 25, 2025
@arkadius arkadius requested a review from coutoPL February 25, 2025 14:20

// We wrap created DeploymentManagerProvider with this handler to make sure that DM creation logic will use
// correct context classloader
class DeploymentManagerProviderCorrectClassloaderHandler(
Copy link
Member

Choose a reason for hiding this comment

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

we can add private [loader] to hint that it should not be used in other places.

}
}

override def metaDataInitializer(config: Config): MetaDataInitializer = delegate.metaDataInitializer(config)
Copy link
Member

Choose a reason for hiding this comment

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

are we sure the other methods don't need the changed context class loader?
I'm not sure, but it seems we cannot exactly predict what the user (who implemented the deployment manager) can do, so wouldn't be safe to change the context class loaded in all these places?

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.

2 participants