eclipse-score / eclipse-score/lifecycle

Support representing "Not Configured" or "No Upper Limit" values in schema

Open
#143 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6
Forks
34
Avg merge
2d 3h
Merged PRs (30d)
80

Description

The Launch Manager configuration schema currently lacks sufficient expressiveness to clearly distinguish between values that are intentionally left unset and those that are missing unintentionally.

For example, if `max_memory_usage` or `max_cpu_usage` are not configured, they are expected to fall back to S-CORE defined defaults. However, when defining these defaults, omission alone introduces ambiguity: it is not possible to explicitly indicate whether the default should be applied or whether an intentional "no limit" configuration is desired.

A similar limitation exists in the `watchdog` configuration. At present, it is not possible to explicitly disable watchdog behavior for an individual component.

When addressing this issue, we should consider introducing the following schema construct:
```
"an_object": {
"anyOf": [
{ "type": "null" },
{ "type": "object", "minProperties": 1 }
]
}
```

This approach would allow users to omit the `an_object` configuration entirely (indicating that default behavior should be applied), while also allowing defaults to explicitly set the value to null to indicate that the feature is intentionally disabled.

Note that an empty object (`"an_object": {}`) would be disallowed, as it is inherently ambiguous - it is unclear whether it is meant to inherit defaults or to explicitly disable the functionality.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.