Cherry-pick #23467 to 7.x: [Heartbeat] Refactor config system#24087
Merged
andrewvc merged 1 commit intoelastic:7.xfrom Feb 17, 2021
Merged
Cherry-pick #23467 to 7.x: [Heartbeat] Refactor config system#24087andrewvc merged 1 commit intoelastic:7.xfrom
andrewvc merged 1 commit intoelastic:7.xfrom
Conversation
* 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)
Contributor
|
Pinging @elastic/uptime (Team:Uptime) |
Contributor
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
adriansr
approved these changes
Feb 17, 2021
adriansr
reviewed
Feb 17, 2021
| - Rename `s3` input to `aws-s3` input. {pull}23469[23469] | ||
|
|
||
| *Heartbeat* | ||
| - Adds negative body match. {pull}20728[20728] |
Contributor
There was a problem hiding this comment.
Was this a mistake also introduced in master, or done in purpose?
Contributor
Author
There was a problem hiding this comment.
Will fix in a follow-up PR, good catch!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of PR #23467 to 7.x branch. Original message:
This PR:
heartbeat.monitorsrather than have the new top-levelsynthetic.suitessyntax we've been using so far.synthetics/httpmonitors show up ashttp, and not as a distinct type (applies to all monitor types)plugin.Plugin{}struct, rather than passing around multiple values everywhere.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
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Author's Checklist
How to test this PR locally
Related issues
Takes over from #23347
Fixes elastic/synthetics#156
Fixes elastic/uptime#271
Use cases
Screenshots
Logs