Conversation
Signed-off-by: iripiri <ikoester@eonerc.rwth-aachen.de>
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a simplified Kubernetes manager and job schema, refactors event watcher initialization, and updates related configurations.
- Added a JSON schema for “Simple Kubernetes Job” definitions.
- Implemented
KubernetesManagerSimplewith a parameter builder and creation logic. - Refactored thread setup, logging, and configuration loading in the core controller and component classes.
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| villas/controller/schemas/manager/kubernetes-simple/create.yaml | New JSON schema for simple Kubernetes jobs |
| villas/controller/controller.py | Added TimeoutError catch and updated warning log |
| villas/controller/components/simulators/kubernetes.py | Renamed stop parameter and added explicit state transition |
| villas/controller/components/managers/kubernetes_simple.py | New simple manager and build_parameters helper |
| villas/controller/components/managers/kubernetes.py | Removed unused watcher threads; improved namespace setup and event filtering |
| villas/controller/components/manager.py | Registered kubernetes-simple in the factory |
| villas/controller/component.py | Changed schema validation/storage logic and status mapping |
| etc/params_k8s_dpsim.yaml | Aligned activeDeadlineSeconds and ttlSecondsAfterFinished to 1h |
| etc/config_simplekub.yaml | Added configuration snippet for the simple Kubernetes manager |
Comments suppressed due to low confidence (2)
villas/controller/components/simulators/kubernetes.py:197
- [nitpick] The parameter name 'message' is inconsistent with other simulator methods using 'payload'; consider renaming it to 'payload' for clarity.
def stop(self, message):
villas/controller/component.py:155
- This mapping now returns raw schema dicts, but the status consumer may expect validator objects with a
.schemaattribute. Ensure downstream code handles the new format or restore the previous.schemaaccess.
name: v for name, v in self.schema.items()
| except queue.Empty: | ||
| pass | ||
| except TimeoutError: | ||
| LOGGER.warn('TimeoutError, let kombu reconnect..') |
There was a problem hiding this comment.
Use LOGGER.warning instead of the deprecated LOGGER.warn for consistency with the Python logging API.
| LOGGER.warn('TimeoutError, let kombu reconnect..') | |
| LOGGER.warning('TimeoutError, let kombu reconnect..') |
| from villas.controller.components.simulators.kubernetes import KubernetesJob | ||
|
|
||
|
|
||
| def build_parameters(sim_name, jobname, image, adls=3600, privileged=False, name=None, uuid=None): |
There was a problem hiding this comment.
[nitpick] The parameter 'adls' is unclear—consider renaming it to 'active_deadline_seconds' to improve readability.
| def build_parameters(sim_name, jobname, image, adls=3600, privileged=False, name=None, uuid=None): | |
| def build_parameters(sim_name, jobname, image, active_deadline_seconds=3600, privileged=False, name=None, uuid=None): |
| except TimeoutError: | ||
| LOGGER.warn('TimeoutError, let kombu reconnect..') |
There was a problem hiding this comment.
[nitpick] Include the caught exception in the log message to aid debugging, e.g., LOGGER.warning('TimeoutError occurred, reconnecting: %s', err).
| except TimeoutError: | |
| LOGGER.warn('TimeoutError, let kombu reconnect..') | |
| except TimeoutError as err: | |
| LOGGER.warn('TimeoutError occurred, let kombu reconnect: %s', err) |
Signed-off-by: iripiri <ikoester@eonerc.rwth-aachen.de>
Signed-off-by: iripiri <ikoester@eonerc.rwth-aachen.de>
…mespace Signed-off-by: iripiri <ikoester@eonerc.rwth-aachen.de>
Signed-off-by: iripiri <ikoester@eonerc.rwth-aachen.de>
a62b7c2 to
d78de89
Compare
Signed-off-by: iripiri <ikoester@eonerc.rwth-aachen.de>
548bfa7 to
cea6677
Compare
…newest image after amending and push force) Signed-off-by: iripiri <ikoester@eonerc.rwth-aachen.de>
Uh oh!
There was an error while loading. Please reload this page.