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

Cherry-pick #18865 to 7.8: index_pattern under visState.params cannot be empty "" #18942

Merged
merged 1 commit into from
Jun 4, 2020
Merged

Cherry-pick #18865 to 7.8: index_pattern under visState.params cannot be empty "" #18942

merged 1 commit into from
Jun 4, 2020

Conversation

kaiyan-sheng
Copy link
Contributor

Cherry-pick of PR #18865 to 7.8 branch. Original message:

This PR is to add check to make sure index_pattern under visState.params not be empty "". For example in metricbeat dashboard/visualization, when default index is not metricbeat-* in Kibana and index_pattern is set to "", visualizations will take the default index pattern by default. If the default index pattern is not metricbeat-*, then these dashboards will fail and show no data.

This PR is to not only fix the rest of the dashboards having this issue but also adding the check in mage/check.go.

Related PR: #18698
Discuss Forum Link: https://discuss.elastic.co/t/metricbeats-dashboards-for-kubernetes-controller-manager/233402/4

This PR also improved the error message on which visualization failed the test:

>> Dashboard format - module/kubernetes/_meta/kibana/7/dashboard/Metricbeat-kubernetes-controller-manager.json:
   expected index pattern reference 'metricbeat-*': unexpected index pattern reference found in visualization state params: `` in visualization `Controller Process [Metricbeat Kubernetes]`
>> Dashboard format - module/kubernetes/_meta/kibana/7/dashboard/Metricbeat-kubernetes-proxy.json:
   expected index pattern reference 'metricbeat-*': unexpected index pattern reference found in visualization state params: `` in visualization `Proxy CPU [Metricbeat Kubernetes]`
   expected index pattern reference 'metricbeat-*': unexpected index pattern reference found in visualization state params: `` in visualization `Proxy memory [Metricbeat Kubernetes]`

* `index_pattern` under visState.params cannot be empty ""

(cherry picked from commit f6710e3)
@kaiyan-sheng kaiyan-sheng requested a review from a team as a code owner June 3, 2020 14:48
@kaiyan-sheng kaiyan-sheng self-assigned this Jun 3, 2020
@kaiyan-sheng kaiyan-sheng added the Team:Platforms Label for the Integrations - Platforms team label Jun 3, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 3, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [jsoriano commented: jenkins run the tests please]

  • Start Time: 2020-06-04T14:44:39.648+0000

  • Duration: 69 min 52 sec

Test stats 🧪

Test Results
Failed 0
Passed 6621
Skipped 1053
Total 7674

@jsoriano
Copy link
Member

jsoriano commented Jun 4, 2020

jenkins run the tests please

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

LGTM, but wait for another CI run, there seemed to be problems in the previous one

@kaiyan-sheng
Copy link
Contributor Author

Merging this one, CI is green 😄

@kaiyan-sheng kaiyan-sheng merged commit d05e95c into elastic:7.8 Jun 4, 2020
@kaiyan-sheng kaiyan-sheng deleted the backport_18865_7.8 branch June 4, 2020 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport review Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants