I wanted to use the ruff-DevContainer Feature with latest version. After the installation I asked myself, why version 0.4.10 is installed, even the newest release currently is 0.15.13.
After debugging I found out that the problem is related to the git tagging resolution. Ruff used the 'v'-Prefix until (including) 0.4.10. Since the 0.5.X releases, the prefix is dropped.
Within the nanolayer code, the Resolver uses natsorted and uses the last element. For only SemVer-compliant tags this works, but for partially or not-compliant, it fails:
|
@classmethod |
|
def get_latest_git_version_tag( |
|
cls, repo: str, release_tag_regex: Optional[str] = None |
|
) -> str: |
|
all_version_tags = cls.get_version_tags(repo, release_tag_regex) |
|
|
|
valid_versions = list(filter(cls.valid_version, all_version_tags)) |
|
|
|
if len(valid_versions) != len(all_version_tags): |
|
logger.warning( |
|
"The following release versions were filtered out as invalid: %s", |
|
str(set(all_version_tags) - set(valid_versions)), |
|
) |
|
|
|
return natsorted(valid_versions)[-1] |
I wanted to use the
ruff-DevContainer Feature withlatestversion. After the installation I asked myself, why version0.4.10is installed, even the newest release currently is0.15.13.After debugging I found out that the problem is related to the git tagging resolution. Ruff used the 'v'-Prefix until (including)
0.4.10. Since the0.5.Xreleases, the prefix is dropped.Within the
nanolayercode, the Resolver usesnatsortedand uses the last element. For onlySemVer-compliant tags this works, but for partially or not-compliant, it fails:nanolayer/nanolayer/installers/gh_release/resolvers/release_resolver.py
Lines 56 to 70 in 051660f