-
Notifications
You must be signed in to change notification settings - Fork 529
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
Ensure integration package validity using elastic-package tool #4953
Conversation
Add Make targets: - make check-package - make format-package (run by `make gen-package`) - make build-package (run by `make gen-package`) Some minor formatting was needed, as well as adding a link to the changelog entry. Later we should consider getting rid of our custom README.template rendering, and rely on `elastic-package build` to render a template located at `_dev/build/docs/README.template`, like in integrations.
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
FYI, the main difference is that we render an additional column with ✅ / ❌ for ECS fields. The ECS version comes from https://github.com/elastic/apm-server/blob/master/go.mod#L17. |
@@ -20,23 +20,23 @@ package main | |||
import "path/filepath" | |||
|
|||
func docsTemplateFilePath(version string) string { | |||
return filepath.Join("apmpackage/apm/", version, "/_dev/docs/README.template.md") |
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.
Hmmm... I thought that _dev
was a convention for things that don't actually belong to the published package.
Probably too far fetched, but I worry a bit about this change. Imagine eg. that instead of using README.md
Kibana starts reading all *.md
files and show only the first one, or concats them, etc.
Understood. I started looking at changing it over, but stopped when I realised there was that difference. I think if it's important to us it'll be important to others too -- so let's add it to the elastic-package tool. Maybe just as an option to start with.
We could move the template somewhere outside of the apmpackage/version tree, so that can't possibly happen. If we can switch over to using elastic-package's doc generation then it's moot anyhow. |
I recall that comes from an specific to APM, that's why only we have it. But that makes sense, yes :+1 |
In the beginning it was like that, but then occurred to me that that external folder would have to be versioned too, so instead of having 2 folders with the same versioning structure I though it was simpler to put it inside a |
Yes, that's where it's specified: https://github.com/elastic/package-spec/blob/master/versions/1/_dev/spec.yml |
…ic#4953) * Use elastic-package Add Make targets: - make check-package - make format-package (run by `make gen-package`) - make build-package (run by `make gen-package`) Some minor formatting was needed, as well as adding a link to the changelog entry. Later we should consider getting rid of our custom README.template rendering, and rely on `elastic-package build` to render a template located at `_dev/build/docs/README.template`, like in integrations. # Conflicts: # NOTICE.txt # go.sum
…4953) (#5017) * Ensure integration package validity using elastic-package tool (#4953) * Use elastic-package Add Make targets: - make check-package - make format-package (run by `make gen-package`) - make build-package (run by `make gen-package`) Some minor formatting was needed, as well as adding a link to the changelog entry. Later we should consider getting rid of our custom README.template rendering, and rely on `elastic-package build` to render a template located at `_dev/build/docs/README.template`, like in integrations. # Conflicts: # NOTICE.txt # go.sum * Update go.sum
Motivation/summary
Ensure the integration package is valid by running
elastic-package check
as part ofmake check
.Add Make targets:
make gen-package
)make gen-package
)Some minor formatting was needed, as well as adding a link to the changelog entry.
Later we should consider getting rid of our custom README.template rendering, and rely on
elastic-package build
to render a template located at_dev/build/docs/README.template
, like in integrations.How to test these changes
Mess up the formatting of the package, and run
make check-package
. It should fail and tell you the package is not formatted correctly.Related issues
Closes #4930