Skip to content

Fix version parameter autocompletion - #225

Open
dheeraj12347 wants to merge 1 commit into
apache:mainfrom
dheeraj12347:fix-version-autocomplete-224
Open

dheeraj12347 wants to merge 1 commit into
apache:mainfrom
dheeraj12347:fix-version-autocomplete-224

Conversation

@dheeraj12347

Copy link
Copy Markdown
Contributor

Fixes #224

The version parameter autocompletion was incorrectly retrieving
registered Kubernetes versions for APIs such as list hosts and
list routers.

This change makes version completion use the current list API's
version response field when available.

Added regression tests for listHosts and listRouters.

Verified with:

  • go test ./...
  • go vet ./...
  • make
  • git diff --check

@dheeraj12347

Copy link
Copy Markdown
Contributor Author

Hi @nvazquez , @DaanHoogland I’ve worked on CloudMonkey issue #224 regarding the incorrect version parameter autocompletion.

I’ve opened PR #225 with the fix. The change makes version= use the current list API when it exposes a version response field, and adds regression tests for listHosts and listRouters.

I’ve also verified the changes with go test ./..., go vet ./..., and make.

Would appreciate your feedback when you get a chance.

@github-actions

Copy link
Copy Markdown

✅ Build complete for PR #225.

📦 Binary artifacts are available in the workflow run (expires on September 21, 2026).

Note: Download artifacts by clicking on the workflow run link above, then scroll to the "Artifacts" section.
Artifacts from PR builds are for testing only and may contain unreviewed, malicious code.

@borisstoyanov borisstoyanov 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.

@dheeraj12347 thanks for the fix, I've run a quick verification with claude and it seems that it's not addressing the issue fully. can you please check it out.

============================================================
 PR #225 test report
============================================================
 baseline:  main  efbb895
 under test: pr225 0f0a7da

------------------------------------------------------------
TEST 1  the reported bug: which API does 'list routers version=' use?
------------------------------------------------------------
  Expected: listRouters          (the API's own version field, per issue #224)
  Baseline: listKubernetesSupportedVersions   (main, the bug)
  Actual:   listKubernetesSupportedVersions   (PR #225)
  Verdict:  FAIL

------------------------------------------------------------
TEST 2  does the PR change anything at all? (6886 arguments compared)
------------------------------------------------------------
  Expected: 1 changed row   (only the version argument)
  Actual:   0 changed rows
  Verdict:  FAIL

------------------------------------------------------------
TEST 3  the string the PR compares against "version"
------------------------------------------------------------
  Expected: version     (the literal the PR's == compares with)
  Actual:   version,    (from config/cache.go:198, built with a trailing comma)
  Verdict:  FAIL

------------------------------------------------------------
TEST 4  option list for 3 routers running 2 distinct versions
------------------------------------------------------------
  Expected: 2 options    (4.22.1.0, 4.21.0.0 — de-duplicated)
  Actual:   3 options
    4.22.1.0   (10.0.0.1)
    4.22.1.0   (10.0.0.2)
    4.21.0.0   (10.0.0.3)
  Verdict:  FAIL

============================================================
 SUMMARY: 4 of 4 tests FAIL
============================================================

I don't think this is blocking 6.6.0, I think we can fix it in 6.7.0, thoughts?

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.

Autocompletion for version parameter on different APIs always retrieves the registered CKS versions

2 participants