-
Notifications
You must be signed in to change notification settings - Fork 84
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
fix(libindex): temp files on non-linux #1140
Conversation
9effdf2
to
28bb1a3
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1140 +/- ##
==========================================
- Coverage 52.11% 52.04% -0.07%
==========================================
Files 218 219 +1
Lines 16724 16734 +10
==========================================
- Hits 8715 8710 -5
- Misses 7208 7219 +11
- Partials 801 805 +4 ☔ View full report in Codecov by Sentry. |
Would it be worth adding macOS and Windows builds to CI? e.g., |
28bb1a3
to
9fbdd6e
Compare
It seems fine as long as they don't slow down the CI. |
I develop on a mac and can't compile at the moment 😢 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think (*tempfile).read
would be better named as Reopen
or Clone
. (*ref).Val
should just return a *os.File
instead of a *tempFile
, because none of the file handles pulled out of the rc
should need special handling.
9fbdd6e
to
7f982c9
Compare
We need to make sure the file is removed on unix, so we need to call |
Oh I see now. I'll change it |
1a9cedc
to
3118e57
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one last issue and it's good to go
3118e57
to
a35a66a
Compare
a35a66a
to
1307086
Compare
Signed-off-by: RTann <rtannenb@redhat.com>
1307086
to
72cdae3
Compare
rebased. will merge with CI |
O_TMPFILE
does not exist on non-linux unix-based OSes, so I was unable to build ClairCore on my macOS (Darwin) machine. Similarly, I don't think it exists on Windows, butFILE_FLAG_DELETE_ON_CLOSE
does, which sounds to be about the same.The implemented solution for Darwin runs into the issue
O_TMPFILE
aimed to fix: ClairCore crashing can still leave files on the system. Since this was previous behavior, I don't see this as a regression, necessarily.