Bug 220975

Summary: [Flatpak SDK][GLIB] Try ostree fsck command when the flatpak update fails
Product: WebKit Reporter: Lauro Moura <lmoura>
Component: Tools / TestsAssignee: Philippe Normand <philn>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, pgriffis, philn, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Lauro Moura
Reported 2021-01-26 05:54:14 PST
Sometimes updating the SDK with the `update-webkit-flatpak` script fails, e.g., due to a network hiccup, leaving the tree not entirely sound. This could lead to error messages like: Error: While trying to checkout abc06d3ae1d25bc3b8251cfb53fb0d4615b67046729f866eac194d2804addc3a into /home/user/checkout/WebKit/WebKitBuild/UserFlatpak/runtime/org.webkit.Sdk.Debug/x86_64/0.3/.abc06d3ae1d25bc3b8251cfb53fb0d4615b67046729f866eac194d2804addc3a-MC2HW0: Opening content object 4f25c10e283d5d1cc82241b6b0c7d482f13c01696cbd0a33a2086b0e97cae5ac: Couldn't find file object '4f25c10e283d5d1cc82241b6b0c7d482f13c01696cbd0a33a2086b0e97cae5ac' The script could try to run `ostree --repo=WebKitBuild/UserFlatpak/repo/ fsck` before retrying the update. It would help the bots recovering from this issue without manual intervention.
Attachments
Philippe Normand
Comment 1 2022-10-04 05:25:14 PDT
Maybe `flatpak repair` would be better. I dunno what is the difference.
Patrick Griffis
Comment 2 2022-10-04 06:11:04 PDT
Yes `flatpak repair` does `ostree fsck` plus a bit of extra work on top: According to the code: * Try to repair a flatpak directory: * + Delete any mirror refs which may be leaking disk space * (https://github.com/flatpak/flatpak/issues/3222) * + Scan all locally available refs * + remove ref that don't correspond to a deployed ref * + Verify the commits they point to and all object they reference: * + Remove any invalid objects * + Note any missing objects * + Any refs that had invalid object, or non-partial refs that had missing objects are removed * + prune (depth=0) all object not references by a ref, which gets rid of any possibly invalid non-scanned objects * * Remove leftover .removed contents * + Enumerate all deployed refs: * + if they are not in the repo (or is partial for a non-subdir deploy), re-install them (pull + deploy)
Philippe Normand
Comment 3 2022-10-04 09:54:26 PDT
EWS
Comment 4 2022-10-04 12:52:43 PDT
Committed 255142@main (7e710036103c): <https://commits.webkit.org/255142@main> Reviewed commits have been landed. Closing PR #4987 and removing active labels.
Radar WebKit Bug Importer
Comment 5 2022-10-04 12:53:18 PDT
Note You need to log in before you can comment on or make changes to this bug.