Logging param validation checks on startup
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 19
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Currently it seems like if ocs_agent.param validation checks fail on startup, it's impossible to tell from the logs.
For example, the ocs-magpie agent there is a task set_monitored_channels which will fail the validation if chan_info contains more than 6 channels. When running this on startup with more than 6 channels, the task won't actually run, but the agent won't crash and there is nothing in the logs that makes it clear that the param validation failed. The logs in this case look like this:
2022-04-26T17:36:30-0400 startup-op: launching set_monitored_channels
2022-04-26T17:36:30-0400 start called for set_monitored_channels
2022-04-26T17:36:30-0400 send:1 Status is now "running".
2022-04-26T17:36:30-0400 read:0 Status is now "running".
2022-04-26T17:36:30-0400 send:1 Status is now "running".
2022-04-26T17:36:30-0400 set_monitored_channels:2 Set monitored channels
2022-04-26T17:36:30-0400 set_monitored_channels:2 Status is now "done".
Failing param-checks on startup should probably crash the agent or at least log that the task failed out.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing ocs_agent.param validation during startup for the ocs-magpie task set_monitored_channels. Reproduce the case with more than 6 channels in chan_info and inspect the resulting logs. Done means a failed startup parameter check is clearly logged or causes the agent to fail, rather than appearing to complete successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100