Open Carthanial opened 2 years ago
Hi. After searching file.
kbn/optimizer is a build optimize package. Should not related to plugin functional test.
https://github.com/Tengda-He/kibana/tree/bfs7.4.2/test/plugin_functional This is the plugin functional test folder for 7.4.2
Since 7.4.2 does have plugin functional test. Why jenkins failed. https://jenkins.bfs.sichend.people.aws.dev/job/Kibana/job/bfs7.4.2/15/console According to the error message. _
"info downloading artifact info from https://artifacts-api.elastic.co/v1/versions/7.4.2-SNAPSHOT/builds/latest/projects/elasticsearch" "Snapshots for 7.4.2/latest are not available"
Jenkins unable to download snapshot for es 7.4.2. This leads to plugin functional test failed.
In order to fix this issue, we can download Opensearch into S3 buckets. Each time when we want to run functional test, download Opensearch from S3 then running it in the backend.
For 7.7 they use storage.googleapis.com as data source for es snapshot downloading. Can we modify the 7.4 data source to use storage.googleapis.com url as well ?
Jenkins log: log [16:52:19.602] [error][test-file-legacy] error │ info starting elasticsearch │ info Installing from snapshot │ info version: 7.7.1 │ info install path: /var/lib/jenkins/workspace/Kibana_bfs7.7.1_3/.es/es-test-cluster │ info license: oss │ info Downloading snapshot manifest from https://storage.googleapis.com/kibana-ci-es-snapshots-daily/7.7.1/manifest-latest-verified.json │ info Daily snapshot manifest not found, falling back to permanent manifest │ info Downloading snapshot manifest from https://storage.googleapis.com/kibana-ci-es-snapshots-permanent/7.7.1/manifest.json │ info verifying cache of https://storage.googleapis.com/kibana-ci-es-snapshots-permanent/7.7.1/elasticsearch-oss-7.7.1-SNAPSHOT-linux-x86_64.tar.gz │ info etags match, reusing cache from 2021-11-09T23:04:40.201Z │ info extracting /var/lib/jenkins/workspace/Kibana_bfs7.7.1_3/.es/cache/elasticsearch-oss-7.7.1-SNAPSHOT-linux-x86_64.tar.gz │ info extracted to /var/lib/jenkins/workspace/Kibana_bfs7.7.1_3/.es/es-test-cluster │ info created /var/lib/jenkins/workspace/Kibana_bfs7.7.1_3/.es/es-test-cluster/ES_TMPDIR │ info Starting
I have use the same approach in our dev infra. However, the only difference is that I have uploaded the artifact to a S3 bucket of the bfs aws account, in order to avoid any complications. This means that Tengda needs to change the download path and credential ID for internal AES infra account.
Here is the sample code
withCredentials([[
$class: 'AmazonWebServicesCredentialsBinding',
credentialsId: '##please find this in the following build link##', // Change this for AES account
accessKeyVariable: 'AWS_ACCESS_KEY_ID',
secretKeyVariable: 'AWS_SECRET_ACCESS_KEY'
]]) {
sh 'aws s3 cp s3://kibana.bfs.vendor/aes/elasticsearch/elasticsearch-oss-6.5.4.tar.gz ./' // Change file path for AES account
echo 'Start Elasticsearch'
sh 'tar -xf elasticsearch-oss-6.5.4.tar.gz'
sh './elasticsearch-oss-6.5.4/bin/elasticsearch &'
}
And here is the test run. Please ignore the error on ./elasticsearch calls, since the test case is designed to run inside a docker container, the mount path is incorrect in my test code. However, having elasticsearch artifact downloaded and unzipped should be fine for our operation. Please let me know if you need anything else or encounter any issues. Thanks.
https://jenkins.bfs.sichend.people.aws.dev/job/Kibana/job/bfs6.5.4_test/20/console
Script in 'Build Test Plugins' Stage can't find the called file:
node scripts/build_kibana_platform_plugins
Cause :
The elastic team has been making packages out of code within kibana to improve deployment. The package/files this script utilizes 'kbn-optimizer' is in v7.7.1 however it is not present in v7.4.2.
Possible Solutions - Next Steps :
Look through elastic's github repo for issues and PRs that reference these packages/files to guide the debugging process.