-
Notifications
You must be signed in to change notification settings - Fork 488
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
Prototype of auto-generated compatible components section in docs #4753
Conversation
19e4ddc
to
7cbf2ab
Compare
DataTypePyroscopeProfiles = DataType("Pyroscope Profiles") | ||
) | ||
|
||
type Metadata struct { |
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.
Happy to rename this
return inferMetadata(reg.Args, reg.Exports), nil | ||
} | ||
|
||
func inferMetadata(args component.Arguments, exports component.Exports) Metadata { |
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.
Support for more types can be added in this function, which is also easy to test and make sure we don't get unexpected relationships.
|
||
var fixTestsFlag = flag.Bool("fix-tests", false, "update the test files with the current generated content") | ||
|
||
func TestCompatibleComponentsSectionUpdated(t *testing.T) { |
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.
If someone forgets to update the docs, CI will fail. But updating them is also as easy as running go generate
for this file.
@@ -41,6 +41,38 @@ Name | Type | Description | |||
|
|||
`loki.echo` does not expose any component-specific debug information. | |||
|
|||
<!-- START GENERATED COMPATIBLE COMPONENTS --> |
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.
Here just for fun I put the section in a different place rather than at the end. The auto-updating will add the section at the end if it doesn't exist, but it can be moved around and tests will still detect it and update it in its existing location.
This PR has been automatically marked as stale because it has not had any activity in the past 30 days. The PR will not be closed automatically, but a label will be added to it for tracking purposes. |
7cbf2ab
to
51bfdae
Compare
cc @thampiotr closing this after we've moved ahead with #5791. Let me know if you think otherwise and we can open it again. |
PR Description
This is a prototype for the proposal #4754
Please see the proposal for detailed information.
Which issue(s) this PR fixes
PR Checklist