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

Remove _meta/kibana.generated symlink #9892

Merged
merged 2 commits into from
Jan 7, 2019

Conversation

cwurm
Copy link
Contributor

@cwurm cwurm commented Jan 4, 2019

#9546 introduced a symlink from _meta/kibana.generated to build/kibana so Auditbeat remains backwards compatible with the other Beats (Auditbeat is already using the first as a location for all its Kibana objects, while the other Beats are still using the latter).

This introduced a bug, where objects would be included in the dashboard ZIP file with the wrong path (#9785).

One way of fixing this would have been to double down on symlinks and change just one line in addFileToZip. But with #9842 about to change all Beats to use the new build/kibana I thought it better to just remove the symlink capability altogether and instead if-else between the two possible locations based on whether they exist or not. #9842 will then change all of that - at least in master - once it's merged.

Fixes #9785.

@cwurm cwurm added review needs_backport PR is waiting to be backported to other branches. labels Jan 4, 2019
@andrewkroh
Copy link
Member

@cwurm I was also looking at this and came to a similar solution (see dashboards.patch). But with few differences:

  • include x-pack dashboards (like suricata)
  • prefer the build/kibana
  • error if neither exists

Do you want to incorporate some of this with your PR?

@cwurm
Copy link
Contributor Author

cwurm commented Jan 4, 2019

@andrewkroh Thanks, definitely! I've pushed a new commit.

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

LGTM

@cwurm cwurm merged commit 3a51720 into elastic:master Jan 7, 2019
@kvch kvch added v6.7.0 and removed needs_backport PR is waiting to be backported to other branches. labels Jan 7, 2019
kvch pushed a commit to kvch/beats that referenced this pull request Jan 7, 2019
Fixes a bug introduced with elastic#9546 where a symlink from `_meta/kibana.generated` to `build/kibana` would cause objects to be included in the dashboard ZIP file with the wrong path. This removes the symlink in favor of a conditional.

Fixes elastic#9785.
kvch pushed a commit to kvch/beats that referenced this pull request Jan 7, 2019
Fixes a bug introduced with elastic#9546 where a symlink from `_meta/kibana.generated` to `build/kibana` would cause objects to be included in the dashboard ZIP file with the wrong path. This removes the symlink in favor of a conditional.

Fixes elastic#9785.
(cherry picked from commit 3a51720)
@kvch kvch added the v6.6.0 label Jan 7, 2019
@cwurm cwurm deleted the fix_dashboards_zip_9785 branch January 7, 2019 12:08
@cwurm cwurm removed the v6.7.0 label Jan 7, 2019
kvch added a commit that referenced this pull request Jan 7, 2019
Fixes a bug introduced with #9546 where a symlink from `_meta/kibana.generated` to `build/kibana` would cause objects to be included in the dashboard ZIP file with the wrong path. This removes the symlink in favor of a conditional.

Fixes #9785.
kvch added a commit that referenced this pull request Jan 7, 2019
Fixes a bug introduced with #9546 where a symlink from `_meta/kibana.generated` to `build/kibana` would cause objects to be included in the dashboard ZIP file with the wrong path. This removes the symlink in favor of a conditional.

Fixes #9785.
(cherry picked from commit 3a51720)
@ruflin
Copy link
Member

ruflin commented Jan 8, 2019

@cwurm This should not have been merged. It seems this change caused the failure for the test_ml jobs. The error is:

2019-01-07T15:30:04.349Z	ERROR	instance/beat.go:907	Exiting: Error importing Kibana dashboards: fail to import the dashboards in Kibana: Error importing directory /go/src/github.com/elastic/beats/filebeat/_meta/kibana.generated: No directory /go/src/github.com/elastic/beats/filebeat/_meta/kibana.generated/6

I assume this will also affect the backports?

ruflin added a commit to ruflin/beats that referenced this pull request Jan 8, 2019
In elastic#9892 the build was broken by removing the symlink to the generated kibana files which broke the ml tests. This fixes the test by pointing to the new directory under build/kibana.

Closes elastic#9938
@ruflin ruflin mentioned this pull request Jan 8, 2019
ruflin added a commit that referenced this pull request Jan 8, 2019
In #9892 the build was broken by removing the symlink to the generated kibana files which broke the ml tests. This fixes the test by pointing to the new directory under build/kibana.

Closes #9938
@cwurm
Copy link
Contributor Author

cwurm commented Jan 8, 2019

@ruflin Ah you're right, sorry. Thanks for fixing it in master.

I assume this will also affect the backports?

It shouldn't. In 6.x and 6.6 Filebeat is still using _meta/kibana.generated, so the test code works. Only in master did it change to build/kibana, but the test did not but was still working because of the symlink.

CI for 6.x and 6.6 look good for Filebeat.

leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
Fixes a bug introduced with elastic#9546 where a symlink from `_meta/kibana.generated` to `build/kibana` would cause objects to be included in the dashboard ZIP file with the wrong path. This removes the symlink in favor of a conditional.

Fixes elastic#9785.
(cherry picked from commit 23f1ea2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot load beats dashboards on darwin
4 participants