garethgeorge / backrest

Backrest is a web UI and orchestrator for restic backup.
GNU General Public License v3.0
1.72k stars 50 forks source link

Templated error messages of jobs on a locked repository results in error #527

Closed berti34 closed 1 week ago

berti34 commented 1 month ago

Describe the bug Sending an error message results in an error error: template rendering: execute template: template: template:1:56: executing "template" at <.Plan.Id>: nil pointer evaluating *v1.Plan.Id

Logs for operation Run Hook at 22.10.2024, 11:49

[tasklog] 11:49:10.315Z error run hook command hook repo/FANTEC-Rest-Server/hook/0 task failed {"error": "template rendering: execute template: template: template:1:56: executing \"template\" at <.Plan.Id>: nil pointer evaluating *v1.Plan.Id", "duration": 0.000191294}

Platform Info

grafik grafik

Expected behavior Replace or Ignore the missing plan.id

garethgeorge commented 1 month ago

Ouch, thanks for filing this. Looks like I’m not plumbing the template vars in correctly for one of the triggers on check operations? Do you see this for any other task types?

berti34 commented 3 weeks ago

No, didn't see similar errors.

garethgeorge commented 1 week ago

Should be fixed by https://github.com/garethgeorge/backrest/commit/0ecebf8ce40ac05e43051c2f8961829ae7bbc52d