meshery / meshery/meshkit

[Bug] Artifact Hub generator fails validation on version strings with 'v' prefix

Open Beginner friendly
#843 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.