Skip to content

Statically validate connector config during dry-run. #12712

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

sudiptob2
Copy link
Contributor

@sudiptob2 sudiptob2 commented Mar 24, 2025

Description

As described in #8721, the current validate command cannot capture improper connector usage errors during a dry run.

One proposed solution (as mentioned in this comment) is to surface configuration errors by instantiating the service during the dry run. However, reviewers preferred statically verifying the errors over instantiating the service (see the PR #12488 comments).

The validation logic for connectors is located in the service/internal/graph package. In the discussion of PR #12681, it was concluded that instantiating the graph is the better approach (see this comment).

Finally, this PR uses the graph.Build() method to surface configuration errors during the dry run.

Link to tracking issue

Fixes #8721 #12535

Testing

Documentation

@sudiptob2 sudiptob2 force-pushed the feat/config-validation-graph-ins branch from ee5e5cd to 92d543e Compare March 24, 2025 18:42
Copy link

codecov bot commented Mar 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.44%. Comparing base (c43ecad) to head (5884efd).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12712      +/-   ##
==========================================
+ Coverage   91.43%   91.44%   +0.01%     
==========================================
  Files         487      487              
  Lines       26811    26846      +35     
==========================================
+ Hits        24514    24549      +35     
  Misses       1814     1814              
  Partials      483      483              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sudiptob2 sudiptob2 marked this pull request as ready for review March 24, 2025 19:17
@sudiptob2 sudiptob2 requested a review from a team as a code owner March 24, 2025 19:17
@sudiptob2 sudiptob2 requested a review from jmacd March 24, 2025 19:17
@sudiptob2
Copy link
Contributor Author

cc: @djaglowski @mx-psi

Copy link
Contributor

github-actions bot commented Apr 8, 2025

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Apr 8, 2025
@sudiptob2 sudiptob2 force-pushed the feat/config-validation-graph-ins branch from 92d543e to 5884efd Compare April 8, 2025 12:47
@sudiptob2 sudiptob2 requested a review from dmathieu April 8, 2025 13:25
@github-actions github-actions bot removed the Stale label Apr 9, 2025
@mx-psi mx-psi requested a review from djaglowski April 9, 2025 09:33
@mx-psi mx-psi added this pull request to the merge queue Apr 9, 2025
Merged via the queue into open-telemetry:main with commit 6b9d125 Apr 9, 2025
57 checks passed
@sudiptob2 sudiptob2 deleted the feat/config-validation-graph-ins branch April 9, 2025 17:06
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.

Validate Connector Usage
4 participants