Skip to content

[Fix-18776][DAO] Fix @Param name of K8sNamespaceMapper#queryByNamespaceCode - #18777

Merged
SbloodyS merged 1 commit into
apache:devfrom
andrehqh:Fix-18776
Nov 11, 2026
Merged

SbloodyS merged 1 commit into
apache:devfrom
andrehqh:Fix-18776

Conversation

@andrehqh

Copy link
Copy Markdown
Contributor

Was this PR generated or assisted by AI?

Yes. The parameter mismatch was discovered by a custom static MyBatis binding checker I built; AI assisted with independent cross-checking, and the fix and unit test were written and reviewed by the author.

Purpose of the pull request

Close #18776.

K8sNamespaceMapper#queryByNamespaceCode annotated its parameter with @Param("clusterCode"), while K8sNamespaceMapper.xml references #{namespaceCode}, causing calls to fail with BindingException: Parameter 'namespaceCode' not found.

Brief change log

  • Use @Param("namespaceCode") in K8sNamespaceMapper#queryByNamespaceCode so that it matches the XML statement.
  • Add K8sNamespaceMapperTest#testQueryByNamespaceCode.

Verify this pull request

This change added tests and can be verified as follows:

  • Added K8sNamespaceMapperTest#testQueryByNamespaceCode (verified by the unit test suite in CI).

Pull Request Notice

Pull Request Notice

If your pull request contains incompatible change, you should also add it to docs/docs/en/guide/upgrade/incompatible.md

…ceCode

- Use @PARAM("namespaceCode") to match #{namespaceCode} in K8sNamespaceMapper.xml
- Add K8sNamespaceMapperTest#testQueryByNamespaceCode
@boring-cyborg

boring-cyborg Bot commented Nov 10, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! Please check out our contributing guidelines. (https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)

@SbloodyS SbloodyS added the first time contributor First-time contributor label Nov 11, 2026
@SbloodyS SbloodyS added this to the 3.5.0 milestone Nov 11, 2026
@SbloodyS SbloodyS added the bug Something isn't working label Nov 11, 2026

@SbloodyS SbloodyS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@ruanwenjun ruanwenjun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@SbloodyS
SbloodyS merged commit 774c904 into apache:dev Nov 11, 2026
134 of 136 checks passed
@boring-cyborg

boring-cyborg Bot commented Nov 11, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working first time contributor First-time contributor test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [DAO] K8sNamespaceMapper#queryByNamespaceCode uses @Param("clusterCode") but its XML expects #{namespaceCode}

3 participants