Skip to content

fix: vehicle plan publish fails on boot#26278

Closed
naltatis wants to merge 1 commit into
masterfrom
fix/vehicle-publish
Closed

fix: vehicle plan publish fails on boot#26278
naltatis wants to merge 1 commit into
masterfrom
fix/vehicle-publish

Conversation

@naltatis
Copy link
Copy Markdown
Member

fixes #26272
follow-up to #24423

Seems to be an issue when booting with db-configured vehicles. We changed publish behavior in #24423.

@andig I'm currently unable to create a reproducible failing test. Maybe race-condition. But we could merge this anyways.

@naltatis naltatis requested a review from andig December 31, 2025 09:48
@evcc-bot evcc-bot added bug Something isn't working vehicles Specific vehicle support labels Dec 31, 2025
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • If site.coordinator being nil is unexpected in normal operation, consider adding a debug or warning log in the nil case so it's easier to spot misconfigured startup sequences rather than silently skipping publication.
  • You might also consider guarding the call to publishVehicles until after site.coordinator is initialized, which would avoid needing the nil check here and make the initialization sequence more explicit.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- If `site.coordinator` being `nil` is unexpected in normal operation, consider adding a debug or warning log in the `nil` case so it's easier to spot misconfigured startup sequences rather than silently skipping publication.
- You might also consider guarding the call to `publishVehicles` until after `site.coordinator` is initialized, which would avoid needing the `nil` check here and make the initialization sequence more explicit.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@andig
Copy link
Copy Markdown
Member

andig commented Dec 31, 2025

We should only merge when the root cause is clear. It isn‘t to me.

Maybe race-condition

What should be racy? Don‘t think guessing helps.

@andig andig marked this pull request as draft December 31, 2025 10:16
@andig andig closed this Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working vehicles Specific vehicle support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.300.0: panic: runtime error: invalid memory address or nil pointer dereference

3 participants