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

Split agent subscriptions properly in CLI flags #2754

Merged
merged 3 commits into from
Mar 5, 2019

Conversation

echlebek
Copy link
Contributor

What is this change?

This commit fixes a bug where agents were sending the wrong
subscriptions in entities, as they would not be split properly
before being sent to the config.

Due to a quirk in how subscriptions are handled, this doesn't
affect any current scheduling mechanism. Nevertheless,
subscriptions must be properly stored in entities, especially for
future work that depends on entity details being correct.

Why is this change necessary?

Closes #2753

Does your change need a Changelog entry?

Yes

Have you reviewed and updated the documentation for this change? Is new documentation required?

No doc changes required.

How did you verify this change?

Manual verification.

This commit fixes a bug where agents were sending the wrong
subscriptions in entities, as they would not be split properly
before being sent to the config.

Due to a quirk in how subscriptions are handled, this doesn't
affect any current scheduling mechanism. Nevertheless,
subscriptions must be properly stored in entities, especially for
future work that depends on entity details being correct.

Signed-off-by: Eric Chlebek <eric@sensu.io>
agent/cmd/start.go Outdated Show resolved Hide resolved
Signed-off-by: Eric Chlebek <eric@sensu.io>
@echlebek
Copy link
Contributor Author

echlebek commented Mar 4, 2019

@palourde I've incorporated your suggestion and verified that it works. Thanks again!

Copy link
Contributor

@ccressent ccressent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think splitAndTrim() is now unused and can probably be deleted; we should be using viper.GetStringSlice() in the future anyway.

Signed-off-by: Eric Chlebek <eric@sensu.io>
Copy link
Contributor

@palourde palourde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@echlebek echlebek merged commit 7350d68 into master Mar 5, 2019
@palourde palourde deleted the bugfix/entity-subscriptions branch March 12, 2019 17:30
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

Successfully merging this pull request may close these issues.

Entity subscriptions are stored incorrectly
3 participants