-
-
Notifications
You must be signed in to change notification settings - Fork 61
cbrs UI test pr (meant to be used to play around, won't merge) #7274
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
base: master
Are you sure you want to change the base?
Conversation
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
b84844a to
ed9b838
Compare
f5fbbd4 to
ea79b3e
Compare
| @@ -0,0 +1,218 @@ | |||
| from dataclasses import dataclass, field | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong folder, find a better place for it or make it
|
|
||
|
|
||
| @dataclass() | ||
| class Configuration: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vibe: this is a pretty generic name for something, may be helpful to make it more specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at the very least, you should explain what this is
| } | ||
|
|
||
|
|
||
| class ConfigurableComponent: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usage example in the docstring
| def get_config_value( | ||
| self, config_key: str, params: dict[str, Any] = {}, validate: bool = True | ||
| ) -> Any: | ||
| pass | ||
|
|
||
| def set_config_value( | ||
| self, | ||
| config_key: str, | ||
| value: Any, | ||
| params: dict[str, Any] = {}, | ||
| user: str | None = None, | ||
| ) -> None: | ||
| pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should not have to implemented by the user, should be plug and play
| key = key.replace(delimiter_char, escape_sequence) | ||
| return key | ||
|
|
||
| def _build_runtime_config_key(self, config: str, params: dict[str, Any]) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably include the component name
| # what is this configurable component? | ||
| # allocation policy? routing strategy? strategy selector? | ||
| return self.__class__.__name__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be what runtime_config_prefix is
| self._configurations = [ | ||
| RoutingStrategyConfig( | ||
| name="max_load", | ||
| description="The maximum load we allow the Clickhouse cluster to reach", | ||
| value_type=int, | ||
| default=100, | ||
| ), | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return this from get_configurations
| def component_namespace(self) -> str: | ||
| return "allocation_policy" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to ignore all existing allocation policy configurations. Make sure they are preserved
| interface ConfigurableComponent { | ||
| type: string; | ||
| name: string; | ||
| configs: Configuration[]; | ||
| optional_config_definitions: OptionalConfigurationDefinition[]; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you're making a more generic thing, it should not be housed under capacity management
| entity={{ type: "storage", name: selectedStorage }} | ||
| configurable_component={policy} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not be hardcoded, the configurable component should return its type
Uh oh!
There was an error while loading. Please reload this page.