[Bug] Artifact Hub generator fails validation on version strings with 'v' prefix
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 223
- Forks
- 225
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 1
Description
### Current Behavior
The Artifact Hub generator currently assigns the raw `Version` string from the upstream package directly to the Meshery Model. Many upstream packages use version strings prefixed with `v` (e.g., `v2022.06.14`).
This causes the downstream validation logic (using `Masterminds/semver`) to reject the model generation with the error: `validation: chart.metadata.version "v..." is invalid`, causing the component generation to fail for valid charts.
### Expected Behavior
The generator should sanitize the version string before assignment. Specifically, it should strip the leading `v` (e.g., converting `v1.2.3` to `1.2.3`) to ensure the version string complies with the strict Semantic Versioning standards required by the Meshery validator.
### Screenshots/Logs
```text
Error generating model: opscenter-core
validation: chart.metadata.version "v2022.06.14" is invalid
Error generating model: opscenter-config
validation: chart.metadata.version "v2022.06.14" is invalid
```
### Environment
- **Host OS:** Linux
- **Platform:** Kubernetes
- **Meshery Server Version:** master
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Artifact Hub generator where the upstream package Version is assigned to the Meshery Model, then trace the downstream Masterminds/semver validation. Done means valid v-prefixed versions such as v2022.06.14 generate successfully without the chart.metadata.version error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100