-
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
Use elastic-package for APM package development #4973
Comments
@ycombinator thanks for opening! I'd appreciate your thoughts on the below.
This was done in #4953, I think we're good here. system tests: We have a couple of Fleet-integration system tests in https://github.com/elastic/apm-server/blob/master/systemtest/fleet_test.go, and we'll add more over time as the server and package evolves. These tests are part of our existing system test framework, which covers both the Fleet and non-Fleet modes of running APM Server. The Fleet-integration system tests involve:
So I think we're covered for system tests. The one thing we don't do with the integration yet is cross check indexed documents with field mappings. We do have unit tests around this, and have #4408 open to reimplement this as a functional test. I've added a note to that to look into using the static tests. pipeline tests: I'm not keen on adding separate pipeline tests, preferring to focus on the feature being tested which will indirectly exercise the ingest pipeline. The fact that a feature is implemented in the ingest pipeline vs. in APM Server code is not relevant to users. asset tests: I don't understand what these tests are doing. The docs say:
If the package is known to be valid and you don't specify any expectations, what do the asset tests check? Shouldn't we be covered by running static tests: We have some sample events in our docs, but they're not using the |
Re. docs generation: the APM package lists all its fields with a flag indicating whether that field is ECS or not (we do the same in the main docs, see eg. https://www.elastic.co/guide/en/apm/server/7.11/exported-fields-apm-transaction.html) @ycombinator @ruflin I imagine that for other integrations most fields are ECS so not sure what value is for others, but would you like to have such ECS flag for all the packages? |
Sure, no problem. I tend to think of the pipelines tests as unit tests in that they test a smaller unit of the overall feature, but having the pipelines exercised by the broader system tests is cool if that works for you!
These tests try to install the package using Fleet APIs and then ensure that all Elastic Stack assets defined by the package (e.g. Kibana visualizations, Kibana dashboards, Elasticsearch ingest pipelines, Elasticsearch ILM policies, etc.) are loaded up into the Stack as expected.
Not quite. |
Thanks for mentioning this. This is neat, IMO, especially since it links over to the ECS field reference!
Actually it's a mix. For metrics data streams the fields tend not to be mostly ECS but for log data streams the fields do tend to be mostly ECS. I'll defer to @ruflin as to whether we want to flag fields in documentation as being ECS or not when it comes to all packages. |
I wasn't aware of the ECS flag but I think that is a pretty neat thing to also advertise ECS. Currently it seems to link to ECS general doc page, would be even nicer to link to the field itself (wishlist). |
I've created elastic/elastic-package#293 for bringing the ECS field flagging feature to all packages in general. |
I believe we should figure out first a place for common fields in general, right? |
We have been using |
Looking through https://github.com/elastic/apm-server/tree/master/apmpackage, I think many of the steps in the Developer Documentation for the
apm
package could be updated to use relevantelastic-package
commands.Similarly, the CI configuration for this repository could also run certain
elastic-package
commands on theapm
package. Here are relevant steps from the CI configuration for the https://github.com/elastic/integrations repository that might be useful to incorporate into this repository's CI configuration:The text was updated successfully, but these errors were encountered: