-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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] Add synthetics deps to main heartbeat docker image #22837
Comments
|
@alvarolobato that's a great point, it's something we've discussed but I forgot to add to this ticket. What we've discussed as a solution to this is adding a feature to heartbeat to keep the synthetics library updated. So, the container wouldn't change, but the node package would be periodically attempting an upgrade. I've updated the issue here to include that detail |
Pinging @elastic/uptime (Team:Uptime) |
Would this have any direct affect on the Elastic Agent and the Elastic Agent docker image as soon as we support heartbeat or is this separate? ++ on having the default image with synthetics. If the larger size or the additional content causes issues for some users, we could still have in the future a second container @andrewvc Can you go a bit more into details what parts of the image are updated "on demand" and which ones are not? Even though I agree the async update will be important i'm also concerned about the side affects of it. Would it mean if I run |
I agree that having two images is just going to get confusing for users, especially if they have for example an HTTP Ping monitor working and then one day decide to add a Synthetics monitor, and it just doesn’t work because they have the wrong image. Having it not bundled (but downloaded on demand, for example), means that the user has to 'pay the price' of the download each time Heartbeat is started up, as the container is ephemeral. This would be quite significant in size/bandwidth and time delay before Heartbeat can actually start monitoring, so seems unreasonable. Whilst the larger image size will need deploying, at least it means that everything needed by any of the Heartbeat monitors, is deployed and ready. Although it doesn’t directly impact the to bundle or not discussion, something that’s come up in a few conversations, is about Heartbeat auto-updating (Playwright/Chromium). One concern is that if Heartbeat just updates as soon as there is a new version of Playwright/Chromium, this might introduce a breaking change that stops Synthetics from working. When we control the release and versions within it, we have at least run our tests to ensure that the packaged components work together. In this instance, it would probably be best to disable auto updates by default. An alternative that @alvarolobato mentioned is if we made it get updates from a location we control. This actually dovetails nicely with a separate previous concern that had been raised about where updates are downloaded from. If we make that a location we control, we can ensure we only deploy updates to Playwright/Chromium when we have tested that it still works with Synthetics. We might have to think through how we control this, maybe with some form of configuration alongside the downloads, as there will be different versions of the Synthetic Agent out there as well (e.g. Synthetic Agent version n will work with Playwright/Chromium versions a, b or c, but to update to Playwright/Chromium version d requires Synthetic Agent version n+1). |
Thanks Paul. I would start with auto-updates disabled by default and favor stability, letting the user choose if they want to auto-update with a flag ie. if they find an important bug fix they want to pick up. Once we have an update repository we control we can change the default to auto-update, but I don´t think this is needed for GA. |
@alvarolobato I'm fine with that plan. @ruflin As far as elastic agent, for an initial release that doesn't support synthetics the size of the agent release would not be affected. For synthetics support, that's the question. We have two choices: 1. Release a single agent docker image with synthetics support @ ~1GiB or 2. Start releasing multiple docker images, a minimal and 'full' one. As far as what's updated, it's just the NPM @paulb-elastic raises some good points about versioning, which we discussed during today's tech sync for synthetics. Putting it all together with what @alvarolobato has mentioned let's:
Does this plan work for everybody? I'd also like @jahtalab and @vigneshshanmugam 's feedback in particular here |
Sounds good to me and ++ to all the points mentioned above plus disabling the auto-updates.
We did a fix for this one recently by pinning the version of Synthetics to the playwright version elastic/synthetics#150 and disabled the updates of browsers. So we should be good here and I like the idea of controlling the updates from the location we control.
@andrewvc Do we need this from heartbeat side? Could we just release a minor/patch version updates to our synthetic image on demand when we need an update to either Synthetics or Playwright versions. |
Sounds good @andrewvc , One suggestion (maybe an implementation detail), we could allow patch updates for the synthetics agent. This shouldn't make the package fail if it can't update, but if there's a patch update available on npm we can start using it. Since we control these patch releases and they can be done out of band of the stack release, this gives us flexibility with updating Playwright/Browsers. re. Number 2. I think we need to warn users that they might be using an incompatible version of agent with heartbeat. Or we could limit the range of versions allowed in |
In the package.json linked, not a specific version that is tagged but it is |
At this point it seems we're having 3 separate discussions:
Does that sound right? If the first point about the heartbeat docker image is not felt to be resolved here let's continue the discussion in thread |
Adjusts the heartbeat docker image to install deps for heartbeat synthetics. Fixes #22837
Adjusts the heartbeat docker image to install deps for heartbeat synthetics. Fixes elastic#22837 (cherry picked from commit dbc61ed)
As part of moving synthetics to beta we need to have a better packaging strategy. This issue proposes that we include synthetics in our standard heartbeat docker release. This would, unfortunately have the result of dramatically increasing the size of this docker image due to the inclusion of the chrome browser, dependencies for it, and node runtime. This would increase our docker image size from
327MiB
to1.15GiB
.That's a significant change, one we should discuss here. The only alternative to that would be to continue releasing separate images but this is a bad idea for a few reasons:
The work to do this would essentially involve 👍
This would also mean that we would no longer release synthetics docker images on their own schedule, but rather, only with the stack.
The text was updated successfully, but these errors were encountered: