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

Fixing Event Feed chef server filter bug #3985

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

lancewf
Copy link
Contributor

@lancewf lancewf commented Jun 25, 2020

🔩 Description: What code changed, and why?

Fixing event feed chef-server filtering. The problem was that the UI was using the term 'chef_server' but the only valid terms were ''source_fqdn' or 'service_hostname'. The solution was to add 'chef_server' as an alias.

👍 Definition of Done

Filtering the event feed with a chef-server works.

👟 How to Build and Test the Change

  1. build components/config-mgmt-service && start_all_servcies
  2. chef_load_nodes 100
  3. chef_load_actions 100
  4. Go to https://a2-dev.test/dashboards/event-feed and add a chef-server filter.

✅ Checklist

Signed-off-by: Lance Finfrock <lfinfrock@chef.io>
@lancewf lancewf self-assigned this Jun 25, 2020
@lancewf lancewf added bug 🐛 Something isn't working event feed This issue or pull request pertains to the event feed. labels Jun 25, 2020
@lancewf lancewf marked this pull request as ready for review June 25, 2020 18:31
@lancewf lancewf requested a review from a team June 25, 2020 18:32
@@ -137,7 +137,7 @@ func ConvertParamToActionBackend(parameter string) string {
switch parameter {
case "organization":
return backend.ActionOrganization
case "source_fqdn":
case "source_fqdn", "chef_server":

Choose a reason for hiding this comment

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

im curious -- why not also include "service_hostname" here? is that not another alias?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The "service_hostname" term is the real value that we use to filter on. The backend.ActionSourceFQDN equals "service_hostname".
If we do want to add that term as part of our API we could add it here. That term seemed to me to be internal use only. Maybe I should remove it from the unit test 🤔

Choose a reason for hiding this comment

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

👍 i just didn't know what the term was

Copy link

@vjeffrey vjeffrey left a comment

Choose a reason for hiding this comment

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

working beautifully!

@lancewf lancewf merged commit 395eb7c into master Jun 25, 2020
@chef-expeditor chef-expeditor bot deleted the lancewf/event_feed_chef_server_filter_bug branch June 25, 2020 18:53
@susanev susanev added the customer-reported issues reported by customers label Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working customer-reported issues reported by customers event feed This issue or pull request pertains to the event feed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants