Skip to content

Commit

Permalink
Switch over to using an ephemeral URL session for the version check
Browse files Browse the repository at this point in the history
We're noticing that our CI/CD is getting the error "volume does not support data protection, stripping SQLITE_OPEN_FILEPROTECTION_* flags". Reports from others online point to the URL session attempting to write data that causes this in that particular environment where data protection is unavailable. As we don't need anything to be stored to disk for this, changing to ephemeral will prevent URL session from attempting the write and causing that log warning to be emitted.
  • Loading branch information
abotkin-cpi committed Aug 11, 2022
1 parent ad981ed commit 86da27e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/xcparse/XCPParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ class XCPParser {
var releaseRequest = URLRequest(url: latestReleaseURL)
releaseRequest.setValue("application/json", forHTTPHeaderField: "Content-Type")

let task = URLSession.shared.dataTask(with: releaseRequest) { (data, response, error) in
let urlSession = URLSession(configuration: .ephemeral)
let task = urlSession.dataTask(with: releaseRequest) { (data, response, error) in
if error != nil || data == nil {
return
}
Expand Down

0 comments on commit 86da27e

Please sign in to comment.