question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

use 'probe' outputs in 'actions'

See original GitHub issue

Hi guys,

As far as I can understand the general workflow of the tool is:

  • check steady state hypothesis
  • run actions
  • check steady state hypothesis again

In this flow probes represent steady state hypothesis and are not used for anything else.

For the use cases I see it would be extremely useful to use outputs of ‘probes’ as parameters to actions and have some conditional logic in between.

Example use case: Having hundreds of instances in AWS Region/AZ I don’t want to mess up with all of them as some instances/ASGs are not built for HA. So, I want to filter ASGs that:

  • match certain tags (easy)
  • have more than X healthy instances registered to load balancer and serving traffic (not so easy)
  • pass resulting list of ASGs to action so that it will operate with this subset of instances choosing random ones to stop

I cam imagine doing all the checks necessary in action itself but this will lead to code duplication as I can see some of checks I’d like to do in probes already and naturally want to reuse existing code.

Regarding conditional logic (like, don’t stop instances in ASG if it has less than 2 healthy instances), do you think it is possible to integrate this to experiment yaml/json or the best place for this is action itself and one could pass conditions as parameters to action?

Please let me know your thoughts on this subject.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Lawouachcommented, Aug 14, 2018

Hey folks,

Thank you @0rc for the awesome proposal. I think it certainly echoes what others have suggested in the past.

Russ and I knew initially we would need to explore one model along with the community so that the “right” approach would gradually emerge. Using a very declarative, sequential, model was a great starting point for its simplicity and ease to be understood and tried in various ways. I think it’s fair to say, Russ and I aren’t surprised it could evolve 😃

I see at least two features here:

  • Being able to propagate generated/pulled data
  • Offering more control inside the declaration

While the former is needed for the latter, I believe they can be both considered (and added) for their own merits.

My gut feeling, for now, is that the former is a great step forward. I’m almost tempted to say it could be included in 1.0 should we find the right format.

On the other hand, providing more control to the declaration requires careful thinking. As soon as we’ll add something, we may have to go all the way of a full blown language and I’m a little afraid of where that could lead us.

So, I am not advert of adding pattern matching and stop conditions but it would be great if we could keep some declarative level (rather than imperative style). For instance, if we could declare “guards” much like we declare “pauses”, that would have my favour.

At least for now.

0reactions
github-actions[bot]commented, Aug 22, 2021

This Issue was closed because it was not reactivated after 7 days of being marked Stale.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Haas Automation Tip of the Day - YouTube
Your probe does a lot more than just set Tool and Work Offsets, it can also be used to perform in-process inspection. And...
Read more >
Create or modify a probe - ServiceNow Docs
The script accepts probe results as an input and outputs a JSON string that is sent back to the instance for a sensor...
Read more >
Experiment - - Chaos Toolkit
An Experiment declares a steady state hypothesis, alongside probes to validate this steady state is met, and a method as a sequence actions...
Read more >
How to Use an Oscilloscope - SparkFun Learn
The frequency generator output has two separate conductors -- one for the signal and one for ground. Connect your probe's ground clip to...
Read more >
dtrace Provider - Oracle Solaris Dynamic Tracing Guide
The BEGIN probe fires in an unspecified context. This means that the output of stack or ustack, and the value of context-specific variables...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found