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

[chore] add metadata status checks on the distribution #21275

Merged
merged 3 commits into from
Jun 2, 2023

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented May 1, 2023

Add a test checking that the status metadata of a component matches their presence in the otelcontribcol test suite.

@atoulme
Copy link
Contributor Author

atoulme commented May 1, 2023

This fails because are detecting a number of components are not in the test suite when they should be.

@atoulme atoulme force-pushed the add_metadata_status_checks branch 2 times, most recently from 16e4e36 to 908962a Compare May 4, 2023 07:55
@atoulme atoulme force-pushed the add_metadata_status_checks branch 2 times, most recently from aea863b to 7a80573 Compare May 5, 2023 00:41
@mx-psi
Copy link
Member

mx-psi commented May 18, 2023

Definitely. I'll add those and keep rebasing this PR over time to keep us closer to the tests passing.

Maybe it's easier to have an allowlist for components where we will ignore the test failures and merge the PR now? That way we avoid introducing errors on components that are currently passing

@atoulme
Copy link
Contributor Author

atoulme commented May 18, 2023

It's really close, just need a tidy

@atoulme atoulme force-pushed the add_metadata_status_checks branch from 6ae39b5 to 5f15c40 Compare May 26, 2023 22:00
@dmitryax
Copy link
Member

Seems like it's still failing

@atoulme
Copy link
Contributor Author

atoulme commented May 26, 2023

More components have metadata, so this test now detects more components missing from otelcontribcol:

--- FAIL: TestComponentsArePresent (0.73s)
    --- FAIL: TestComponentsArePresent/../../cmd/mdatagen/metadata.yaml (0.00s)
        distribution_metadata_test.go:60: 
            	Error Trace:	/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/cmd/otelcontribcol/distribution_metadata_test.go:60
            	Error:      	Expected value not to be nil.
            	Test:       	TestComponentsArePresent/../../cmd/mdatagen/metadata.yaml
            	Messages:   	missing receiver: test
    --- FAIL: TestComponentsArePresent/../../extension/storage/dbstorage/metadata.yaml (0.00s)
        distribution_metadata_test.go:[56](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/5095304215/jobs/9160133239?pr=21275#step:8:57): 
            	Error Trace:	/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/cmd/otelcontribcol/distribution_metadata_test.go:56
            	Error:      	Expected value not to be nil.
            	Test:       	TestComponentsArePresent/../../extension/storage/dbstorage/metadata.yaml
            	Messages:   	missing extension: db_storage
    --- FAIL: TestComponentsArePresent/../../receiver/statsdreceiver/metadata.yaml (0.00s)
        distribution_metadata_test.go:[60](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/5095304215/jobs/9160133239?pr=21275#step:8:61): 
            	Error Trace:	/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/cmd/otelcontribcol/distribution_metadata_test.go:60
            	Error:      	Expected value not to be nil.
            	Test:       	TestComponentsArePresent/../../receiver/statsdreceiver/metadata.yaml
            	Messages:   	missing receiver: statsdreceiver

I'll add them.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Some conflicts to resolve

@atoulme atoulme force-pushed the add_metadata_status_checks branch from f224090 to df9feb4 Compare June 2, 2023 21:02
@dmitryax dmitryax merged commit 34d555c into open-telemetry:main Jun 2, 2023
@github-actions github-actions bot added this to the next release milestone Jun 2, 2023
@atoulme atoulme deleted the add_metadata_status_checks branch June 2, 2023 21:56
Caleb-Hurshman pushed a commit to observIQ/opentelemetry-collector-contrib that referenced this pull request Jul 6, 2023
…y#21275)

Add a test checking that the status metadata of a component matches their presence in the otelcontribcol test suite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/otelcontribcol otelcontribcol command
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants