-
Notifications
You must be signed in to change notification settings - Fork 42
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 flags/capabilities system #292
Comments
This came up in #290 and as a blocker for that issue |
I assume the starting point for this has to be a version (in terms of how Heartbeat itself is triggered to launch a test), in which case I would think it makes sense to pass this into Synthetics to work out how to behave (it seems more complex to have Heartbeat track the Synthetic capabilities based on the stack version and then send these to Synthetics). Irrespective of which option to go with, how does Heartbeat know the stack version?
In all cases, Heartbeat passing the version to Synthetics seems simpler (or Heartbeat would need to know how to convert these into Synthetic capabilities - which seems like a job for Synthetics). |
Thanks for starting it Andrew, While working on the PR I was struck by the same thing and thought of moving the feature inside feature flag to not break the Uptime UI. One good thing about Synthetics/APM agents is the faster release cycle without affecting the stack releases, so in any case I think we should still retain that. Here are my thoughts
Thoughts @andrewvc @paulb-elastic |
@paulb-elastic it's much simpler than that, heartbeat knows its version when its compiled :) Looking through the rest of the comments now |
Great point about how this would work with a synthetics service @paulb-elastic I think in that case we could provide a version override in the config sent to the service for execution "tell synthetics we are version X.Y.Z". Otherwise, I think we can assume the compiled version. It's really about heartbeat compat, not ES or kibana. @vigneshshanmugam +1 on your thoughts. including major versioning In terms of action it sounds like we should:
Any objection to doing all the things here? |
fix #292 Allows for a way to pass an variadic args to --capability flag that controls the features inside the agent. npx @elastic/synthetics examples/todos --capability metrics trace --capability filmstrips Also deprecated the previous --trace, --metrics, --filmstrips flag which are not required anymore and not used by heartbeat currently.
We need a system whereby heartbeat can let the synthetics library know how wants to behave at a feature level. As we develop new features they may require new functionality in kibana or elasticsearch or heartbeat to function correctly. The problem is that the synthetics library versioning is completely independent of the rest of the stack. We could solve a number of ways, but one way that does not work is adding additional CLI flags. The main reason that is not a good idea is that a newer version of heartbeat would not work with an older version of the synthetics library that didn't support a newer flag.
I can think of two ways we can do this and I'm not certain which one is the best:
--stack-version=X.Y.Z
flag to synthetics, which can be used to determine which features are on/off--capability screenshot_refs --capability somenewcthing
flag, to enable new features on a one-by-one basisThe advantage of the first approach is that no updates to the heartbeat code have to happen to add a new capability. The advantage of the second approach is that it's quite a bit cleaner and it is more related CLI testing.
We could also do a combination of approaches where setting the stack version sets a certain set of capabilities.
The text was updated successfully, but these errors were encountered: