Skip to content

fix: skip non-semver release tags in forge listings#190

Merged
jaemk merged 2 commits into
masterfrom
260714.1-0-review-r5
Jul 15, 2026
Merged

fix: skip non-semver release tags in forge listings#190
jaemk merged 2 commits into
masterfrom
260714.1-0-review-r5

Conversation

@jaemk

@jaemk jaemk commented Jul 14, 2026

Copy link
Copy Markdown
Owner
  • Skip (log::debug!) releases whose tag is not semver after trimming a leading v in the github/gitlab/gitea listings, instead of failing the whole fetch with an opaque SemVer error. A repo mixing rolling tags (nightly, latest, date tags) with semver releases stays updatable, matching the pre-1.0 behavior of ignoring them.
  • Pick the first parseable entry as "newest" in the gitlab/gitea latest-release path; error with NoReleaseFound when no entry parses.
  • Name the offending tag in the Error::SemVer returned when fetching a pinned non-semver release_tag.
  • Add listing/newest/pinned-tag tests with non-semver tags to all three forge backends.
  • Document on HttpClient/HttpResponse/AsyncHttpClient/AsyncHttpResponse that new methods are only added in minor releases with a default impl (the policy ReleaseSource already states).
  • Change the default User-Agent to self-update/<version>.
  • Keep builds without the forge/s3 backends warning-free: allow(dead_code) on the pagination machinery they gate, s3's Duration import moved under s3-auth.

jaemk added 2 commits July 14, 2026 09:01
…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
@jaemk
jaemk merged commit 7b2fa17 into master Jul 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant