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

[Heartbeat] Trigger Synthetics E2E tests on heartbeat code changes #23346

Closed
andrewvc opened this issue Jan 4, 2021 · 2 comments
Closed

[Heartbeat] Trigger Synthetics E2E tests on heartbeat code changes #23346

andrewvc opened this issue Jan 4, 2021 · 2 comments
Assignees
Labels
Heartbeat Team:Automation Label for the Observability productivity team

Comments

@andrewvc
Copy link
Contributor

andrewvc commented Jan 4, 2021

Ideally we would trigger the synthetics E2E tests on heartbeat code changes. Is this possible? If so, what would need to be done? CC @KseniaElastic @kuisathaverat

This came up in: https://github.com/elastic/beats/compare/master...andrewvc:copy-synthetics-volumes?expand=1

@andrewvc andrewvc added Heartbeat Team:Automation Label for the Observability productivity team labels Jan 4, 2021
@kuisathaverat
Copy link
Contributor

I think we need to backport the changes in elastic/synthetics#148 to the package pipeline, and after generate a Docker image for synthetics https://github.com/elastic/synthetics/blob/master/__tests__/e2e/docker-compose.yml#L43 run those test.

@kuisathaverat kuisathaverat self-assigned this Jan 5, 2021
andrewvc added a commit that referenced this issue Feb 17, 2021
* Refactors the config for synthetics suites to act as regular monitors under `heartbeat.monitors` rather than have the new top-level `synthetic.suites` syntax we've been using so far. 
* Changes the behavior of local suites to copy their data into the container rather than run directly off the shared docker volume
* Adds a first-class notion of aliasing to monitor types, so that `synthetics/http` monitors show up as `http`, and not as a distinct type (applies to all monitor types)
* Simplifies the types associated with monitor plugins into a new `plugin.Plugin{}` struct, rather than passing around multiple values everywhere.
* See https://github.com/elastic/beats/pull/23467/files#diff-7f1e5387c4757cca1e98483a5678e377a28ca5f9d77b267a4121a14249c96b82R7 for an example of the new config syntax

#### More on the change to copying local tests into the container

The rationale here is that doing so resolves any file permissions issues that may be present due to the suite directory being shared to the container as read only OR due to incompatible UIDs between the docker container and the host.

Fixes elastic/synthetics#156
Fixes #23823

As a note, no tests are added here due to the complexity of testing this small amount of I/O functionality, however, any issues should be caught by our E2E tests in https://github.com/elastic/synthetics/tree/master/__tests__/e2e . I've opened an issue to improve this situation here: #23346
andrewvc added a commit to andrewvc/beats that referenced this issue Feb 17, 2021
* Refactors the config for synthetics suites to act as regular monitors under `heartbeat.monitors` rather than have the new top-level `synthetic.suites` syntax we've been using so far.
* Changes the behavior of local suites to copy their data into the container rather than run directly off the shared docker volume
* Adds a first-class notion of aliasing to monitor types, so that `synthetics/http` monitors show up as `http`, and not as a distinct type (applies to all monitor types)
* Simplifies the types associated with monitor plugins into a new `plugin.Plugin{}` struct, rather than passing around multiple values everywhere.
* See https://github.com/elastic/beats/pull/23467/files#diff-7f1e5387c4757cca1e98483a5678e377a28ca5f9d77b267a4121a14249c96b82R7 for an example of the new config syntax

#### More on the change to copying local tests into the container

The rationale here is that doing so resolves any file permissions issues that may be present due to the suite directory being shared to the container as read only OR due to incompatible UIDs between the docker container and the host.

Fixes elastic/synthetics#156
Fixes elastic#23823

As a note, no tests are added here due to the complexity of testing this small amount of I/O functionality, however, any issues should be caught by our E2E tests in https://github.com/elastic/synthetics/tree/master/__tests__/e2e . I've opened an issue to improve this situation here: elastic#23346

(cherry picked from commit fb25ded)
andrewvc added a commit that referenced this issue Feb 17, 2021
* Refactors the config for synthetics suites to act as regular monitors under `heartbeat.monitors` rather than have the new top-level `synthetic.suites` syntax we've been using so far.
* Changes the behavior of local suites to copy their data into the container rather than run directly off the shared docker volume
* Adds a first-class notion of aliasing to monitor types, so that `synthetics/http` monitors show up as `http`, and not as a distinct type (applies to all monitor types)
* Simplifies the types associated with monitor plugins into a new `plugin.Plugin{}` struct, rather than passing around multiple values everywhere.
* See https://github.com/elastic/beats/pull/23467/files#diff-7f1e5387c4757cca1e98483a5678e377a28ca5f9d77b267a4121a14249c96b82R7 for an example of the new config syntax

#### More on the change to copying local tests into the container

The rationale here is that doing so resolves any file permissions issues that may be present due to the suite directory being shared to the container as read only OR due to incompatible UIDs between the docker container and the host.

Fixes elastic/synthetics#156
Fixes #23823

As a note, no tests are added here due to the complexity of testing this small amount of I/O functionality, however, any issues should be caught by our E2E tests in https://github.com/elastic/synthetics/tree/master/__tests__/e2e . I've opened an issue to improve this situation here: #23346

(cherry picked from commit fb25ded)
@jlind23
Copy link
Collaborator

jlind23 commented Apr 5, 2022

Backlog grooming: Closing it for now until further activity.

@jlind23 jlind23 closed this as completed Apr 5, 2022
@zube zube bot added [zube]: Done and removed [zube]: Ready labels Apr 5, 2022
@zube zube bot removed the [zube]: Done label Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Heartbeat Team:Automation Label for the Observability productivity team
Projects
None yet
Development

No branches or pull requests

3 participants