Skip to content

Migrate to integrations#964

Open
einarmo wants to merge 5 commits intomasterfrom
use-integrations-full
Open

Migrate to integrations#964
einarmo wants to merge 5 commits intomasterfrom
use-integrations-full

Conversation

@einarmo
Copy link
Copy Markdown
Contributor

@einarmo einarmo commented Mar 25, 2026

This is the full migration to integrations, swapping out the base extractor and cleaning up the now unused components that have been replaced by tasks.

The tests need to change because enabling history now introduces some requirements, due to the way the extractor is initialized. This means that we need to enable history before constructing the extractor. Which is what would usually happen, but not all tests do this correctly.

It may be possible to get this below 500 lines by front-loading some of the test changes, but I'm not sure. This is a very breaking change, and it's hard to get it lower.

This is the full migration to integrations, swapping out the base
extractor and cleaning up the now unused components that have been
replaced by tasks.

The tests need to change because enabling history now introduces some
requirements, due to the way the extractor is initialized. This means
that we need to enable history _before_ constructing the extractor.
Which is what would usually happen, but not all tests do this correctly.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 82.11009% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.13%. Comparing base (f00679e) to head (fc33de5).

Files with missing lines Patch % Lines
Extractor/UAExtractor.cs 86.84% 6 Missing and 14 partials ⚠️
ExtractorLauncher/ExtractorStarter.cs 57.14% 11 Missing and 1 partial ⚠️
Extractor/Config/FullConfig.cs 50.00% 0 Missing and 2 partials ⚠️
Extractor/Pushers/CDFPusher.cs 81.81% 2 Missing ⚠️
Extractor/RebrowseTriggerManager.cs 33.33% 2 Missing ⚠️
Extractor/UAClient.cs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #964      +/-   ##
==========================================
+ Coverage   80.05%   80.13%   +0.07%     
==========================================
  Files         130      128       -2     
  Lines       17015    16504     -511     
  Branches     2503     2432      -71     
==========================================
- Hits        13622    13225     -397     
+ Misses       2625     2551      -74     
+ Partials      768      728      -40     
Files with missing lines Coverage Δ
ConfigurationTool/Checks/History.cs 85.97% <100.00%> (+0.91%) ⬆️
Extractor/Config/CogniteConfig.cs 84.84% <ø> (ø)
Extractor/Streamer.cs 84.80% <100.00%> (ø)
Extractor/Tasks/BrowseTask.cs 94.16% <100.00%> (+17.89%) ⬆️
Extractor/Tasks/HistoryTask.cs 93.93% <100.00%> (+12.62%) ⬆️
ExtractorLauncher/Program.cs 84.44% <100.00%> (+0.17%) ⬆️
Extractor/UAClient.cs 78.55% <0.00%> (+0.17%) ⬆️
Extractor/Config/FullConfig.cs 95.23% <50.00%> (+3.93%) ⬆️
Extractor/Pushers/CDFPusher.cs 79.67% <81.81%> (+0.32%) ⬆️
Extractor/RebrowseTriggerManager.cs 90.08% <33.33%> (ø)
... and 2 more

... and 9 files with indirect coverage changes

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

@einarmo einarmo marked this pull request as ready for review March 25, 2026 09:38
@einarmo einarmo requested a review from a team as a code owner March 25, 2026 09:38
@einarmo
Copy link
Copy Markdown
Contributor Author

einarmo commented Mar 25, 2026

/gemini review

@gemini-code-assist
Copy link
Copy Markdown

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@einarmo
Copy link
Copy Markdown
Contributor Author

einarmo commented Mar 25, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the OPC-UA Extractor's internal task management by replacing the custom Looper and HistoryReader classes with a new ExtractorTaskScheduler and dedicated task implementations for browsing, pushing data, handling history, and managing subscriptions. The UAExtractor class has been updated to inherit from BaseExtractor<FullConfig> and now orchestrates these new tasks, streamlining the extractor's lifecycle and improving its robustness. Key changes include updating configuration handling, modifying how historical data and events are processed, and adapting various test cases to the new asynchronous task-based architecture. Review comments highlight the need for a try...finally block in ConfigurationTool/Checks/History.cs to ensure configuration consistency and address potential deadlocks in test disposal methods by recommending await DisposeAsync() instead of synchronous Wait() calls.

@Toshad Toshad added the waiting-for-risk-review Waiting for a member of the risk review team to take an action label Mar 26, 2026
@kornelione kornelione added risk-review-ongoing Risk review is in progress and removed waiting-for-risk-review Waiting for a member of the risk review team to take an action labels Mar 27, 2026
@kornelione kornelione self-assigned this Mar 27, 2026
Copy link
Copy Markdown
Contributor

@kornelione kornelione left a comment

Choose a reason for hiding this comment

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

🦄

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

Labels

risk-review-ongoing Risk review is in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants