Skip to content

Move metrics config to base extractor config#484

Merged
Hmnt39 merged 4 commits intomasterfrom
hemant/metrics_config_fixes
Oct 13, 2025
Merged

Move metrics config to base extractor config#484
Hmnt39 merged 4 commits intomasterfrom
hemant/metrics_config_fixes

Conversation

@Hmnt39
Copy link
Copy Markdown
Contributor

@Hmnt39 Hmnt39 commented Sep 30, 2025

This PR moves the MetricsConfig to base ExtractorConfig instead of FullConfig (generated by Runtime).

@Hmnt39 Hmnt39 requested a review from a team as a code owner September 30, 2025 12:52
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.63%. Comparing base (d01ca0a) to head (e38960c).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #484      +/-   ##
==========================================
+ Coverage   80.59%   80.63%   +0.04%     
==========================================
  Files          43       43              
  Lines        4194     4194              
==========================================
+ Hits         3380     3382       +2     
+ Misses        814      812       -2     
Files with missing lines Coverage Δ
...te/extractorutils/unstable/configuration/models.py 83.76% <100.00%> (+0.04%) ⬆️
cognite/extractorutils/unstable/core/base.py 78.97% <100.00%> (-0.10%) ⬇️

... and 1 file with indirect coverage changes

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

toondaey
toondaey previously approved these changes Oct 3, 2025
@Hmnt39 Hmnt39 added the waiting-for-risk-review Waiting for a member of the risk review team to take an action label Oct 3, 2025
@polomani polomani added risk-review-ongoing Risk review is in progress waiting-for-team Waiting for the submitter or reviewer of the PR to take an action and removed waiting-for-risk-review Waiting for a member of the risk review team to take an action labels Oct 6, 2025
@polomani polomani self-assigned this Oct 6, 2025
@polomani
Copy link
Copy Markdown

polomani commented Oct 6, 2025

/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 successfully refactors the configuration by moving MetricsConfig into the base ExtractorConfig. The changes in the core logic and model definitions are clear and well-implemented. However, I have some concerns about the modifications made to the test files. In several places, assertions checking the exact number of errors have been removed. While this might be intended to reduce test flakiness, it makes the tests less robust by potentially hiding other issues and can lead to uninformative IndexError failures if no errors are returned. I've added specific comments with suggestions for more resilient test assertions.

@polomani
Copy link
Copy Markdown

polomani commented Oct 6, 2025

given the gemini comments, I tend to aggree, you should at least check that the length > 0

@Hmnt39 Hmnt39 requested a review from polomani October 10, 2025 05:58
@polomani
Copy link
Copy Markdown

/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 configuration structure by moving MetricsConfig into the base ExtractorConfig. This is a sound architectural improvement that makes the configuration more logical and cohesive. The changes are applied consistently throughout the codebase, including necessary updates to the Extractor class and its corresponding tests. The implementation is correct and I did not find any issues.

@polomani
Copy link
Copy Markdown

🦄

@polomani
Copy link
Copy Markdown

polomani commented Oct 13, 2025

@Hmnt39 remember about the PR labels

@Hmnt39 Hmnt39 merged commit 6e8a485 into master Oct 13, 2025
6 checks passed
@Hmnt39 Hmnt39 deleted the hemant/metrics_config_fixes branch October 13, 2025 08:06
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 waiting-for-team Waiting for the submitter or reviewer of the PR to take an action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants