Skip to content

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

@parthivsaikia

Description

@parthivsaikia

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions