Skip to content

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 test validation to utilize centralized resource validation logic with enhanced configuration parameters.
  • Chores

    • Extended telemetry attributes to include service version information in resource validation.

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

Walkthrough

These changes refactor resource validation by consolidating a local checkResource function into a shared module and updating its signature to accept agent configuration. The shared function now validates an additional 'service.version' attribute derived from the agent's config.

Changes

Cohort / File(s) Summary
Test update for shared resource validation
test/agents/test-grpc-tracing.mjs
Removes local checkResource function, imports it from common module, and updates invocation to pass three arguments (resource, agentId, config). Retrieves agent config via new TestClient.config() method.
Shared resource validation enhancement
test/common/nsolid-grpc-agent/index.js
Extends checkResource to validate 'service.version' attribute, sourced from config.appVersion.

Possibly related issues

  • Fix flaky grpc agent otel tests #420: Addresses the shared checkResource consolidation by updating test invocations with the new three-argument signature and adding service.version validation in the shared module.

Poem

🐰 A rabbit hops through code so fine,
Sharing wisdom, test by test—
One checkResource, drawn in line,
With config whispers, manifest.
Version songs now softly rest,
In shared burrows, best and blessed! 🌿

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 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.

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.

1 participant