Repository navigation
K2GO-376 fix(conex-core): drop proot free-space gates on import - #716
Merged
Merged
Conversation
The import ran two free-space checks that both read proot statvfs: the router preflight (507) and safe_extract_tar's disk fallback. proot under-reports the content-volume free space, so both false-rejected imports on devices with ample room. Remove both. The phone app (Android StatFs) is the one source of truth for free space and gates before import. A real ENOSPC now fails cleanly: the Kolibri and Calibre adapters catch OSError from extraction and return 422. Also log swallowed per-item import failures in ContentImportService: the box does not surface them, so the real cause was invisible.
The import free-space change is REST-facing, so bump conex_core.VERSION and add the 0.3.1 changelog line (the changelog requires a bump per REST-facing change). Also drop the stale "core 507 backstop" note in the ImportPreflight javadoc: the core no longer preflights space; a real shortfall now fails cleanly as 422.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Imports returned a false HTTP 507 "insufficient space" on devices with ample free space.
Cause: conex-core ran two free-space checks that both read proot statvfs, which under-reports
the content-volume free space (the router import preflight and safe_extract_tar's disk fallback,
both on /library). Remove both; the app (Android StatFs) is the single source of truth for free
space and gates before import. A genuine ENOSPC during extraction now fails cleanly (the Kolibri
and Calibre adapters catch OSError -> 422).
Also log the previously swallowed per-item import failure in ContentImportService, so the cause
shows in logcat (conex-core does not surface per-item errors).
Tests: conex-core 187 unit tests OK (4 new). Build: app:assembleStandardDebug OK.
Bumps conex_core VERSION to 0.3.1 + CHANGELOG (REST-facing change).