dvershinin/lastversion

Wrong version of cadvisor

Closed this issue · 2 comments

Project with incorrect version

https://github.com/google/cadvisor/

To Reproduce

$ lastversion google/cadvisor --verbose

lastversion.lastversion - INFO - Verbose 1 level output.
lastversion.ProjectHolder - INFO - Using cache directory: C:\Users\micro\AppData\Local\lastversion\lastversion\Cache.
lastversion.ProjectHolder - INFO - Created instance of GitHubRepoSession
lastversion.GitHubRepoSession - INFO - No API token found in environment variables ['LASTVERSION_GITHUB_API_TOKEN', 'GITHUB_API_TOKEN', 'GITHUB_TOKEN'].
lastversion.GitHubRepoSession - INFO - Got HTTP status code 200 from https://github.com/google/cadvisor/releases.atom
lastversion.GitHubRepoSession - INFO - Checking tag v0.48.1
lastversion.ProjectHolder - INFO - Sanitizing string v0.48.1 as a satisfying version.
lastversion.ProjectHolder - INFO - Parsed as Version OK. String representation: 0.48.1.
lastversion.GitHubRepoSession - INFO - Tag v0.48.1 is not comparable to current selection
lastversion.GitHubRepoSession - INFO - Got HTTP status code 200 from https://api.github.com/repos/google/cadvisor/releases
lastversion.GitHubRepoSession - INFO - Found formal release for this tag which is unwanted pre-release: 0.48.1.
lastversion.GitHubRepoSession - INFO - Checking tag v0.48.0
lastversion.ProjectHolder - INFO - Sanitizing string v0.48.0 as a satisfying version.
lastversion.ProjectHolder - INFO - Parsed as Version OK. String representation: 0.48.0.
lastversion.GitHubRepoSession - INFO - Tag v0.48.0 is not comparable to current selection
lastversion.GitHubRepoSession - INFO - Found formal release for this tag which is unwanted pre-release: 0.48.0.
lastversion.GitHubRepoSession - INFO - Checking tag v0.47.3
lastversion.ProjectHolder - INFO - Sanitizing string v0.47.3 as a satisfying version.
lastversion.ProjectHolder - INFO - Parsed as Version OK. String representation: 0.47.3.
lastversion.GitHubRepoSession - INFO - Tag v0.47.3 is not comparable to current selection
lastversion.GitHubRepoSession - INFO - Got HTTP status code 404 from https://api.github.com/repos/google/cadvisor/releases/tags/v0.47.3
lastversion.GitHubRepoSession - INFO - No formal release for tag v0.47.3
lastversion.GitHubRepoSession - INFO - Selected version as current selection: 0.47.3.
lastversion.GitHubRepoSession - INFO - Checking tag v0.47.2
lastversion.ProjectHolder - INFO - Sanitizing string v0.47.2 as a satisfying version.
lastversion.ProjectHolder - INFO - Parsed as Version OK. String representation: 0.47.2.
lastversion.GitHubRepoSession - INFO - Tag v0.47.2 does not contain newer version than we already found
lastversion.GitHubRepoSession - INFO - Checking tag v0.46.1
lastversion.ProjectHolder - INFO - Sanitizing string v0.46.1 as a satisfying version.
lastversion.ProjectHolder - INFO - Parsed as Version OK. String representation: 0.46.1.
lastversion.GitHubRepoSession - INFO - Tag v0.46.1 does not contain newer version than we already found
lastversion.GitHubRepoSession - INFO - Checking tag v0.45.1
lastversion.ProjectHolder - INFO - Sanitizing string v0.45.1 as a satisfying version.
lastversion.ProjectHolder - INFO - Parsed as Version OK. String representation: 0.45.1.
lastversion.GitHubRepoSession - INFO - Tag v0.45.1 does not contain newer version than we already found
lastversion.GitHubRepoSession - INFO - Checking tag v0.44.2
lastversion.ProjectHolder - INFO - Sanitizing string v0.44.2 as a satisfying version.
lastversion.ProjectHolder - INFO - Parsed as Version OK. String representation: 0.44.2.
lastversion.GitHubRepoSession - INFO - Tag v0.44.2 does not contain newer version than we already found
lastversion.GitHubRepoSession - INFO - Checking tag v0.47.1
lastversion.ProjectHolder - INFO - Sanitizing string v0.47.1 as a satisfying version.
lastversion.ProjectHolder - INFO - Parsed as Version OK. String representation: 0.47.1.
lastversion.GitHubRepoSession - INFO - Tag v0.47.1 does not contain newer version than we already found
lastversion.GitHubRepoSession - INFO - Checking tag v0.47.0
lastversion.ProjectHolder - INFO - Sanitizing string v0.47.0 as a satisfying version.
lastversion.ProjectHolder - INFO - Parsed as Version OK. String representation: 0.47.0.
lastversion.GitHubRepoSession - INFO - Tag v0.47.0 does not contain newer version than we already found
lastversion.GitHubRepoSession - INFO - Checking tag v0.46.0
lastversion.ProjectHolder - INFO - Sanitizing string v0.46.0 as a satisfying version.
lastversion.ProjectHolder - INFO - Parsed as Version OK. String representation: 0.46.0.
lastversion.GitHubRepoSession - INFO - Tag v0.46.0 does not contain newer version than we already found
lastversion.lastversion - INFO - Located the latest release tag v0.47.3 at: https://github.com/google/cadvisor via feed mechanism
0.47.3

Expected behavior

0.47.2 (even though tag 0.47.3 exists, there's no release of this version)

Program output

0.47.3

Support This Project

❤️ Love this project? Consider supporting us by becoming a GitHub Sponsor. GitHub Sponsors get priority attention to their issues and requests. Click here to sponsor.

Similar to the other bug. lastversion sees tags with version numbers but without beta keywords, as stable releases. This is expected functionality. If you want to only consider formal releases tagged in GitHub UI as such, it makes sense to just uses GitHub API directly. But most authors do things inconsistently and looking at tags as releases makes the most sense.

Closing as a duplicate of #128