Skip to content

fix(controller): add backward compatibility for --metricsport flag#4457

Merged
zachaller merged 2 commits intoargoproj:masterfrom
puretension:fix/metricsport-backward-compatibility-4428
Nov 3, 2025
Merged

fix(controller): add backward compatibility for --metricsport flag#4457
zachaller merged 2 commits intoargoproj:masterfrom
puretension:fix/metricsport-backward-compatibility-4428

Conversation

@puretension
Copy link
Copy Markdown
Contributor

Checklist:

  • This is a bug fix
  • The title follows conventional commits with issue number
  • I've signed my commits with DCO
  • I have written unit tests for my change
  • My builds are green (local tests pass)
  • My organization is added to USERS.md (not applicable for individual contributor)

What this PR does:
Adds backward compatibility for the --metricsport flag that was changed to --metricsPort in #4368.

Why we need it:
The camelCase change broke compatibility with Helm charts that still use --metricsport. This fix allows both flags to work while encouraging migration to the new format.

Testing:

  • Added unit test to verify both flags exist and deprecated flag is marked properly
  • Built and tested both --metricsport and --metricsPort flags manually
  • Deprecated flag shows appropriate warning message
  • All tests pass locally

Changes:

  • Added --metricsport as deprecated alias for --metricsPort
  • Added deprecation warning when old flag is used
  • Added unit test for flag compatibility
  • Maintains full backward compatibility with existing deployments

…ixes argoproj#4428

Add deprecated --metricsport flag alias to maintain backward compatibility
with Helm charts while encouraging migration to --metricsPort.

- Adds --metricsport as deprecated alias for --metricsPort
- Shows deprecation warning when --metricsport is used
- Maintains full backward compatibility with existing deployments

Signed-off-by: puretension <rlrlfhtm5@gmail.com>
@puretension puretension force-pushed the fix/metricsport-backward-compatibility-4428 branch from ee58be9 to 9a9361c Compare September 18, 2025 16:35
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 18, 2025

Published E2E Test Results

  4 files    4 suites   3h 31m 18s ⏱️
115 tests 103 ✅  7 💤  5 ❌
474 runs  433 ✅ 28 💤 13 ❌

For more details on these failures, see this check.

Results for commit 3f49948.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 18, 2025

Published Unit Test Results

2 331 tests   2 331 ✅  3m 1s ⏱️
  129 suites      0 💤
    1 files        0 ❌

Results for commit 3f49948.

♻️ This comment has been updated with latest results.

@puretension puretension changed the title fix(controller): add backward compatibility for --metricsport flag. fix(controller): add backward compatibility for --metricsport flag Sep 18, 2025
- Change jsonPath from {$.json} to {$} to get full response
- Update conditions to use result.json.status instead of result.status
- Fixes flaky TestCanaryInconclusiveBackgroundAnalysis e2e test

Signed-off-by: puretension <rlrlfhtm5@gmail.com>
@puretension puretension force-pushed the fix/metricsport-backward-compatibility-4428 branch from a7c447a to 3f49948 Compare September 18, 2025 17:37
@sonarqubecloud
Copy link
Copy Markdown

@zachaller zachaller merged commit 778fce3 into argoproj:master Nov 3, 2025
24 checks passed
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.

2 participants