[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1026886: fakeupstream.cgi: support functionality to ignore pre-release on GitHub.com



Package: qa.debian.org
Severity: normal
X-Debbugs-Cc: kenhys@xdump.org

# Problem

Currently, it seems that there is no comprehensive way to
ignore pre-release on GitHub.com [1]

Adding a feature upstream=github_releases to avoid unexpected failure
to do packaging pre-release as an official release.

# Failure scenario

Here is the failure scenario:

  1. upstream make a tag as v1.0.0
  2. upstream releases v1.0.0 as pre-release
  3. upstream remove a tag v1.0.0
  4. upstream make a tag v1.0.0 again
  5. upstream releases v1.0.0 as official release

If you overlooked step 2 as a pre-release, d/watch
just notify v1.0.0 released and shows it in
package overview [2]

As a result, it may cause wrong version packaged into archive.
If so, you need to apply many patch sets against to v1.0.0-2.

These kind of failure is derived from difficulty of
distinguish (with uscan) pre-release from
https://github.com/org/project/releases or
https://github.com/org/project/tags

Practically, it is a rare case, so I'm not sure that it should be fixed or
redirector is used frequently, but I'll file it as an example of rare case.

# Expected

If redirector(fakeupstream.cgi) returns a response which excludes
pre-release explicitly by default, it may improves such a situation.

Usage in debian/watch (assumption):

  version=4
  opts="searchmode=plain" \
    http://qa.local/cgi-
bin/fakeupstream.cgi?upstream=github_releases/google/sentencepiece \
    .*/sentencepiece-@ANY_VERSION@@ARCHIVE_EXT@

# Additional Information

NOTE: The API response [3] vary whether assets are attached or not.

With assets, it returns browser_download_url field:
https://github.com/(org)/(project)/releases/download/(tag_name)/{project}-{version}.tar.gz

Without assets, it returns zipball_url or tarball_url fields:
  https://api.github.com/repos/(org)/(project)/tarball/(tag_name)
  https://api.github.com/repos/(org)/(project)/zipball/(tag_name)

[1] debian/watch: Ignoring pre-release on GitHub
    https://lists.debian.org/debian-devel/2022/12/msg00024.html

[2] https://qa.debian.org/developer.php?login=[your account]

[3] https://api.github.com/repos/$org/$project/releases


Reply to: