Skip to content

fix: don't panic when no template is defined - #9

Merged
creativeprojects merged 2 commits into
mainfrom
run-without-template
Oct 12, 2026
Merged

creativeprojects merged 2 commits into
mainfrom
run-without-template

Conversation

@creativeprojects

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI balanced review requested due to automatic review settings October 12, 2026 20:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new %w logging calls produce malformed diagnostics, and the sample interval conflicts with the README.

3 open findings
What changed in this PR

Prevents panics when templates or scheduled tasks are undefined.

Changes:

  • Safely handles empty or missing templates.
  • Skips schedules referencing missing tasks.
  • Improves task failure logging and disables optional sample tasks by default.
File Description
main.go Adds startup-task error context.
lib/​task.go Validates templates before execution.
lib/​global.go Handles empty templates and invalid schedules.
config.yaml Comments out optional Zabbix configuration.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread config.yaml Outdated
Comment thread lib/global.go Outdated
Comment thread main.go Outdated
@creativeprojects
creativeprojects merged commit a4d3e97 into main Oct 12, 2026
1 check passed
@creativeprojects
creativeprojects deleted the run-without-template branch October 12, 2026 20:31
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

Successfully merging this pull request may close these issues.

2 participants