Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid race condition when reading step details #5588

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

Martchus
Copy link
Contributor

The code currently checks whether the file is readable and shows an error to the user if not. This check is not atomic so we might still run into e.g. Can't open file ".../libssh-18.txt": No such file or directory at OpenQA/Schema/Result/JobModules.pm line 113 leading to a server-side error and a 500 response. With this change we always show the error to the user.

This commit also changes another occurrence of the same lookup-pattern to be consistent (although it is probably not strictly required there).

Related ticket: https://progress.opensuse.org/issues/159447

The code currently checks whether the file is readable and shows an error
to the user if not. This check is not atomic so we might still run into
e.g. `Can't open file ".../libssh-18.txt": No such file or directory at
OpenQA/Schema/Result/JobModules.pm line 113` leading to a server-side
error and a 500 response. With this change we always show the error to the
user.

This commit also changes another occurrence of the same lookup-pattern to
be consistent (although it is probably not strictly required there).

Related ticket: https://progress.opensuse.org/issues/159447
Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.40%. Comparing base (9fe9436) to head (c97267f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5588   +/-   ##
=======================================
  Coverage   98.40%   98.40%           
=======================================
  Files         392      392           
  Lines       38266    38266           
=======================================
  Hits        37656    37656           
  Misses        610      610           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mergify mergify bot merged commit 33905f1 into os-autoinst:master Apr 23, 2024
37 checks passed
@Martchus Martchus deleted the avoid-filesystem-error branch April 23, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants