Skip to content

Conversation

sivchari
Copy link
Member

close #22606

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@sivchari sivchari requested a review from a team as a code owner April 13, 2025 13:05
Copy link

bunnyshell bot commented Apr 13, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link

codecov bot commented Apr 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.06%. Comparing base (3bbbac4) to head (7607b68).
⚠️ Report is 430 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #22650      +/-   ##
==========================================
+ Coverage   59.98%   60.06%   +0.08%     
==========================================
  Files         343      342       -1     
  Lines       57890    57843      -47     
==========================================
+ Hits        34724    34745      +21     
+ Misses      20382    20325      -57     
+ Partials     2784     2773      -11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@nitishfy nitishfy left a comment

Choose a reason for hiding this comment

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

I tested your changes just now. I get the same error for a version such as 1.30.1+xyz -

Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = Manifest generation error (cached): failed to execute helm template command: failed to get command args to log: `helm template . --name-template helm-webapp --namespace helm --kube-version 1.30.1_xyz --values <path to cached source>/helm-webapp/values-prod.yaml <api versions removed> --include-crds` failed exit status 1: Error: invalid kube version '1.30.1_xyz': Invalid Semantic Version

Maybe this is happening because the kube version of target cluster is not actually 1.30.1_xyz.

Secondly, with the current changes, we will be removing the kube-version support for GKE that was introduced in this PR. I'd like to know other maintainers thoughts on this PR before moving forward.

@sivchari
Copy link
Member Author

Hi, @nitishfy ! Thank you for investigating about this issue.

How interesting! You can know that helm can receive the kube-version as a 1.30.1+xyz by seeing the log of test I added new one. Helm would replace + with _, so does this specification results in it ? I'd investigate. Thanks.

Secondly, with the current changes, we will be removing the kube-version support for GKE that was introduced in this PR. I'd like to know other maintainers thoughts on this PR before moving forward.

I totally agree with your thoughts since this change surely break the compatibility. The essence that we found the problem is current API definition accept various semantic version such as vX.Y.Z+x.y.z. We might have to discuss about rule what version is acceptable and what one isn't acceptable.

assert.Equal(t, "sample/v2", objs[0].GetAPIVersion())
}

func TestIssue22606(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
func TestIssue22606(t *testing.T) {
func TestIssue22606(t *testing.T) {

please add a better name for this test.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree with @nitishfy. Maybe add a more descriptive name for the function and add the link to the issue as a comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks you both, I renamed it.

@sivchari sivchari force-pushed the fix-22606 branch 2 times, most recently from cdb69cf to 2179ad8 Compare April 16, 2025 04:27
@sivchari
Copy link
Member Author

I'll discuss the backward compatibly on original issue later 👍

@nitishfy
Copy link
Member

let's bring this issue in this week's meeting.

@FourFifthsCode
Copy link
Contributor

@sivchari @nitishfy
It seems like it might be a good idea to remove text.Semver function from all three places (Helm, Kustomize, and Plugins) and make a clean break for version 3.0.

Then add documentation that:

  1. we'll no longer remove + from Kube versions, which may break deployments for APIs which don't have valid semvers
  2. we'll no longer remove + from Kube versions, which may change Helm output, depending on how charts handle the Kube version variable

Then for version 2.14, we could modify text.Semver to only remove the + when there is no trailing characters, which is what caused the original issue.

@sivchari
Copy link
Member Author

@FourFifthsCode @nitishfy @leoluz
Sorry for absenting the meeting.
Does this mean creating a pr for each of v3 and v2.14?
And where is the proper documentation for these modifications?

@nitishfy
Copy link
Member

@FourFifthsCode @nitishfy @leoluz Sorry for absenting the meeting. Does this mean creating a pr for each of v3 and v2.14? And where is the proper documentation for these modifications?

I think we'd be required to do cherry-picking.

cc @FourFifthsCode

@crenshaw-dev
Copy link
Member

@FourFifthsCode is suggesting we make two different changes, one for master/v3.0 and the other for v2.14.

The master/v3.0 change would remove the + logic entirely, noting the change in release notes. We could merge that PR to master and then cherry-pick to release-3.0.

The 2.14 change would just alter the logic to remove only trailing + characters instead of all + characters. We'd make that change with a PR directly against the release-2.14 branch.

Personally I'd be satisfied with just the first change, since 3.0 goes GA early next week.

@crenshaw-dev
Copy link
Member

Note that text.SemVer is invoked in 3 different places. We'd want to remove all 3 invocations, since they all could cause the same bug.

@sivchari
Copy link
Member Author

I deleted text.Semver from the repo in this commit. That commits for v3.
I don't think it's good way to do cherry-pick to v2.14.X since it's breaking changes for users using Argo v2.14.X

@crenshaw-dev
Copy link
Member

Code lgtm! Can you add a page to the 2.14-3.0.md file documenting the change?

@sivchari
Copy link
Member Author

Can we consider this change as breaking changes since treating tag is changed ?
If you find the good place to write about this, please let me know 🙏

@crenshaw-dev
Copy link
Member

Yep, it's a breaking change. Here's the place to document it: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/upgrading/2.14-3.0.md

@sivchari
Copy link
Member Author

Thanks! I added the section about this change.

@crenshaw-dev
Copy link
Member

@sivchari apologies that we weren't able to get this into 3.0! Could you rebase update the docs to indicate that the change will happen in 3.1?

@crenshaw-dev crenshaw-dev added this to the v3.1 milestone May 21, 2025
Signed-off-by: sivchari <[email protected]>
@sivchari sivchari force-pushed the fix-22606 branch 4 times, most recently from d8897f5 to 568f919 Compare May 30, 2025 07:29
sivchari added 2 commits May 30, 2025 16:30
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
@crenshaw-dev crenshaw-dev enabled auto-merge (squash) June 2, 2025 20:11
@crenshaw-dev crenshaw-dev merged commit ea97dec into argoproj:master Jun 2, 2025
27 checks passed
chansuke pushed a commit to chansuke/argo-cd that referenced this pull request Jun 4, 2025
Signed-off-by: sivchari <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
dsuhinin pushed a commit to dsuhinin/argo-cd that referenced this pull request Jun 16, 2025
Signed-off-by: sivchari <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: dsuhinin <[email protected]>
dsuhinin pushed a commit to dsuhinin/argo-cd that referenced this pull request Jun 16, 2025
Signed-off-by: sivchari <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: dsuhinin <[email protected]>
enneitex pushed a commit to enneitex/argo-cd that referenced this pull request Aug 24, 2025
Signed-off-by: sivchari <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: enneitex <[email protected]>
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.

Application helm spec kubeVersion incorrectly passed to helm template

5 participants