Skip to content

[mdatagen] Undefined packages for generated logs tests #12907

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

Closed
rogercoll opened this issue Apr 22, 2025 · 2 comments
Closed

[mdatagen] Undefined packages for generated logs tests #12907

rogercoll opened this issue Apr 22, 2025 · 2 comments
Labels
bug Something isn't working cmd/mdatagen

Comments

@rogercoll
Copy link
Contributor

Component(s)

cmd/mdatagen

What happened?

Describe the bug
The testing generated files for logs do not include some used packages in the imports section:

Error: internal/metadata/generated_logs_test.go:43:47: undefined: time
Error: internal/metadata/generated_logs_test.go:48:9: undefined: plog
Error: internal/metadata/generated_logs_test.go:49:48: undefined: time (typecheck)

Version: v0.124.0

Steps to reproduce
Receiver that supports logs signal type + go generate ./... + go test

What did you expect to see?

No error

What did you see instead?

Undefined packages

Collector version

v0.124.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

Log output

Additional context

No response

@rogercoll rogercoll added the bug Something isn't working label Apr 22, 2025
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-merge-queue bot pushed a commit that referenced this issue Apr 22, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Adds the missing dependencies into the auto generated files.

<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes #
#12907

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->
@rogercoll
Copy link
Contributor Author

fixed with #12908

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cmd/mdatagen
Projects
None yet
Development

No branches or pull requests

1 participant