Skip to content

Fix GitVersion configuration to generate clean release versions instead of pre-release versions - #8

Merged
larsbuch merged 5 commits into
masterfrom
copilot/fix-908d7e61-8b82-4ae8-b887-add106c2b2aa
Aug 20, 2025
Merged

larsbuch merged 5 commits into
masterfrom
copilot/fix-908d7e61-8b82-4ae8-b887-add106c2b2aa

Conversation

Copilot AI commented Aug 20, 2025 •

Copy link
Copy Markdown
Contributor

Problem

The NuGet packages were being published with pre-release versions like 2.0.1-ci0028 and 2.0.1-alpha.1 instead of clean release versions like 2.0.1 and 2.0.2. This caused packages to not be listed correctly in NuGet feeds and prevented proper semantic versioning.

Root Cause

The issue was caused by two configuration problems:

  1. Outdated GitVersion configuration: The GitVersion.yml file was using v5.x syntax with the tag property, which is incompatible with GitVersion v6.x
  2. Mismatched GitVersion versions: The GitHub Actions workflow was using GitVersion v5.x while the configuration required v6.x syntax

Changes Made

1. Updated GitVersion Configuration (GitVersion.yml)

  • Changed tag property to label for GitVersion v6.x compatibility
  • Maintained proper branch regex patterns for master, develop, feature, and hotfix branches
  • Configured master branch with empty label to produce clean release versions

2. Updated GitHub Actions Workflow (.github/workflows/dotnet-cicd.yml)

  • Upgraded GitVersion from v5.x to v6.x (versionSpec: '6.x')
  • Updated output field references from nuGetVersionV2 to semVer (v6.x compatibility)
  • Simplified fallback version configuration

Results

Before:

{
  "SemVer": "2.0.1-alpha.1",
  "NuGetVersion": "2.0.1-alpha0001"
}

After:

{
  "SemVer": "2.0.1",
  "FullSemVer": "2.0.1"
}

Verification

Tested complete CI/CD workflow simulation:

  • ✅ GitVersion produces clean version: 2.0.1
  • ✅ Build succeeds with version 2.0.1
  • ✅ Packages created correctly:
    • DevelApp.RuntimePluggableClassFactory.2.0.1.nupkg
    • DevelApp.RuntimePluggableClassFactory.Interface.2.0.1.nupkg

Expected Behavior

When merged to master:

  • Release versions: Clean versions like 2.0.1, 2.0.2, etc.
  • Feature branches: Pre-release versions like 2.1.0-alpha.1
  • Hotfix branches: Pre-release versions like 2.0.2-beta.1
  • NuGet packages: Properly versioned and listed in package feeds

This ensures proper semantic versioning and correct package discovery in NuGet.org.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits August 20, 2025 09:43
- Updated GitVersion.yml from v5.x to v6.x syntax (changed 'tag' to 'label')
- Updated GitHub Actions workflow to use GitVersion v6.x instead of v5.x
- Master branch now produces clean versions (2.0.1) instead of pre-release (2.0.1-alpha.1)
- Feature branches will continue to get alpha pre-release labels

Co-authored-by: larsbuch <11513991+larsbuch@users.noreply.github.com>
- Changed nuGetVersionV2 references to use semVer (v6.x doesn't have nuGetVersionV2)
- Simplified fallback version configuration
- Verified complete workflow: GitVersion produces 2.0.1 and packages are correctly named

Co-authored-by: larsbuch <11513991+larsbuch@users.noreply.github.com>
Copilot AI changed the title [WIP] I have the challenge that my nuget package gets released as 2.0.1-ci0028 and 2.0.1-ci0006 instead of 2.0.1 and 2.0.2 and becuse of not using release SemVer it is not listed correctly Fix GitVersion configuration to generate clean release versions instead of pre-release versions Aug 20, 2025
Copilot AI requested a review from larsbuch August 20, 2025 09:51
@larsbuch
larsbuch marked this pull request as ready for review August 20, 2025 10:40
Copilot AI review requested due to automatic review settings August 20, 2025 10:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes GitVersion configuration to generate clean release versions instead of pre-release versions for NuGet packages. The issue was caused by using outdated GitVersion v5.x syntax with v6.x configuration, resulting in packages being published with pre-release tags like 2.0.1-ci0028 instead of clean versions like 2.0.1.

  • Updated GitVersion configuration from v5.x tag property to v6.x label property
  • Upgraded GitHub Actions workflow to use GitVersion v6.x
  • Updated output field references from nuGetVersionV2 to semVer for v6.x compatibility

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
GitVersion.yml Updated branch configuration syntax from tag to label for GitVersion v6.x compatibility
.github/workflows/dotnet-cicd.yml Upgraded GitVersion to v6.x and updated output field references
README.md Added test change comment

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread README.md

**TDS Implementation Status**: ✅ Complete - All requirements implemented and validated

# Test change

Copilot AI Aug 20, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test change appears to be unrelated to the GitVersion configuration fix and should be removed before merging to keep the commit focused on its stated purpose.

Suggested change
# Test change

Copilot uses AI. Check for mistakes.
@larsbuch
larsbuch merged commit 3fb467e into master Aug 20, 2025
@larsbuch
larsbuch deleted the copilot/fix-908d7e61-8b82-4ae8-b887-add106c2b2aa branch August 20, 2025 10:43
larsbuch added a commit that referenced this pull request Nov 29, 2026
…bernetes (feeds #36 Stage C and the #52 local harness)

- #56: KubernetesOrchestrator.ExecuteAsync now runs a real Kubernetes exec
  (IKubernetes.NamespacedPodExecAsync, SPDY) instead of the NotImplementedException
  SimulateExecution placeholder; InputData goes to the process stdin (default
  command /app/plugin-executor, overridable via ExecutionConfiguration["command"]),
  ContainerExecutionResult carries real exit code/stdout/stderr/duration, and
  ContainerExecutionRequest.Timeout kills the exec on deadline (linked CTS) and
  reports a failed result; caller cancellation still propagates as OCE
- #57: CreateContainerAsync treats Succeeded as terminal (returns Stopped instead of
  a Ready-timeout for batch-style plugin pods), fails fast with the kubelet reason
  on Failed phase / Pending+Status.Reason / container waiting reasons
  (CreateContainerError, ImagePullBackOff, ...) / non-zero terminated exit codes;
  ContainerSpec gains Command/Args entrypoint overrides, ContainerSecurity gains
  RunAsUser; pod-ready polling configurable via PodReadyMaxAttempts/PollIntervalMs
- K8s transport moved behind protected virtual wrappers (CreatePodAsync/ReadPodAsync/
  DeletePodAsync/ListPodsAsync/ExecInPodAsync) as the fakeable seam for tests/harness
- Tests: hermetic KubernetesOrchestratorTests (mocked NamespacedPodExecAsync + fake
  cluster) and live KubernetesLiveContractTests gated on CRPCF_K8S_LIVE_TESTS=1 for
  local k8s-testkit-style runs (#52)
- Docs: CRPCF_DEPLOYMENT_GUIDE #8 documents the fixed Kubernetes backend contract,
  image requirements/per-plugin security overrides, and the #56/#57 minimum version
  (#36); CHANGELOG updated

Co-authored-by: larsbuch <larsbuch@users.noreply.github.com>
larsbuch added a commit that referenced this pull request Nov 29, 2026
…bernetes (feeds #36 Stage C and the #52 local harness)

- #56: KubernetesOrchestrator.ExecuteAsync now runs a real Kubernetes exec
  (IKubernetes.NamespacedPodExecAsync, SPDY) instead of the NotImplementedException
  SimulateExecution placeholder; InputData goes to the process stdin (default
  command /app/plugin-executor, overridable via ExecutionConfiguration["command"]),
  ContainerExecutionResult carries real exit code/stdout/stderr/duration, and
  ContainerExecutionRequest.Timeout kills the exec on deadline (linked CTS) and
  reports a failed result; caller cancellation still propagates as OCE
- #57: CreateContainerAsync treats Succeeded as terminal (returns Stopped instead of
  a Ready-timeout for batch-style plugin pods), fails fast with the kubelet reason
  on Failed phase / Pending+Status.Reason / container waiting reasons
  (CreateContainerError, ImagePullBackOff, ...) / non-zero terminated exit codes;
  ContainerSpec gains Command/Args entrypoint overrides, ContainerSecurity gains
  RunAsUser; pod-ready polling configurable via PodReadyMaxAttempts/PollIntervalMs
- K8s transport moved behind protected virtual wrappers (CreatePodAsync/ReadPodAsync/
  DeletePodAsync/ListPodsAsync/ExecInPodAsync) as the fakeable seam for tests/harness
- Tests: hermetic KubernetesOrchestratorTests (mocked NamespacedPodExecAsync + fake
  cluster) and live KubernetesLiveContractTests gated on CRPCF_K8S_LIVE_TESTS=1 for
  local k8s-testkit-style runs (#52)
- Docs: CRPCF_DEPLOYMENT_GUIDE #8 documents the fixed Kubernetes backend contract,
  image requirements/per-plugin security overrides, and the #56/#57 minimum version
  (#36); CHANGELOG updated

Co-authored-by: larsbuch <larsbuch@users.noreply.github.com>
larsbuch added a commit that referenced this pull request Nov 29, 2026
…bernetes (feeds #36 Stage C and the #52 local harness)

- #56: KubernetesOrchestrator.ExecuteAsync now runs a real Kubernetes exec
  (IKubernetes.NamespacedPodExecAsync, SPDY) instead of the NotImplementedException
  SimulateExecution placeholder; InputData goes to the process stdin (default
  command /app/plugin-executor, overridable via ExecutionConfiguration["command"]),
  ContainerExecutionResult carries real exit code/stdout/stderr/duration, and
  ContainerExecutionRequest.Timeout kills the exec on deadline (linked CTS) and
  reports a failed result; caller cancellation still propagates as OCE
- #57: CreateContainerAsync treats Succeeded as terminal (returns Stopped instead of
  a Ready-timeout for batch-style plugin pods), fails fast with the kubelet reason
  on Failed phase / Pending+Status.Reason / container waiting reasons
  (CreateContainerError, ImagePullBackOff, ...) / non-zero terminated exit codes;
  ContainerSpec gains Command/Args entrypoint overrides, ContainerSecurity gains
  RunAsUser; pod-ready polling configurable via PodReadyMaxAttempts/PollIntervalMs
- K8s transport moved behind protected virtual wrappers (CreatePodAsync/ReadPodAsync/
  DeletePodAsync/ListPodsAsync/ExecInPodAsync) as the fakeable seam for tests/harness
- Tests: hermetic KubernetesOrchestratorTests (mocked NamespacedPodExecAsync + fake
  cluster) and live KubernetesLiveContractTests gated on CRPCF_K8S_LIVE_TESTS=1 for
  local k8s-testkit-style runs (#52)
- Docs: CRPCF_DEPLOYMENT_GUIDE #8 documents the fixed Kubernetes backend contract,
  image requirements/per-plugin security overrides, and the #56/#57 minimum version
  (#36); CHANGELOG updated

Co-authored-by: larsbuch <larsbuch@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants