Skip to content
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

Add scraper component type support to mdatagen #12092

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bogdandrutu
Copy link
Member

@bogdandrutu bogdandrutu commented Jan 15, 2025

Updates #11238

@bogdandrutu bogdandrutu requested a review from a team as a code owner January 15, 2025 05:25
@bogdandrutu bogdandrutu requested a review from mx-psi January 15, 2025 05:25
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 90.10309% with 48 lines in your changes missing coverage. Please review.

Project coverage is 91.57%. Comparing base (b9d4e39) to head (1b674b2).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...mplescraper/internal/metadata/generated_metrics.go 91.83% 27 Missing and 2 partials ⚠️
...amplescraper/internal/metadata/generated_config.go 82.85% 8 Missing and 4 partials ⚠️
...plescraper/internal/metadata/generated_resource.go 91.11% 4 Missing ⚠️
cmd/mdatagen/internal/samplescraper/factory.go 62.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12092      +/-   ##
==========================================
- Coverage   91.60%   91.57%   -0.04%     
==========================================
  Files         456      460       +4     
  Lines       24091    24574     +483     
==========================================
+ Hits        22069    22504     +435     
- Misses       1649     1690      +41     
- Partials      373      380       +7     

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

@@ -325,6 +330,75 @@ func TestComponentLifecycle(t *testing.T) {
}
{{ end }}

{{ if isScraper }}
Copy link
Member

@dmitryax dmitryax Jan 15, 2025

Choose a reason for hiding this comment

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

Why not reuse the block above? They are almost identical

Copy link
Member Author

Choose a reason for hiding this comment

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

There are 70 lines, and counted that at least 15 are different. Also, we do the same for all other components.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will start an effort to remove duplicate code soon across these files.

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