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

determine correct behavior for multiple agents #3

Open
xkrogen opened this issue Oct 13, 2015 · 6 comments
Open

determine correct behavior for multiple agents #3

xkrogen opened this issue Oct 13, 2015 · 6 comments

Comments

@xkrogen
Copy link
Collaborator

xkrogen commented Oct 13, 2015

If a spy_point has multiple agents set, all with doers, and one of those has a result, what's the expected behavior? I think we need to consistently decide if all agents are applied, or only the most recent one that matches. The two consistent directions I see: (1) More recent agents completely replace older ones (unless they don't meet the matching criteria) and thus only the most recent matching agent does anything (gets its doer called, has its ignore checked, etc). (2) All agents coexist but some have higher priority. All of their doers are run, all of their ignores are checked (but more recent ones take precedence), and then a result is found.

@gnecula
Copy link
Owner

gnecula commented Oct 13, 2015

I think we can drop the "ignore" part. Now we have spy groups which I think are better. We can also simplify the model and say that the last deployed agent whose filters match is the active agent. The doers and the result for that agent are used. The other agents are overridden.

This will be enough for all the use cases I have had.

@xkrogen
Copy link
Collaborator Author

xkrogen commented Oct 13, 2015

Yeah, I'm in support of that one. I think it's the most simple to understand without any real loss of generality.

gnecula pushed a commit that referenced this issue Oct 13, 2015
@gnecula
Copy link
Owner

gnecula commented Oct 13, 2015

Fixed and committed.

@gnecula gnecula closed this as completed Oct 13, 2015
@gnecula
Copy link
Owner

gnecula commented Oct 14, 2015

I was thinking that at some point we may want to add another flag for an agent, whether to continue evaluating previous agents. This would only be useful for the formatters and the doers. Not sure it is worth it.

@gnecula gnecula reopened this Oct 14, 2015
@xkrogen
Copy link
Collaborator Author

xkrogen commented Oct 14, 2015

Wouldn't be hard to implement and seems like it could be useful in some situations. Let's leave it as-is for now and maybe do it later?

@gnecula
Copy link
Owner

gnecula commented Oct 14, 2015

I agree that we leave this as a possible future feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants