Skip to content

Commit

Permalink
Be more lenient when checking for Saved Objects API in Kibana (#27460) (
Browse files Browse the repository at this point in the history
#27470)

This PR sets the minimum required version for Kibana to 7.14 for using the Saved Objects API. The change lets module developers use the last released version for exporting dashboards.

The PR also updates the testing environment to 7.14, so dashboard exporting and importing can be tested using e2e tests.

Support module developers and run e2e tests to catch issues.

(cherry picked from commit 9defc4a)

Co-authored-by: Noémi Ványi <[email protected]>
  • Loading branch information
mergify[bot] and kvch authored Aug 19, 2021
1 parent 24425b7 commit f2829bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion libbeat/kibana/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ import (
)

var (
MinimumRequiredVersionSavedObjects = common.MustNewVersion("7.15.0")
// We started using Saved Objects API in 7.15. But to help integration
// developers migrate their dashboards we are more lenient.
MinimumRequiredVersionSavedObjects = common.MustNewVersion("7.14.0")
)

type Connection struct {
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/tests/system/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def kibana_dir(self):

def is_saved_object_api_available(self):
kibana_semver = semver.VersionInfo.parse(self.get_version())
return kibana_semver.major == 7 and kibana_semver.minor < 15 or kibana_semver.major >= 8
return semver.VersionInfo.parse("7.14.0") <= kibana_semver

def get_version(self):
url = self.get_kibana_url() + "/api/status"
Expand Down
6 changes: 3 additions & 3 deletions testing/environments/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version: '2.3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.4
image: docker.elastic.co/elasticsearch/elasticsearch:7.14.0
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"]
retries: 300
Expand All @@ -16,7 +16,7 @@ services:
- "xpack.security.enabled=false"

logstash:
image: docker.elastic.co/logstash/logstash:7.13.4
image: docker.elastic.co/logstash/logstash:7.14.0
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9600/_node/stats"]
retries: 300
Expand All @@ -26,7 +26,7 @@ services:
- ./docker/logstash/pki:/etc/pki:ro

kibana:
image: docker.elastic.co/kibana/kibana:7.13.4
image: docker.elastic.co/kibana/kibana:7.14.0
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5601"]
retries: 300
Expand Down

0 comments on commit f2829bd

Please sign in to comment.