Skip to content

test: align instance dashboard assertions with IP label contract - #1642

Merged
robocanic merged 2 commits into
apache:developfrom
AsperforMias:fix-obs-metric-dashboard-var
Nov 14, 2026
Merged

robocanic merged 2 commits into
apache:developfrom
AsperforMias:fix-obs-metric-dashboard-var

Conversation

@AsperforMias

Copy link
Copy Markdown
Contributor

Please provide a description of this PR:

Update the instance dashboard handler test to match the existing IP-label contract.

The service, Grafana dashboards, and documentation use the instance IP as var-instance. The handler test still expects IP:QoSPort for metrics, causing the unit-test workflow to fail on develop. Adding that port back to production would not match the dashboards' ip label queries.

Assert the bare instance IP for metric, trace, and log dashboards. Cover IPv4 and IPv6 with both configured and missing QoS ports. Production behavior is unchanged.

Validation:

  • The original handler test fails before this change and passes afterward.
  • make test and go vet ./... pass.
  • Targeted race tests and lint for new changes pass.

This does not change metrics scraping or resolve the separate exporter-port issue.

To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

  • Docs
  • Installation
  • User Experience
  • Dubboctl
  • Console
  • Core Component

Please check any characteristics that apply to this pull request.

@sonarqubecloud

Copy link
Copy Markdown

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

I checked the handler assertions against the dashboard URL builders on the PR base: metric, trace, and log use the instance IP for var-instance. The IPv4 case with a configured QoS port catches accidental port appending; the new IPv6 case checks the decoded query value when the port is absent. The failing metric assertion visible on the sibling PRs passes here, and both Go CI jobs completed successfully. I found no blocking issue in this test change. The metrics-list exporter endpoint in #1637 is a separate production path.

@AsperforMias

Copy link
Copy Markdown
Contributor Author

生产和grafana现在都是裸ip查询了,单测这边还是ip+qos 端口,正常代码也无法通过集测(1638和1639)

@robocanic
robocanic merged commit 65bce33 into apache:develop Nov 14, 2026
7 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