fix: skip non-semver release tags in forge listings#190
Merged
Conversation
…pinned-tag errors - github/gitlab/gitea listings skip (log::debug) releases whose tag is not semver after trimming a leading v, instead of failing the whole fetch with an opaque SemVer error; gitlab/gitea "newest" picks the first parseable entry; fetching a pinned non-semver `release_tag` errors with `Error::SemVer` naming the offending tag - document on `HttpClient`/`HttpResponse`/`AsyncHttpClient`/`AsyncHttpResponse` that new methods are only added in minor releases with a default impl - change the default User-Agent to `self-update/<version>` - keep builds without forge/s3 backends warning-free: `allow(dead_code)` on the pagination machinery they gate, and s3's `Duration` import moved under `s3-auth`
…ment the skip behavior - replace the `MessageError` wrap in `name_tag_in_semver_error` with a `NonSemverTagError` that names the tag and keeps the original `semver::Error` reachable via `source()` - document on `release_tag` that non-semver pins fail with `Error::SemVer`, on `get_newer_releases` the listing skip / `NoReleaseFound` outcome and the `RUST_LOG=self_update=debug` channel for skipped tags, and on `get_latest_release` the github (`/releases/latest`, errors) vs gitlab/gitea (listing, skips) difference; scope the `ReleaseBuilder::build` validation doc to custom sources - add tests: pagination continues past an all-non-semver page, pre-release tags are retained, capital-`V` tags are skipped (only lowercase `v` is trimmed), the async driver skips identically, and the error-chain wrap
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.
log::debug!) releases whose tag is not semver after trimming a leadingvin the github/gitlab/gitea listings, instead of failing the whole fetch with an opaqueSemVererror. A repo mixing rolling tags (nightly,latest, date tags) with semver releases stays updatable, matching the pre-1.0 behavior of ignoring them.NoReleaseFoundwhen no entry parses.Error::SemVerreturned when fetching a pinned non-semverrelease_tag.HttpClient/HttpResponse/AsyncHttpClient/AsyncHttpResponsethat new methods are only added in minor releases with a default impl (the policyReleaseSourcealready states).self-update/<version>.allow(dead_code)on the pagination machinery they gate, s3'sDurationimport moved unders3-auth.