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

close configurable's resources when config is deleted #36

Merged

Conversation

laurentbh
Copy link

No description provided.

@@ -69,11 +69,13 @@ public void setDefaultConfigurable(final T defaultConfigurable) {
@Override
protected void configure(@Nullable final UUID kbTenantId) {
final String rawConfiguration = getTenantConfigurationAsString(kbTenantId);
T configurable = null;
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't PluginTenantConfigurableConfigurationHandler be updated as well (it's the key-value version of the YAML one)?

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Member

@sbrossie sbrossie left a comment

Choose a reason for hiding this comment

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

The fix looks good to me, i am slightly confused with some of the tests.


// configure tenants
mockTenantKvsCloseable(configuredTenant, ImmutableList.<String>of("CloseableTest"), nonConfiguredTenant, ImmutableList.<String>of());
closableConfigurationHandler.configure(configuredTenant);
Copy link
Member

Choose a reason for hiding this comment

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

Is this line really necessary -- the method getConfigurable will call configure here ?

Copy link
Author

Choose a reason for hiding this comment

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

  • only for a new tenant (not in the configuredTenants set of the handler)
  • closableConfigurationHandler.configure(configuredTenant); is the call that would be made when the framework receives a config update

@sbrossie sbrossie merged commit 3754673 into killbill:work-for-release-0.21.x Dec 5, 2019
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