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

Add integration tests between the Beats shipper client and the shipper server #33205

Closed
1 of 2 tasks
Tracked by #16
rdner opened this issue May 12, 2022 · 13 comments
Closed
1 of 2 tasks
Tracked by #16
Labels
Stalled Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@rdner
Copy link
Member

rdner commented May 12, 2022

The purpose of this test is to verify that the current version of the shipper client is able to successfully publish events to the shipper server. We could take the following steps:

  1. We run filebeat and the shipper server as binaries or containers, no code dependencies
  2. We pre-define configuration that would allow:
    2.1. filebeat to read a file that has N events
    2.2. filebeat to alter the consumed events from the file (simple processing, like adding a field)
    2.3. filebeat to publish events from the file to the shipper server
    2.4. the shipper server to output these events to a file
  3. We pre-define an input file and an expected output file according to the configured alternation rules. The alternation is needed to make the difference more obvious and mark that events passed the pipeline
  4. We run the pipeline until the shipper server has written N events to the file or time is up (perhaps watch logs in debug more or use wc -l on the output file.

Dependencies:

@rdner rdner added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label May 12, 2022
@rdner
Copy link
Member Author

rdner commented May 12, 2022

@cmacknz feel free to add your thoughts on this.

@cmacknz
Copy link
Member

cmacknz commented May 12, 2022

Looks good to me, having this test (and the more advanced tests) will be really valuable. Thanks!

@cmacknz
Copy link
Member

cmacknz commented Jun 20, 2022

Related, elastic/elastic-agent-shipper#60 to write the first basic test that communicates with the shipper binary. Could also be done as part of this issue depending on progress and the order things happen in.

@cmacknz
Copy link
Member

cmacknz commented Jun 20, 2022

Actually, looks like this covers elastic/elastic-agent-shipper#60 already. Closing that one as a duplicate.

@cmacknz
Copy link
Member

cmacknz commented Jun 20, 2022

Switching assignee to @faec like elastic/elastic-agent-shipper#60 was to start.

@cmacknz
Copy link
Member

cmacknz commented Jun 20, 2022

Re-reading this issue it is written to test filebeat (or any beat really) communicating with the shipper. We should do this but we can start with something simpler like elastic/elastic-agent-shipper#60 which just starts the shipper in isolation.

@cmacknz cmacknz changed the title Add integration tests for the gRPC server Add integration tests for the gRPC server and the beat shipper client Jun 21, 2022
@cmacknz
Copy link
Member

cmacknz commented Jun 21, 2022

Let's write one simple test first as described in elastic/elastic-agent-shipper#60 that doesn't require using the beat shipper client for simplicity, and then follow up with this more complex set of tests.

Both tests are now requirements of elastic/elastic-agent-shipper#34 which Denis owns.

@cmacknz
Copy link
Member

cmacknz commented Jul 12, 2022

We can have the shipper publish a Docker image as part of it's CI process and just consume that in the beats build as we do for the other outputs we test against.

Here's a relatively simple Jenkinsfile demonstrating how to publish a Docker image as an example: https://github.com/elastic/stream/blob/439bc8b880175812ed5441be8237419fba29d877/.ci/Jenkinsfile#L112

@rdner rdner assigned leehinman and unassigned rdner Sep 6, 2022
@jlind23 jlind23 assigned cmacknz and unassigned leehinman Sep 27, 2022
@cmacknz cmacknz changed the title Add integration tests for the gRPC server and the beat shipper client Add integration tests between the Beats shipper client and the shipper Sep 27, 2022
@cmacknz cmacknz removed their assignment Sep 27, 2022
@cmacknz cmacknz changed the title Add integration tests between the Beats shipper client and the shipper Add integration tests between the Beats shipper client and the shipper server Sep 27, 2022
@cmacknz cmacknz transferred this issue from elastic/elastic-agent-shipper Sep 27, 2022
@jlind23
Copy link
Collaborator

jlind23 commented Oct 10, 2022

@leehinman Is there any overlap with your actual work there: elastic/elastic-agent-shipper#60
cc @pierrehilbert @cmacknz

@cmacknz
Copy link
Member

cmacknz commented Oct 11, 2022

elastic/elastic-agent-shipper#60 is a test of the shipper process in the shipper repository.

This issue is a test of the Beats shipper client in the Beats repository.

They will need to be two separate implementations.

@cmacknz
Copy link
Member

cmacknz commented Nov 4, 2022

It may make sense to wait for the completion of elastic/elastic-agent-shipper#161 before implementing this, as the shipper configuration format is going to change significantly when that issue is completed.

If we can completely encapsulate the shipper configuration in a docker container, then we don't necessarily need to wait for elastic/elastic-agent-shipper#161 as we can just update the container we publish as part of that work.

@botelastic
Copy link

botelastic bot commented Apr 20, 2024

Hi!
We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Apr 20, 2024
@pierrehilbert
Copy link
Collaborator

Closing this one as no more necessary with the strategy change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stalled Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

No branches or pull requests

7 participants