{"record":{"id":"bd08deb6d5fb3c99","repo":"vectordotdev/vector","slug":"release-version-must-be-a-stable-semantic-version","errorCode":null,"errorMessage":"release version must be a stable semantic version","messagePattern":"release version must be a stable semantic version","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/commands/release/prepare.rs","lineNumber":46,"sourceCode":"    /// Dry run. Enabling this will make it so no PRs will be created and no branches will be pushed upstream.\n    #[arg(long, default_value_t = false)]\n    dry_run: bool,\n}\n\nstruct Prepare {\n    new_vector_version: Version,\n    vrl_version: Version,\n    repo_root: PathBuf,\n    latest_vector_version: Version,\n    release_branch: String,\n    release_preparation_branch: String,\n    dry_run: bool,\n}\n\nimpl Cli {\n    pub fn exec(self) -> Result<()> {\n        if !self.version.pre.is_empty() || !self.version.build.is_empty() {\n            bail!(\"release version must be a stable semantic version\");\n        }\n        if !self.vrl_version.pre.is_empty() || !self.vrl_version.build.is_empty() {\n            bail!(\"VRL version must be a stable semantic version\");\n        }\n        let repo_root = paths::find_repo_root()?;\n        env::set_current_dir(&repo_root)?;\n\n        let prepare = Prepare {\n            new_vector_version: self.version.clone(),\n            vrl_version: self.vrl_version,\n            repo_root,\n            latest_vector_version: git::latest_release_version()?,\n            release_branch: format!(\"v{}.{}\", self.version.major, self.version.minor),\n            // Websites containing `website` will also generate website previews.\n            // Caveat is these branches can only contain alphanumeric chars and dashes.\n            release_preparation_branch: format!(\n                \"prepare-v-{}-{}-{}-website\",\n                self.version.major, self.version.minor, self.version.patch","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/vdev/src/commands/release/prepare.rs#L28-L64","documentation":"`prepare::Cli::exec` refuses to run the release-preparation flow when the supplied Vector release version is a pre-release (has pre-release identifiers) or carries build metadata. Releases must be stable semver versions like 0.46.0, not 0.46.0-rc.1.","triggerScenarios":"Running `vdev release prepare <version> <vrl-version>` where the Vector version argument contains a `-pre` suffix or `+build` metadata (e.g. `0.46.0-rc.1`).","commonSituations":"Practicing the release process with an RC version, accidentally pasting a version string from a pre-release tag, or scripting prepare with `$(git describe)` output that appends metadata.","solutions":["Pass a stable semver version without pre-release/build parts, e.g. `vdev release prepare 0.46.0 0.12.0`.","If you intended to release an RC, this command does not support it — use the appropriate pre-release workflow instead.","Verify the version with a semver check before invoking: strip `-...` and `+...` components."],"exampleFix":"// before\n$ vdev release prepare 0.46.0-rc.1 0.12.0\nrelease version must be a stable semantic version\n// after\n$ vdev release prepare 0.46.0 0.12.0","handlingStrategy":"validation","validationCode":"// ensure a stable semver before calling prepare\nfunction isStable(v) { return /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$/.test(v); }\nif (!isStable(versionArg)) throw new Error(`prepare needs a stable version, got ${versionArg}`);","typeGuard":null,"tryCatchPattern":"if let Err(e) = prepare.exec() {\n    if e.to_string().contains(\"stable semantic version\") {\n        eprintln!(\"strip -prerelease/+build from the version argument and retry\");\n    }\n}","preventionTips":["Pass explicit version strings, never git describe output.","Document that prepare is for stable releases only.","Validate versions in the wrapper script before invoking vdev."],"tags":["semver","release","cli","validation"],"backgroundTag":"invalid-cli-argument","analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}