-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Make DataType a separate type within Component #10222
Closed
Closed
Changes from 24 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
1329377
make a new id type with datatype and use it
ankitpatel96 4a0e0fa
PipelineID
ankitpatel96 d782e7d
prune methods
ankitpatel96 aa519a7
methods
ankitpatel96 1904b6d
remove unecessary constructor
ankitpatel96 f80c5ec
delete comment
ankitpatel96 91bf4f0
mass replace id constructors
ankitpatel96 e5c7f5d
switch tests to pipelineid
ankitpatel96 e401781
change datagen
ankitpatel96 ab1811d
cleanup changes
ankitpatel96 73bbec2
fix rebase
ankitpatel96 c9180b7
private method
ankitpatel96 42dae7d
move pipeline id to new file
ankitpatel96 eaa4e20
test coverage
ankitpatel96 cb9e83b
copyright
ankitpatel96 d7422bd
porto
ankitpatel96 66d375f
lint
ankitpatel96 631568c
chlog
ankitpatel96 77778a9
unit test
ankitpatel96 4b548a7
Merge branch 'main' into datatype-newid
ankitpatel96 149cb87
fix
ankitpatel96 5aa24ba
more merge fixups
ankitpatel96 5b96c29
move instanceid
ankitpatel96 304d0b0
go.mod tidy
ankitpatel96 6a94f32
separator is public
ankitpatel96 b86c1e4
datatype unmarshal
ankitpatel96 777bb20
new module
ankitpatel96 a43fa35
go mod updates
ankitpatel96 929f67a
rename pipeline id
ankitpatel96 2c1a00b
instance id move
ankitpatel96 4aec05c
instanceid go mod
ankitpatel96 dac83e3
crosslink
ankitpatel96 a302ca1
trim tags
ankitpatel96 3676ca0
rename some methods
ankitpatel96 22b2539
chloggen
ankitpatel96 1475a25
quote the bad datatype
ankitpatel96 534db04
update component tests
ankitpatel96 3d82883
add to changelog
ankitpatel96 c1252e4
license
ankitpatel96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: enhancement | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) | ||
component: component | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: "Changes DataType to be an enum of Otel signals. Creates a new struct PipelineID - made up of a DataType and an optional string name. This PipelineID replaces the previous use of component.ID to identify Pipelines." | ||
|
||
# One or more tracking issues or pull requests related to the change | ||
issues: [9429] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: "" | ||
|
||
# Optional: The change log or logs in which this entry should be included. | ||
# e.g. '[user]' or '[user, api]' | ||
# Include 'user' if the change is relevant to end users. | ||
# Include 'api' if there is a change to a library API. | ||
# Default: '[user]' | ||
change_logs: ['api'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I? That would make component dependent on pipelines... which is most definitely circular
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use an internal module and make this and the actual type aliases of a symbol in that internal module until we remove it from
component
:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is going to work -
Pipeline depends on internal, which depends on pipeline since InstanceID depends on pipeline.ID
If I move pipeline.ID into this internal package, we solve that problem but then the component.InstanceID shim doesn't work - that means component imports internal and then internal imports component (InstanceID contains component.ID and component.Kind).
Open to any ideas to fixing this..
Side note - this internal package has to be collector/internal/ since it needs to be accessible by collector/component and collector/pipeline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A solution here would be to also move
component.ID
andcomponent.Kind
to internal and make shims also for these two oncomponent
. It sounds like a pain, so let's first discuss the rest of the PRThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right that would probably work... but I do question whether its worth it for stability concerns. Moving component.ID to internal/ would make component dependent on the root collector module, thus adding that dependency to almost every other module.
I don't think the blast radius of this change is especially large for contrib and I think, in this case, it makes sense to keep this change as is and not try to provide backwards compatible import shims.