Fail GitHub scans on asset errors and drop sync state with its remote #135
Reference in New Issue
Block a user
Delete Branch "benvin/github-asset-fail-etag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A GitHub release scan that hit a transient asset error still saved the release-list ETag, so the failed asset was never retried. Assets that are corrupt, deleted or truncated upstream fail on every retry, so they must not keep the remote failed.
provider.ErrInvalidPackagefor unparseable packages and 404/410/416 asset downloads; such assets are logged and skippedremotesDELETE FROM github_*_sync_state WHERE remote_name NOT IN (SELECT name FROM remotes)), then the constraint can be validated.full := len(body) < nis the only "whole object" signal; a clean short body (proxy/CDN closing early with no transport error) is taken as the full file, then reported as ErrInvalidPackage (rpm truncated header, deb/alpine "not found within") and skipped permanently → compare against Content-Range total / Content-Length (or require 206 total <= n) before setting full; otherwise return a plain error.failed = appendafter InsertXMetadata) and never asserterrors.Is(err, provider.ErrInvalidPackage)for the other wrapped paths (deb "control missing Package", alpine "missing pkgname/arch", header-size-exceeded) → add a failing-inserter case asserting retry, and table cases per wrapped branch.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.