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

Prototype of auto-generated compatible components section in docs #4753

Closed
wants to merge 7 commits into from

Conversation

thampiotr
Copy link
Contributor

@thampiotr thampiotr commented Aug 8, 2023

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

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

DataTypePyroscopeProfiles = DataType("Pyroscope Profiles")
)

type Metadata struct {
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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 -->
Copy link
Contributor Author

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.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

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.
If you do not have enough time to follow up on this PR or you think it's no longer relevant, consider closing it.
Thank you for your contributions!

@github-actions github-actions bot added the stale Issue/PR mark as stale due lack of activity label Sep 8, 2023
@marctc marctc added needs-attention An issue or PR has been sitting around and needs attention. and removed stale Issue/PR mark as stale due lack of activity labels Nov 1, 2023
@thampiotr thampiotr force-pushed the thampiotr/prototype-component-x-links branch from 7cbf2ab to 51bfdae Compare November 15, 2023 16:00
@tpaschalis
Copy link
Member

cc @thampiotr closing this after we've moved ahead with #5791. Let me know if you think otherwise and we can open it again.

@tpaschalis tpaschalis closed this Dec 8, 2023
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Feb 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. needs-attention An issue or PR has been sitting around and needs attention.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants