Skip to content

test: fix failing grpc agent otel tests#421

Merged
santigimeno merged 1 commit intonode-v24.x-nsolid-v6.xfrom
santi/fix_grpc_resource_tests
Feb 17, 2026
Merged

test: fix failing grpc agent otel tests#421
santigimeno merged 1 commit intonode-v24.x-nsolid-v6.xfrom
santi/fix_grpc_resource_tests

Conversation

@santigimeno
Copy link
Member

@santigimeno santigimeno commented Feb 5, 2026

Make sure we take service.version into account once the fix for appVersion was introduced.
Make sure we use the common checkResource() function in the tracing test too.

Summary by CodeRabbit

  • Tests

    • Refactored tests to use centralized resource validation that now accepts agent identifier and configuration.
  • Chores

    • Extended telemetry/resource attributes to include service.version (mapped from application version).

@santigimeno santigimeno requested a review from RafaelGSS February 5, 2026 15:16
@santigimeno santigimeno self-assigned this Feb 5, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

Refactors tests to use a shared checkResource(resource, agentId, config) from test/common/nsolid-grpc-agent, retrieves agent config via TestClient.config(), and updates the shared validator to expect service.version derived from config.appVersion.

Changes

Cohort / File(s) Summary
Test update for shared resource validation
test/agents/test-grpc-tracing.mjs
Imports checkResource from test/common/nsolid-grpc-agent, removes local checkResource, calls checkResource(resource, agentId, config) throughout, and obtains config via TestClient.config().
Shared resource validation enhancement
test/common/nsolid-grpc-agent/index.js
checkResource now includes service.version in expected attributes, mapped from config.appVersion.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • RafaelGSS

Poem

🐇 I hopped through tests and shared my tune,
One check to find each resource's sign —
Agent id, config, version soon,
All bundled neat in one small line.
Carrots coded, trails align.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test: fix failing grpc agent otel tests' clearly identifies the main change: fixing failing gRPC agent OpenTelemetry tests, which directly aligns with the PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch santi/fix_grpc_resource_tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Make sure we take `service.version` into account once the fix for
`appVersion` was introduced.
Make sure we use the common `checkResource()` function in the tracing
test too.

PR-URL: #421
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
@santigimeno santigimeno force-pushed the santi/fix_grpc_resource_tests branch from 73cff3b to edcd346 Compare February 17, 2026 20:55
@santigimeno santigimeno merged commit edcd346 into node-v24.x-nsolid-v6.x Feb 17, 2026
13 of 17 checks passed
santigimeno added a commit that referenced this pull request Feb 25, 2026
Make sure we take `service.version` into account once the fix for
`appVersion` was introduced.
Make sure we use the common `checkResource()` function in the tracing
test too.

PR-URL: #421
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
santigimeno added a commit that referenced this pull request Feb 25, 2026
Make sure we take `service.version` into account once the fix for
`appVersion` was introduced.
Make sure we use the common `checkResource()` function in the tracing
test too.

PR-URL: #421
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.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.

2 participants