Skip to content

fix(cli): copy ServerName into clientOpts in login command#16267

Merged
ishitasequeira merged 2 commits intoargoproj:masterfrom
noam-codefresh:fix-login-port-forward
Nov 10, 2023
Merged

fix(cli): copy ServerName into clientOpts in login command#16267
ishitasequeira merged 2 commits intoargoproj:masterfrom
noam-codefresh:fix-login-port-forward

Conversation

@noam-codefresh
Copy link
Contributor

@noam-codefresh noam-codefresh commented Nov 7, 2023

Fixes #16266

this will pass the ServerName flag value (or ARGOCD_SERVER_NAME env var) from the globalClientOpts to the options used by the login command. when trying to login using --port-forward this value is needed.

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.
  • Optional. My organization is added to USERS.md.
  • 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.

@noam-codefresh noam-codefresh requested a review from a team as a code owner November 7, 2023 18:55
Signed-off-by: Noam Gal <noam.gal@codefresh.io>
@noam-codefresh noam-codefresh changed the title fix #16266 - copy ServerName into clientOpts fix(cli): copy ServerName into clientOpts in login command Nov 7, 2023
Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

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

LGTM!!!

@codecov
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (58da6a3) 49.51% compared to head (241ae34) 49.52%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #16267   +/-   ##
=======================================
  Coverage   49.51%   49.52%           
=======================================
  Files         269      269           
  Lines       46990    46991    +1     
=======================================
+ Hits        23269    23272    +3     
+ Misses      21437    21436    -1     
+ Partials     2284     2283    -1     
Files Coverage Δ
cmd/argocd/commands/login.go 2.81% <0.00%> (-0.01%) ⬇️

... and 1 file with indirect coverage changes

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

@ishitasequeira ishitasequeira enabled auto-merge (squash) November 9, 2023 04:49
@ishitasequeira ishitasequeira merged commit 4fe2dd8 into argoproj:master Nov 10, 2023
@noam-codefresh noam-codefresh deleted the fix-login-port-forward branch November 10, 2023 09:59
jmilic1 pushed a commit to jmilic1/argo-cd that referenced this pull request Nov 13, 2023
Signed-off-by: Noam Gal <noam.gal@codefresh.io>
Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com>
@pasha-codefresh
Copy link
Member

/cherry-pick release-2.9

@thesuperzapper
Copy link

thesuperzapper commented Nov 29, 2023

@crenshaw-dev @pasha-codefresh it seems like something went wrong as this has not made its way into the 2.9.2 argocd cli version.

There was a related chery-pick #16457, but we probably also need this PR in 2.9.

vladfr pushed a commit to vladfr/argo-cd that referenced this pull request Dec 13, 2023
Signed-off-by: Noam Gal <noam.gal@codefresh.io>
Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
Signed-off-by: Noam Gal <noam.gal@codefresh.io>
Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
@thesuperzapper
Copy link

@pasha-codefresh I think this is still not chery-picked into 2.9, are we only going to fix this bug in 2.10?

@noam-codefresh
Copy link
Contributor Author

the fix was merged to the main branch before release-2.10 started, so it is included in 2.10.
i don't know why it never got cherry-picked to 2.9. i guess right now it doesn't matter much.

lyda pushed a commit to lyda/argo-cd that referenced this pull request Mar 28, 2024
Signed-off-by: Noam Gal <noam.gal@codefresh.io>
Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
Hariharasuthan99 pushed a commit to AmadeusITGroup/argo-cd that referenced this pull request Jun 16, 2024
Signed-off-by: Noam Gal <noam.gal@codefresh.io>
Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@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.

argocd login --port-forward fails with cannot find pod with selector: [app.kubernetes.io/name=]

5 participants