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

Support for oom_memory_buffer_percentage=0 #305

Open
lukasmrtvy opened this issue Jun 27, 2024 · 1 comment
Open

Support for oom_memory_buffer_percentage=0 #305

lukasmrtvy opened this issue Jun 27, 2024 · 1 comment

Comments

@lukasmrtvy
Copy link

lukasmrtvy commented Jun 27, 2024

krr ( krr:v1.11.0 ) job with args "--use_oomkill_data --oom_memory_buffer_percentage=0" fails to:

╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /app/robusta_krr/main.py:294 in run_strategy                                 │
│                                                                              │
│   291 │   │   │   │   except ValidationError:                                │
│   292 │   │   │   │   │   logger.exception("Error occured while parsing argu │
│   293 │   │   │   │   else:                                                  │
│ ❱ 294 │   │   │   │   │   runner = Runner()                                  │
│   295 │   │   │   │   │   exit_code = asyncio.run(runner.run())              │
│   296 │   │   │   │   │   raise typer.Exit(code=exit_code)                   │
│   297                                                                        │
│                                                                              │
│ /app/robusta_krr/core/runner.py:47 in __init__                               │
│                                                                              │
│    44 │   │   self._k8s_loader = KubernetesLoader()                          │
│    45 │   │   self._metrics_service_loaders: dict[Optional[str], Union[Prome │
│    46 │   │   self._metrics_service_loaders_error_logged: set[Exception] = s │
│ ❱  47 │   │   self._strategy = settings.create_strategy()                    │
│    48 │   │                                                                  │
│    49 │   │   self.errors: list[dict] = []                                   │
│    50                                                                        │
│                                                                              │
│ /app/robusta_krr/core/models/config.py:118 in create_strategy                │
│                                                                              │
│   115 │   def create_strategy(self) -> AnyStrategy:                          │
│   116 │   │   StrategyType = AnyStrategy.find(self.strategy)                 │
│   117 │   │   StrategySettingsType = StrategyType.get_settings_type()        │
│ ❱ 118 │   │   return StrategyType(StrategySettingsType(**self.other_args))   │
│   119 │                                                                      │
│   120 │   @pd.validator("strategy")                                          │
│   121 │   def validate_strategy(cls, v: str) -> str:                         │
│                                                                              │
│ /usr/local/lib/python3.12/site-packages/pydantic/main.py:341 in __init__     │
│                                                                              │
│    338 │   │   # Uses something other than `self` the first arg to allow "se │
│    339 │   │   values, fields_set, validation_error = validate_model(__pydan │
│    340 │   │   if validation_error:                                          │
│ ❱  341 │   │   │   raise validation_error                                    │
│    342 │   │   try:                                                          │
│    343 │   │   │   object_setattr(__pydantic_self__, '__dict__', values)     │
│    344 │   │   except TypeError as e:                                        │
╰──────────────────────────────────────────────────────────────────────────────╯
ValidationError: 1 validation error for SimpleStrategySettings
oom_memory_buffer_percentage
  ensure this value is greater than 0 (type=value_error.number.not_gt; 
limit_value=0)
aantn added a commit that referenced this issue Jun 27, 2024
@aantn
Copy link
Contributor

aantn commented Jun 27, 2024

Please try #306

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

No branches or pull requests

2 participants