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

Adapt to randomly generated nop component names in unit test #31640

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented Mar 7, 2024

Description:

This should fix failures in open-telemetry/opentelemetry-collector#9637

This unit test was relying on the ID from exportertest.NewNopCreateSettings always being the same. This change makes the test use the same create settings when storing the telemetry registry, and when creating the trace exporter to avoid that problem.

Link to tracking Issue:

Blocking open-telemetry/opentelemetry-collector#9637

@dashpole dashpole added Skip Changelog PRs that do not require a CHANGELOG.md entry exporter/awsxray labels Mar 7, 2024
@dashpole dashpole requested review from a team and dmitryax March 7, 2024 17:06
@github-actions github-actions bot requested review from srprash and wangzlei March 7, 2024 17:06
@dashpole
Copy link
Contributor Author

dashpole commented Mar 7, 2024

@Aneurysm9 @codeboten

@dashpole dashpole changed the title Adapt to randomly generated nop component names Adapt to randomly generated nop component names in unit test Mar 7, 2024
@dmitryax
Copy link
Member

dmitryax commented Mar 7, 2024

Merging to unblock open-telemetry/opentelemetry-collector#9637 given that there are no functional changes to the component

@dmitryax dmitryax merged commit 3853bb1 into open-telemetry:main Mar 7, 2024
147 of 149 checks passed
@github-actions github-actions bot added this to the next release milestone Mar 7, 2024
@dashpole dashpole deleted the adapt_contrib branch March 8, 2024 13:31
codeboten pushed a commit that referenced this pull request Mar 11, 2024
#31659)

Follow-up to
#31640

I didn't realize the contrib test stopped after the first failure, so
there were a few more failures for
open-telemetry/opentelemetry-collector#9637.

I verified that this passes the contrib-tests check for the core repo
locally, so this should be the rest of them.

For the splunkhec exporter, the exporter actually uses `ID.String()`:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/4c5b5e934484ae3084565abbd3746a98e7f27721/exporter/splunkhecexporter/client.go#L71

The filelog receiver was assuming that `NewNopCreateSettings` returned
the same ID, so I re-used the create settings in the test.

**Link to tracking Issue:**

Blocking
open-telemetry/opentelemetry-collector#9637

@dmitryax @Aneurysm9 @codeboten
DougManton pushed a commit to DougManton/opentelemetry-collector-contrib that referenced this pull request Mar 13, 2024
…lemetry#31640)

**Description:**

This should fix failures in
open-telemetry/opentelemetry-collector#9637

This unit test was relying on the ID from
`exportertest.NewNopCreateSettings` always being the same. This change
makes the test use the same create settings when storing the telemetry
registry, and when creating the trace exporter to avoid that problem.

**Link to tracking Issue:**

Blocking
open-telemetry/opentelemetry-collector#9637
DougManton pushed a commit to DougManton/opentelemetry-collector-contrib that referenced this pull request Mar 13, 2024
open-telemetry#31659)

Follow-up to
open-telemetry#31640

I didn't realize the contrib test stopped after the first failure, so
there were a few more failures for
open-telemetry/opentelemetry-collector#9637.

I verified that this passes the contrib-tests check for the core repo
locally, so this should be the rest of them.

For the splunkhec exporter, the exporter actually uses `ID.String()`:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/4c5b5e934484ae3084565abbd3746a98e7f27721/exporter/splunkhecexporter/client.go#L71

The filelog receiver was assuming that `NewNopCreateSettings` returned
the same ID, so I re-used the create settings in the test.

**Link to tracking Issue:**

Blocking
open-telemetry/opentelemetry-collector#9637

@dmitryax @Aneurysm9 @codeboten
XinRanZhAWS pushed a commit to XinRanZhAWS/opentelemetry-collector-contrib that referenced this pull request Mar 13, 2024
…lemetry#31640)

**Description:**

This should fix failures in
open-telemetry/opentelemetry-collector#9637

This unit test was relying on the ID from
`exportertest.NewNopCreateSettings` always being the same. This change
makes the test use the same create settings when storing the telemetry
registry, and when creating the trace exporter to avoid that problem.

**Link to tracking Issue:**

Blocking
open-telemetry/opentelemetry-collector#9637
XinRanZhAWS pushed a commit to XinRanZhAWS/opentelemetry-collector-contrib that referenced this pull request Mar 13, 2024
open-telemetry#31659)

Follow-up to
open-telemetry#31640

I didn't realize the contrib test stopped after the first failure, so
there were a few more failures for
open-telemetry/opentelemetry-collector#9637.

I verified that this passes the contrib-tests check for the core repo
locally, so this should be the rest of them.

For the splunkhec exporter, the exporter actually uses `ID.String()`:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/4c5b5e934484ae3084565abbd3746a98e7f27721/exporter/splunkhecexporter/client.go#L71

The filelog receiver was assuming that `NewNopCreateSettings` returned
the same ID, so I re-used the create settings in the test.

**Link to tracking Issue:**

Blocking
open-telemetry/opentelemetry-collector#9637

@dmitryax @Aneurysm9 @codeboten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter/awsxray Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants