Hi! We're hitting a Errno::ENOENT on Upright::ProbeCheckJob in production on upright v0.3.0:
Errno::ENOENT: No such file or directory @ rb_sysopen - /rails/storage/playwright_videos/09c5ad392ffe354a690561dfefa8432e.webm
Root cause (v0.3.0)
In app/models/concerns/upright/playwright/video_recording.rb:
def save_video
if video_object
self.video_path = video_dir.join("#{SecureRandom.hex}.webm").to_s # set first
video_object.save_as(video_path) # may raise
end
end
def attach_video(probe_result)
if video_path
File.open(video_path, "rb") do |file| # ENOENT if save_as raised
...
When video_object.save_as raises (transient browser-server disconnect, video never flushed, etc.), video_path stays set but no file exists. failsafe_check swallows that original error, but then on_check_recorded → attach_video opens the missing path and the ProbeCheckJob fails with the confusing ENOENT above.
Already fixed on main — just not released
Commits 06588b7 and 8810d6c refactored video_recording.rb so:
- the path is only recorded after a successful
save_as (video_artifacts array)
attach_video guards each artifact with File.exist?
Both land after the v0.3.0 tag and aren't on any release. Would you mind cutting v0.3.1 with these commits? Pinning the gem to main works but loses version pinning for the rest of our stack.
Happy to open a PR if there's anything else you'd like bundled into the release.
Thanks!
Hi! We're hitting a
Errno::ENOENTonUpright::ProbeCheckJobin production on upright v0.3.0:Root cause (v0.3.0)
In
app/models/concerns/upright/playwright/video_recording.rb:When
video_object.save_asraises (transient browser-server disconnect, video never flushed, etc.),video_pathstays set but no file exists.failsafe_checkswallows that original error, but thenon_check_recorded→attach_videoopens the missing path and the ProbeCheckJob fails with the confusing ENOENT above.Already fixed on
main— just not releasedCommits
06588b7and8810d6crefactoredvideo_recording.rbso:save_as(video_artifactsarray)attach_videoguards each artifact withFile.exist?Both land after the v0.3.0 tag and aren't on any release. Would you mind cutting v0.3.1 with these commits? Pinning the gem to
mainworks but loses version pinning for the rest of our stack.Happy to open a PR if there's anything else you'd like bundled into the release.
Thanks!