Skip to content

Release v0.3.1 with the video_recording attach fix #88

Description

@phanilkumar

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_recordedattach_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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions