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

chore: pass BEAT_VERSION when running E2E tests #26291

Merged
merged 1 commit into from Jun 23, 2021

Conversation

mdelapenya
Copy link
Contributor

What does this PR do?

It passes the BEAT_VERSION to the downstream execution of the E2E tests:

  • in the form of a input parameter for the packaging job
  • in the form of an env var for the regular execution for branches

Why is it important?

In elastic/e2e-testing#1256, the e2e are adding the ability of using the expected version for a Beat. We want to adhere to that contract

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • @v1v, any other place where we trigger the e2e from Beats?

@mdelapenya mdelapenya self-assigned this Jun 14, 2021
@mdelapenya mdelapenya added the Team:Automation Label for the Observability productivity team label Jun 14, 2021
@mdelapenya mdelapenya requested a review from a team June 14, 2021 15:45
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jun 14, 2021
@mdelapenya mdelapenya marked this pull request as ready for review June 14, 2021 15:46
@elasticmachine
Copy link
Collaborator

💔 Build Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #26291 opened

  • Start Time: 2021-06-14T15:45:29.641+0000

  • Duration: 146 min 27 sec

  • Commit: 295bbb6

Test stats 🧪

Test Results
Failed 0
Passed 47465
Skipped 5256
Total 52721

Trends 🧪

Image of Build Times

Image of Tests

Log output

Expand to view the last 100 lines of log output

[2021-06-14T18:10:36.505Z]  Go version:        go1.13.15
[2021-06-14T18:10:36.505Z]  Git commit:        48d30b5
[2021-06-14T18:10:36.505Z]  Built:             Fri Jan 29 14:33:13 2021
[2021-06-14T18:10:36.505Z]  OS/Arch:           linux/amd64
[2021-06-14T18:10:36.505Z]  Context:           default
[2021-06-14T18:10:36.505Z]  Experimental:      true
[2021-06-14T18:10:36.505Z] 
[2021-06-14T18:10:36.505Z] Server: Docker Engine - Community
[2021-06-14T18:10:36.505Z]  Engine:
[2021-06-14T18:10:36.505Z]   Version:          20.10.3
[2021-06-14T18:10:36.505Z]   API version:      1.41 (minimum version 1.12)
[2021-06-14T18:10:36.505Z]   Go version:       go1.13.15
[2021-06-14T18:10:36.505Z]   Git commit:       46229ca
[2021-06-14T18:10:36.505Z]   Built:            Fri Jan 29 14:31:25 2021
[2021-06-14T18:10:36.505Z]   OS/Arch:          linux/amd64
[2021-06-14T18:10:36.505Z]   Experimental:     false
[2021-06-14T18:10:36.505Z]  containerd:
[2021-06-14T18:10:36.505Z]   Version:          1.4.3
[2021-06-14T18:10:36.505Z]   GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
[2021-06-14T18:10:36.505Z]  runc:
[2021-06-14T18:10:36.505Z]   Version:          1.0.0-rc92
[2021-06-14T18:10:36.505Z]   GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
[2021-06-14T18:10:36.505Z]  docker-init:
[2021-06-14T18:10:36.505Z]   Version:          0.19.0
[2021-06-14T18:10:36.505Z]   GitCommit:        de40ad0
[2021-06-14T18:10:36.505Z] Change ownership of all files inside the specific folder from root/root to current user/group
[2021-06-14T18:10:36.505Z] Unable to find image 'alpine:3.4' locally
[2021-06-14T18:10:37.125Z] 3.4: Pulling from library/alpine
[2021-06-14T18:10:37.414Z] c1e54eec4b57: Pulling fs layer
[2021-06-14T18:10:37.705Z] c1e54eec4b57: Verifying Checksum
[2021-06-14T18:10:37.705Z] c1e54eec4b57: Download complete
[2021-06-14T18:10:37.705Z] c1e54eec4b57: Pull complete
[2021-06-14T18:10:37.705Z] Digest: sha256:b733d4a32c4da6a00a84df2ca32791bb03df95400243648d8c539e7b4cce329c
[2021-06-14T18:10:37.705Z] Status: Downloaded newer image for alpine:3.4
[2021-06-14T18:10:39.784Z] Change permissions with write access of all files inside the specific folder
[2021-06-14T18:10:40.498Z] Running in /var/lib/jenkins/workspace/PR-26291-1-7a3173cf-0ed7-42b6-b4cb-7d480d560e8c/src/github.com/elastic/beats/build
[2021-06-14T18:10:40.876Z] + rm -rf ve
[2021-06-14T18:10:40.876Z] + find . -type d -name vendor -exec rm -r {} ;
[2021-06-14T18:10:41.381Z] + python .ci/scripts/pre_archive_test.py
[2021-06-14T18:10:50.121Z] Copy ./x-pack/elastic-agent/build into build/x-pack/elastic-agent/build
[2021-06-14T18:10:50.121Z] Copy ./x-pack/elastic-agent/build/golang-crossbuild into build/x-pack/elastic-agent/build/golang-crossbuild
[2021-06-14T18:10:50.121Z] Copy ./x-pack/elastic-agent/build/package/elastic-agent/elastic-agent-linux-amd64.docker/docker-build into build/x-pack/elastic-agent/build/package/elastic-agent/elastic-agent-linux-amd64.docker/docker-build
[2021-06-14T18:10:50.121Z] Copy ./x-pack/elastic-agent/build/package/elastic-agent-ubi8/elastic-agent-linux-amd64.docker/docker-build into build/x-pack/elastic-agent/build/package/elastic-agent-ubi8/elastic-agent-linux-amd64.docker/docker-build
[2021-06-14T18:10:50.121Z] Copy ./x-pack/filebeat/build into build/x-pack/filebeat/build
[2021-06-14T18:10:50.121Z] Copy ./x-pack/filebeat/build/golang-crossbuild into build/x-pack/filebeat/build/golang-crossbuild
[2021-06-14T18:10:50.121Z] Copy ./x-pack/metricbeat/build into build/x-pack/metricbeat/build
[2021-06-14T18:10:50.121Z] Copy ./x-pack/metricbeat/build/golang-crossbuild into build/x-pack/metricbeat/build/golang-crossbuild
[2021-06-14T18:10:50.121Z] Copy ./x-pack/heartbeat/build into build/x-pack/heartbeat/build
[2021-06-14T18:10:50.121Z] Copy ./x-pack/heartbeat/build/golang-crossbuild into build/x-pack/heartbeat/build/golang-crossbuild
[2021-06-14T18:10:50.179Z] Running in /var/lib/jenkins/workspace/PR-26291-1-7a3173cf-0ed7-42b6-b4cb-7d480d560e8c/src/github.com/elastic/beats/build
[2021-06-14T18:10:50.266Z] Recording test results
[2021-06-14T18:10:53.310Z] None of the test reports contained any result
[2021-06-14T18:10:53.328Z] [Checks API] No suitable checks publisher found.
[2021-06-14T18:10:53.899Z] + go clean -modcache
[2021-06-14T18:10:56.818Z] Cleaning up /var/lib/jenkins/workspace/PR-26291-1-7a3173cf-0ed7-42b6-b4cb-7d480d560e8c
[2021-06-14T18:10:56.818Z] Client: Docker Engine - Community
[2021-06-14T18:10:56.818Z]  Version:           20.10.3
[2021-06-14T18:10:56.818Z]  API version:       1.41
[2021-06-14T18:10:56.818Z]  Go version:        go1.13.15
[2021-06-14T18:10:56.818Z]  Git commit:        48d30b5
[2021-06-14T18:10:56.818Z]  Built:             Fri Jan 29 14:33:13 2021
[2021-06-14T18:10:56.818Z]  OS/Arch:           linux/amd64
[2021-06-14T18:10:56.818Z]  Context:           default
[2021-06-14T18:10:56.818Z]  Experimental:      true
[2021-06-14T18:10:56.818Z] 
[2021-06-14T18:10:56.818Z] Server: Docker Engine - Community
[2021-06-14T18:10:56.818Z]  Engine:
[2021-06-14T18:10:56.818Z]   Version:          20.10.3
[2021-06-14T18:10:56.818Z]   API version:      1.41 (minimum version 1.12)
[2021-06-14T18:10:56.818Z]   Go version:       go1.13.15
[2021-06-14T18:10:56.818Z]   Git commit:       46229ca
[2021-06-14T18:10:56.818Z]   Built:            Fri Jan 29 14:31:25 2021
[2021-06-14T18:10:56.818Z]   OS/Arch:          linux/amd64
[2021-06-14T18:10:56.818Z]   Experimental:     false
[2021-06-14T18:10:56.818Z]  containerd:
[2021-06-14T18:10:56.818Z]   Version:          1.4.3
[2021-06-14T18:10:56.818Z]   GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
[2021-06-14T18:10:56.818Z]  runc:
[2021-06-14T18:10:56.818Z]   Version:          1.0.0-rc92
[2021-06-14T18:10:56.818Z]   GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
[2021-06-14T18:10:56.818Z]  docker-init:
[2021-06-14T18:10:56.818Z]   Version:          0.19.0
[2021-06-14T18:10:56.818Z]   GitCommit:        de40ad0
[2021-06-14T18:10:56.818Z] Change ownership of all files inside the specific folder from root/root to current user/group
[2021-06-14T18:11:43.776Z] Change permissions with write access of all files inside the specific folder
[2021-06-14T18:11:43.860Z] Running in /var/lib/jenkins/workspace/PR-26291-1-7a3173cf-0ed7-42b6-b4cb-7d480d560e8c
[2021-06-14T18:11:48.810Z] + gsutil --version
[2021-06-14T18:11:50.367Z] Masking supported pattern matches of $FILE_CREDENTIAL
[2021-06-14T18:11:50.764Z] + gcloud auth activate-service-account --key-file ****
[2021-06-14T18:11:51.374Z] Activated service account credentials for: [beats-ci-gcs-plugin@elastic-ci-prod.iam.gserviceaccount.com]
[2021-06-14T18:11:51.824Z] + gsutil -m -q cp -a public-read eC1wYWNrL2VsYXN0aWMtYWdlbnQtcGFja2FnaW5nLWxpbnV4Mjk1YmJiNjg2ZTczMjBjNGI2OGIzZTgzOTllMDc5YjE3ZDQxMGU2Ng gs://beats-ci-temp/ci/cache/
[2021-06-14T18:11:54.794Z] Stage "Packaging-Pipeline" skipped due to earlier failure(s)
[2021-06-14T18:11:54.990Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-26291/src/github.com/elastic/beats
[2021-06-14T18:11:55.487Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-26291
[2021-06-14T18:11:55.646Z] [INFO] getVaultSecret: Getting secrets
[2021-06-14T18:11:55.713Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-06-14T18:11:56.941Z] + chmod 755 generate-build-data.sh
[2021-06-14T18:11:56.941Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-26291/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-26291/runs/1 FAILURE 8787000
[2021-06-14T18:11:56.941Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-26291/runs/1/steps/?limit=10000 -o steps-info.json
[2021-06-14T18:12:12.533Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-26291/runs/1/tests/?status=FAILED -o tests-errors.json

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 47465
Skipped 5256
Total 52721

Copy link
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

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

I'm not sure if this could be done with the props file feature we added back in the days.

See #22027

In a nutshell:

  • beats:Jenkinsfile generates a properties file with (git sha, beats-version...), then the downstream jobs get triggered and read the file if possible (otherwise, use the previous behaviour).

This helps to ensure the git sha and versioning is passed correctly between downstream jobs and we don't use the latest archived artifacts in the Google Storage but the specific commit id .

This process was put in place for the main-pipeline -> packaging -> beats-tester but IIRC we didn't do it for the e2e-testing

Other than that, It looks ok

Jenkinsfile Show resolved Hide resolved
@mdelapenya
Copy link
Contributor Author

mdelapenya commented Jun 18, 2021

This helps to ensure the git sha and versioning is passed correctly between downstream jobs and we don't use the latest archived artifacts in the Google Storage but the specific commit id .

I'm not sure if I follow you about that file :S What we are trying to solve is the need to get the real version behind a commit-sha: i.e. the commit abcdef01234567890, which was produced by a PR or a merge commit against 7.x, produces an artifact that is 7.13.2, and that value comes from libbeat's version. Maybe in two weeks, a PR or merge commit to 7.x would produce a 7.13.3 artifact. That's the main reason why we cannot hardcode it in the e2e side, and needs to be passed from the upstream job.

@mdelapenya mdelapenya merged commit ea84a3b into elastic:master Jun 23, 2021
@mdelapenya mdelapenya added backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify labels Jun 23, 2021
mergify bot pushed a commit that referenced this pull request Jun 23, 2021
mergify bot pushed a commit that referenced this pull request Jun 23, 2021
mdelapenya added a commit to mdelapenya/beats that referenced this pull request Jun 28, 2021
* master: (32 commits)
  [Metricbeat] Change Account ID to Project ID in `gcp.billing` module (elastic#26412)
  update libbeat fields.ecs.yml file and ecsVersion to 1.10.0 (elastic#26121)
  [Filebeat] Update AWS ELB ingest pipeline (elastic#26441)
  [FIlebeat] add strict_date_optional_time_nanos date format to PanOS module (elastic#26158)
  Fix the irregular and typo on prometheus module. (elastic#25726)
  [Filebeat] Parse additonal debug data fields for Okta module (elastic#25818)
  fix: update MSSQL Server linux image's Docker registry (elastic#26440)
  Update indexing.go godocs (elastic#26408)
  Do not close filestream harvester if an unexpected error is returned when close.on_state_change.* is enabled (elastic#26411)
  Add support for copytruncate method when rotating input logs with an external tool in `filestream` input (elastic#23457)
  Allow fields with ip_range datatype (elastic#26444)
  Add Anomali ThreatStream support to threatintel module (elastic#26350)
  fix: use the right param type (elastic#26469)
  [Automation] Update elastic stack version to 8.0.0-7640093f for testing (elastic#26460)
  Set SM Filebeat modules as GA (elastic#26226)
  Fix rfc5464 date parsing in the syslog input (elastic#26419)
  Add linked account information into billing metricset (elastic#26285)
  [Filebeat] Update HA Proxy log grok patterns (elastic#25835)
  disable metricbeat logstash test_node_stats (elastic#26436)
  chore: pass BEAT_VERSION when running E2E tests (elastic#26291)
  ...
v1v pushed a commit that referenced this pull request Jul 14, 2021
(cherry picked from commit ea84a3b)

Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
v1v pushed a commit that referenced this pull request Jul 14, 2021
(cherry picked from commit ea84a3b)

Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
@v1v
Copy link
Member

v1v commented Jul 14, 2021

@Mergifyio backport 7.14

mergify bot pushed a commit that referenced this pull request Jul 14, 2021
@mergify
Copy link
Contributor

mergify bot commented Jul 14, 2021

Command backport 7.14: success

Backports have been created

mdelapenya added a commit that referenced this pull request Sep 22, 2021
…6889)

* chore: pass BEAT_VERSION when running E2E tests (#26291)

(cherry picked from commit ea84a3b)

* fix: proper param type

Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>

Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…) (elastic#26889)

* chore: pass BEAT_VERSION when running E2E tests (elastic#26291)

(cherry picked from commit b35a1bf)

* fix: proper param type

Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>

Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants