fix: construct image URL after HTTP server starts#797
Conversation
get_url() now returns _bound_port (since jumpstarter-dev#740) which is 0 until start() is called. The flash client was calling get_url() before _services_up() started the server, producing http://host:0/image URLs. Move image_url construction inside the _services_up() context so get_url() runs after the server binds and _bound_port is set. Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> Assisted-by: claude-opus-4.6
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIn ChangesDeferred image_url assignment in flash()
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
eballetbo
left a comment
There was a problem hiding this comment.
LGTM - I reported the problem and after applying this PR I can say that fixes the issue. Logs report the correct port now and the flashing workflow is able to find the file in the http server and flash it.
get_url() now returns _bound_port (since #740) which is 0 until start() is called. The flash client was calling get_url() before _services_up() started the server, producing http://host:0/image URLs.
Move image_url construction inside the _services_up() context so get_url() runs after the server binds and _bound_port is set.