Skip to content

First scheduled discovery run fails, second run succeeds #188

@Dbzman

Description

@Dbzman

Describe the bug
We run our Renovate jobs once a night. (0 3 * * *) The problem is that they actual renovate runs for the projects did not happen in the last days. When we investigated, we found out that the discovery schedule fails when no previous or completed pod with logs is laying around. When the second schedule is triggered (not manually), the discovery succeeds and renovate project runs are properly scheduled.

As a workaround we set the schedule to 0,10 3 * * * to ensure that we have a pod with logs laying around.

To Reproduce
Steps to reproduce the behavior:

  • add a RenovateJob with schedule: "*/5 * * * *" (to illustrate the problem easier)
  • ensure discovery has run before and individual project jobs are succeeded
  • delete the completed discovery job (if existing) for the RenovateJob
  • wait for the schedule
  • the discovery will fail
  • wait one more schedule
  • the discovery succeeds and triggers individual renovate runs

Expected behavior
Independently of a job which lays around, the discovery process should work.

Screenshots & Logs

# failing job
{"level":"info","ts":"2026-03-06T14:22:28Z","logger":"scheduler","msg":"added","now":"2026-03-06T14:22:28Z","entry":11,"next":"2026-03-06T14:25:00Z"}
{"level":"info","ts":"2026-03-06T14:25:00Z","logger":"scheduler","msg":"wake","now":"2026-03-06T14:25:00Z"}
{"level":"info","ts":"2026-03-06T14:25:00Z","logger":"scheduler","msg":"executing schedule","schedule":"default-services-renovate"}
{"level":"info","ts":"2026-03-06T14:25:00Z","logger":"scheduler","msg":"run","now":"2026-03-06T14:25:00Z","entry":11,"next":"2026-03-06T14:30:00Z"}
{"level":"error","ts":"2026-03-06T14:25:00Z","logger":"renovatejob-controller.default-services-renovate","msg":"Failed to discover projects for RenovateJob","controller":"renovatejob","controllerGroup":"renovate
{"level":"info","ts":"2026-03-06T14:25:00Z","logger":"scheduler","msg":"schedule executed","schedule":"default-services-renovate"}
# working job
{"level":"info","ts":"2026-03-06T14:30:00Z","logger":"scheduler","msg":"wake","now":"2026-03-06T14:30:00Z"}
{"level":"info","ts":"2026-03-06T14:30:00Z","logger":"scheduler","msg":"run","now":"2026-03-06T14:30:00Z","entry":11,"next":"2026-03-06T14:35:00Z"}
{"level":"info","ts":"2026-03-06T14:30:00Z","logger":"scheduler","msg":"executing schedule","schedule":"default-services-renovate"}
{"level":"info","ts":"2026-03-06T14:30:40Z","logger":"scheduler","msg":"schedule executed","schedule":"default-services-renovate"}

Information (please complete the following information):

  • Kubernetes Version 1.35.0
  • Version 1.20.0 and 1.22.1 (observed with both)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions