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

Certain Druid property overrides are ignored due to dynamically added properties #381

Closed
maltesander opened this issue Jan 30, 2023 · 5 comments

Comments

@maltesander
Copy link
Member

maltesander commented Jan 30, 2023

Affected version

All

Current and expected behavior

We have some dynamically resolved druid properties that are added in the ConfigMap after the static and override merging has happened via product config.

This will lead to ignoring several (and not documented) properties that therefore cannot be overridden anymore.

Expected

All properties are over-ridable

Possible solution

The way this is implemented, we should first collect all dynamically added properties in a Map which then is extended by the merged static and config overrides properties (currently it is the other way around).

Additional context

This came up in a discussion https://github.com/orgs/stackabletech/discussions/10

@maltesander maltesander changed the title Certain Druid property overrides are sometimes ignored due to dynamically added properties Certain Druid property overrides are ignored due to dynamically added properties Jan 30, 2023
@fhennig fhennig self-assigned this Jan 31, 2023
@fhennig
Copy link
Contributor

fhennig commented Jan 31, 2023

I've investigated.

The transform_all_roles_to_config function is applying the overrides already. It takes the role configs and spits out the <String, String> map. It calls the compute_files function on the DruidCluster first, and in our original design it was intended that all computed properties are computed in that function.

It turns out that this was not possible, because we need to resolve things first (like the LDAP authentication class) which are not available in the compute_files function.

So we do changes to the config after the overrides are already applied, further down the line. I think this is a bit of a design flaw in our original design and in the long run I think we should correct this.

Most likely, all operators are affected.

I also found this comment in the code:

Add any properties derived from storage manifests, such as segment cache locations.
This has to be done here since there is no other suitable place for it.
Previously such properties were added in the compute_files() function,
but that code path is now incompatible with the design of fragment merging.

As a short term fix I think we could set these properties only if they are not already set.

@fhennig
Copy link
Contributor

fhennig commented Feb 1, 2023

We want to do a quick fix now

After the quick fix we want to tackle the underlying issue

@fhennig
Copy link
Contributor

fhennig commented Feb 1, 2023

@maltesander what do you think about testing, to prevent this in the future? Do we want to add a test for this? Nor sure how we could, because we'd have to test overrides for all properties. This would be nice as a unit test actually

@maltesander
Copy link
Member Author

It would be nice to have tests for this. I would add this to one of the integration tests though. Unit testing this will be hard without refactoring / mocking.

@fhennig
Copy link
Contributor

fhennig commented Feb 2, 2023

I've talked to Malte, we will not test this for now, until we make some refactorings that will make testing easier. integration tests for this are overkill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants