{"record":{"id":"c879ece56a632436","repo":"pulumi/pulumi","slug":"invalid-plugin-version-s-w","errorCode":null,"errorMessage":"invalid plugin version %s: %w","messagePattern":"invalid plugin version (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdk/go/common/workspace/plugins.go","lineNumber":328,"sourceCode":"\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresp, length, err := getHTTPResponse(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer contract.IgnoreClose(resp)\n\n\tvar release struct {\n\t\tTagName string `json:\"tag_name\"`\n\t}\n\tif err = json.NewDecoder(resp).Decode(&release); err != nil {\n\t\treturn nil, fmt.Errorf(\"cannot decode gitlab response len(%d): %w\", length, err)\n\t}\n\n\tparsedVersion, err := semver.ParseTolerant(release.TagName)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid plugin version %s: %w\", release.TagName, err)\n\t}\n\treturn &parsedVersion, nil\n}\n\nfunc (source *gitlabSource) Download(\n\tctx context.Context,\n\tversion semver.Version, opSy string, arch string,\n\tgetHTTPResponse func(*http.Request) (io.ReadCloser, int64, error),\n) (io.ReadCloser, int64, error) {\n\tassetName := standardAssetName(source.name, source.kind, version, opSy, arch)\n\n\tassetURL := fmt.Sprintf(\n\t\t\"https://%s/api/v4/projects/%s/releases/v%s/downloads/%s\",\n\t\tsource.host, source.project, version, assetName)\n\tlogging.V(1).Infof(\"%s downloading from %s\", source.name, assetURL)\n\n\treq, err := source.newHTTPRequest(ctx, assetURL, \"application/octet-stream\")\n\tif err != nil {","sourceCodeStart":310,"sourceCodeEnd":346,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/sdk/go/common/workspace/plugins.go#L310-L346","documentation":"After successfully decoding the GitLab release JSON, the tag_name must be parseable as a semver (tolerantly, e.g. with a leading v). This error is thrown when the release tag is not a valid semantic version, so the SDK cannot order/compare plugin versions.","triggerScenarios":"The latest GitLab release's tag_name is something like \"release-2024\", \"1.0\", a branch name, or a commit-ish string that semver.ParseTolerant rejects.","commonSituations":"Publishing plugin releases with non-semver tag names on a self-hosted GitLab; custom tagging conventions (e.g. dates or build numbers without dots); a release was re-tagged or created manually with an ad-hoc name.","solutions":["Re-tag the latest GitLab release with a valid semver (e.g. v1.2.3 or 1.2.3)","If an older valid release exists, pin/install that version instead","Check which release is \"latest\" on the GitLab project and fix its tag"],"exampleFix":"// before (git tag)\nrelease-2024-01\n// after\ndv1.2.3","handlingStrategy":"validation","validationCode":"if _, err := semver.ParseTolerant(strings.TrimPrefix(tag, \"v\")); err != nil {\n    return fmt.Errorf(\"release tag %q is not valid semver: %w\", tag, err)\n}","typeGuard":"func isSemverTag(tag string) bool {\n    _, err := semver.ParseTolerant(tag)\n    return err == nil\n}","tryCatchPattern":null,"preventionTips":["Tag plugin releases with valid semver (vX.Y.Z)","Avoid date-based or free-form release tags for plugins","Audit the latest release tag on the GitLab project before configuring a custom source"],"tags":["go","plugins","semver","gitlab"],"backgroundTag":"invalid-semver-tag","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-09-01T08:17:40.651Z"}