carvel-dev / carvel-dev/vendir

sort-semver skip numeric identifiers over unsigned long

Open
#117 1 comment 0 reactions 0 assignees View on GitHub
awaiting-input bug discussion priority/awaiting-more-evidence
Dominant language
Go
Stars
399
Forks
73
Avg merge
2h 53m
Merged PRs (30d)
2

Description

**What steps did you take:**
If semver identifier in a metadata contains only numeric characters and if that "number" exceeds unsigned long (18,446,744,073,709,551,615), tools simply ignores that version.

```
$ vendir tools sort-semver -v "1.0.0+18446744073709551615"
Versions

Version
1.0.0+18446744073709551615

Highest version: 1.0.0+18446744073709551615

Succeeded

$ vendir tools sort-semver -v "1.0.0+18446744073709551616"
Versions

Version

Succeeded

$ vendir tools sort-semver -v "1.0.0+18446744073709551615x"
Versions

Version
1.0.0+18446744073709551615x

Highest version: 1.0.0+18446744073709551615x

Succeeded

$ vendir tools sort-semver -v "1.0.0+18446744073709551616x"
Versions

Version
1.0.0+18446744073709551616x

Highest version: 1.0.0+18446744073709551616x

Succeeded

```

**What happened:**
Version is ignored

**What did you expect:**
Expecting metadata identifier to work with any alphanumeric characters

**Environment:**

- vendir version 0.23.0
- OS Ubuntu 18.04.3 LTS

---
Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the four `vendir tools sort-semver` commands from the issue and locate the `sort-semver` command entry point in the repository. Trace how numeric metadata identifiers are parsed, then add coverage for values above unsigned long and verify that all alphanumeric metadata versions remain in the output.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.