Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

[7.13.x](backport #1159) feat: simplify the initialisation of versions#1177

Closed
mergify[bot] wants to merge 1 commit into7.13.xfrom
mergify/bp/7.13.x/pr-1159
Closed

[7.13.x](backport #1159) feat: simplify the initialisation of versions#1177
mergify[bot] wants to merge 1 commit into7.13.xfrom
mergify/bp/7.13.x/pr-1159

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented May 17, 2021

This is an automatic backport of pull request #1159 done by Mergify.
Cherry-pick of 4c3d3eb has failed:

On branch mergify/bp/7.13.x/pr-1159
Your branch is up to date with 'origin/7.13.x'.

You are currently cherry-picking commit 4c3d3ebe.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   .stack-version
	modified:   e2e/_suites/kubernetes-autodiscover/kubernetes.go
	modified:   internal/docker/docker.go
	modified:   internal/elasticsearch/client.go
	modified:   internal/installer/deb.go
	modified:   internal/installer/docker.go
	modified:   internal/installer/elasticagent.go
	modified:   internal/installer/rpm.go
	modified:   internal/installer/tar.go
	modified:   internal/kibana/server.go
	renamed:    internal/common/retry.go -> internal/utils/retry.go
	modified:   internal/utils/utils.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   .ci/scripts/clean-docker.sh
	both modified:   .ci/scripts/fleet-test.sh
	both modified:   .ci/scripts/functional-test.sh
	both modified:   .ci/scripts/metricbeat-test.sh
	both modified:   e2e/_suites/fleet/fleet.go
	both modified:   e2e/_suites/fleet/ingest_manager_test.go
	both modified:   e2e/_suites/fleet/stand-alone.go
	both modified:   e2e/_suites/fleet/world.go
	both modified:   e2e/_suites/helm/helm_charts_test.go
	both modified:   e2e/_suites/kubernetes-autodiscover/autodiscover_test.go
	both modified:   e2e/_suites/metricbeat/metricbeat_test.go
	both modified:   internal/common/defaults.go

To fix up this pull request, you can check it out locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

* chore: use fixed version in shell scripts

* chore: move retry to utils

We could move it to its own package, but at this moment it's very small

* chore: initialise stackVesion at one single place

* chore: initialise agent version base at one single place

* chore: initialise agent version at one single place

* chore: reduce the number of requests to Elastic's artifacts endpoint

* chore: rename AgentVersionBase variable to BeatVersionBase

* chore: rename AgentVersion variable to BeatVersion

* chore: use Beat version in metricbeat test suite

* chore: check if the version must use the fallback after coming from a Git SHA

(cherry picked from commit 4c3d3eb)

# Conflicts:
#	.ci/scripts/clean-docker.sh
#	.ci/scripts/fleet-test.sh
#	.ci/scripts/functional-test.sh
#	.ci/scripts/metricbeat-test.sh
#	e2e/_suites/fleet/fleet.go
#	e2e/_suites/fleet/ingest_manager_test.go
#	e2e/_suites/fleet/stand-alone.go
#	e2e/_suites/fleet/world.go
#	e2e/_suites/helm/helm_charts_test.go
#	e2e/_suites/kubernetes-autodiscover/autodiscover_test.go
#	e2e/_suites/metricbeat/metricbeat_test.go
#	internal/common/defaults.go
@mergify mergify Bot added the conflicts There is a conflict in the backported pull request label May 17, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Tests 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 #1177 opened

  • Start Time: 2021-05-17T13:15:31.458+0000

  • Duration: 5 min 8 sec

  • Commit: e9abd5e

Test stats 🧪

Test Results
Failed 2
Passed 79
Skipped 0
Total 81

Trends 🧪

Image of Build Times

Image of Tests

Test errors 2

Expand to view the tests failures

Initializing / Pre-Submit / Sanity checks / golangcilint – pre_commit.lint
    Expand to view the error details

     error 
    

  • no stacktrace
Initializing / Pre-Submit / Sanity checks / checkbashsyntax – pre_commit.lint
    Expand to view the error details

     error 
    

  • no stacktrace

Steps errors 2

Expand to view the steps failures

Build and test
  • Took 0 min 28 sec . View more details on here
  • Description: .ci/scripts/build-test.sh
Archive the artifacts
  • Took 0 min 0 sec . View more details on here
  • Description: [2021-05-17T13:19:01.937Z] Archiving artifacts script returned exit code 2

Log output

Expand to view the last 100 lines of log output

[2021-05-17T13:20:03.317Z]   Downloading cfgv-3.2.0-py2.py3-none-any.whl (7.3 kB)
[2021-05-17T13:20:03.577Z] Collecting importlib-metadata
[2021-05-17T13:20:03.577Z]   Downloading importlib_metadata-4.0.1-py3-none-any.whl (16 kB)
[2021-05-17T13:20:03.577Z] Collecting pyyaml>=5.1
[2021-05-17T13:20:03.577Z]   Downloading PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl (640 kB)
[2021-05-17T13:20:03.577Z] Collecting toml
[2021-05-17T13:20:03.838Z]   Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
[2021-05-17T13:20:03.838Z] Collecting virtualenv>=20.0.8
[2021-05-17T13:20:03.838Z]   Downloading virtualenv-20.4.6-py2.py3-none-any.whl (7.2 MB)
[2021-05-17T13:20:04.407Z] Collecting six<2,>=1.9.0
[2021-05-17T13:20:04.407Z]   Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
[2021-05-17T13:20:04.407Z] Collecting filelock<4,>=3.0.0
[2021-05-17T13:20:04.407Z]   Downloading filelock-3.0.12-py3-none-any.whl (7.6 kB)
[2021-05-17T13:20:04.407Z] Collecting distlib<1,>=0.3.1
[2021-05-17T13:20:04.407Z]   Downloading distlib-0.3.1-py2.py3-none-any.whl (335 kB)
[2021-05-17T13:20:04.407Z] Collecting appdirs<2,>=1.4.3
[2021-05-17T13:20:04.667Z]   Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
[2021-05-17T13:20:04.667Z] Collecting zipp>=0.5
[2021-05-17T13:20:04.667Z]   Downloading zipp-3.4.1-py3-none-any.whl (5.2 kB)
[2021-05-17T13:20:04.667Z] Collecting typing-extensions>=3.6.4
[2021-05-17T13:20:04.667Z]   Downloading typing_extensions-3.10.0.0-py3-none-any.whl (26 kB)
[2021-05-17T13:20:04.928Z] Installing collected packages: zipp, typing-extensions, six, importlib-resources, importlib-metadata, filelock, distlib, appdirs, virtualenv, toml, pyyaml, nodeenv, identify, cfgv, pre-commit
[2021-05-17T13:20:06.840Z] Successfully installed appdirs-1.4.4 cfgv-3.2.0 distlib-0.3.1 filelock-3.0.12 identify-2.2.4 importlib-metadata-4.0.1 importlib-resources-5.1.3 nodeenv-1.6.0 pre-commit-2.12.1 pyyaml-5.4.1 six-1.16.0 toml-0.10.2 typing-extensions-3.10.0.0 virtualenv-20.4.6 zipp-3.4.1
[2021-05-17T13:20:06.840Z] Downloading https://files.pythonhosted.org/packages/a4/e3/1f067de470e3a86875ed915438dc3bd781fb0346254f541190a09472b677/virtualenv-16.7.10.tar.gz
[2021-05-17T13:20:06.840Z] Done.
[2021-05-17T13:20:06.840Z] *******************************************************************************
[2021-05-17T13:20:06.840Z] Installing pre-commit to /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/bin/pre-commit
[2021-05-17T13:20:06.840Z] *******************************************************************************
[2021-05-17T13:20:07.248Z] + export PATH=/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/.gvm/versions/go1.15.9.linux.amd64/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/.ci/scripts
[2021-05-17T13:20:07.248Z] + pre-commit install --install-hooks
[2021-05-17T13:20:07.248Z] pre-commit installed at .git/hooks/pre-commit
[2021-05-17T13:20:07.248Z] [WARNING] The 'rev' field of repo 'git@github.com:elastic/apm-pipeline-library' appears to be a mutable reference (moving tag / branch).  Mutable references are never updated after first install and are not supported.  See https://pre-commit.com/#using-the-latest-version-for-a-repository for more details.  Hint: `pre-commit autoupdate` often fixes this.
[2021-05-17T13:20:07.248Z] [INFO] Initializing environment for git://github.com/pre-commit/pre-commit-hooks.
[2021-05-17T13:20:07.817Z] [INFO] Initializing environment for git://github.com/dnephin/pre-commit-golang.
[2021-05-17T13:20:08.077Z] [INFO] Initializing environment for git@github.com:elastic/apm-pipeline-library.
[2021-05-17T13:20:09.459Z] [INFO] Installing environment for git://github.com/pre-commit/pre-commit-hooks.
[2021-05-17T13:20:09.459Z] [INFO] Once installed this environment will be reused.
[2021-05-17T13:20:09.459Z] [INFO] This may take a few minutes...
[2021-05-17T13:20:15.119Z] + export PATH=/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/.gvm/versions/go1.15.9.linux.amd64/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/.ci/scripts
[2021-05-17T13:20:15.120Z] + set +e
[2021-05-17T13:20:15.120Z] + find /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/.cache/pre-commit -type d -name scripts
[2021-05-17T13:20:15.120Z] + grep .ci/scripts
[2021-05-17T13:20:15.120Z] + searchFile=/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/.cache/pre-commit/repo59a2dfnx/.ci/scripts
[2021-05-17T13:20:15.120Z] + [ -e /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/.cache/pre-commit/repo59a2dfnx/.ci/scripts ]
[2021-05-17T13:20:15.120Z] + export PATH=/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/.gvm/versions/go1.15.9.linux.amd64/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/.ci/scripts:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/.cache/pre-commit/repo59a2dfnx/.ci/scripts
[2021-05-17T13:20:15.120Z] + set -e
[2021-05-17T13:20:15.120Z] + git diff-tree --no-commit-id --name-only -r e9abd5ece1afcb0d884eb5ab7ac80cec5dd93910
[2021-05-17T13:20:15.120Z] + xargs pre-commit run --files
[2021-05-17T13:20:15.120Z] + tee pre-commit.out
[2021-05-17T13:20:15.120Z] [WARNING] The 'rev' field of repo 'git@github.com:elastic/apm-pipeline-library' appears to be a mutable reference (moving tag / branch).  Mutable references are never updated after first install and are not supported.  See https://pre-commit.com/#using-the-latest-version-for-a-repository for more details.  Hint: `pre-commit autoupdate` often fixes this.
[2021-05-17T13:20:15.380Z] Check for case conflicts.................................................Passed
[2021-05-17T13:20:15.642Z] Check that executables have shebangs.....................................Passed
[2021-05-17T13:20:15.642Z] Check JSON...........................................(no files to check)Skipped
[2021-05-17T13:20:15.642Z] Check for merge conflicts................................................Passed
[2021-05-17T13:20:15.642Z] Check Yaml...........................................(no files to check)Skipped
[2021-05-17T13:20:15.642Z] Check Xml............................................(no files to check)Skipped
[2021-05-17T13:20:15.642Z] Fix End of Files.........................................................Passed
[2021-05-17T13:20:15.902Z] go fmt...................................................................Passed
[2021-05-17T13:20:15.902Z] go lint..................................................................Passed
[2021-05-17T13:20:15.902Z] Check files aren't using go's testing package........(no files to check)Skipped
[2021-05-17T13:20:34.022Z] golangci-lint............................................................Failed
[2021-05-17T13:20:34.023Z] - hook id: golangci-lint
[2021-05-17T13:20:34.023Z] - exit code: 3
[2021-05-17T13:20:34.023Z] 
[2021-05-17T13:20:34.023Z] level=warning msg="[runner] Can't run linter goanalysis_metalinter: S1032: failed prerequisites: [(inspect@github.com/elastic/e2e-testing/internal/common, isgenerated@github.com/elastic/e2e-testing/internal/common): analysis skipped: errors in package: [/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:28:1: expected declaration, found '<<' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:31:1: expected declaration, found '==' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:37:1: expected declaration, found '>>' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:37:68: illegal character U+0023 '#' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:58:1: expected declaration, found '<<' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:102:1: expected declaration, found '>>' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:102:68: illegal character U+0023 '#']]"
[2021-05-17T13:20:34.023Z] level=error msg="Running error: S1032: failed prerequisites: [(inspect@github.com/elastic/e2e-testing/internal/common, isgenerated@github.com/elastic/e2e-testing/internal/common): analysis skipped: errors in package: [/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:28:1: expected declaration, found '<<' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:31:1: expected declaration, found '==' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:37:1: expected declaration, found '>>' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:37:68: illegal character U+0023 '#' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:58:1: expected declaration, found '<<' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:102:1: expected declaration, found '>>' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177/src/github.com/elastic/e2e-testing/internal/common/defaults.go:102:68: illegal character U+0023 '#']]"
[2021-05-17T13:20:34.023Z] 
[2021-05-17T13:20:34.023Z] check-bash-syntax........................................................Failed
[2021-05-17T13:20:34.023Z] - hook id: check-bash-syntax
[2021-05-17T13:20:34.023Z] - exit code: 2
[2021-05-17T13:20:34.023Z] 
[2021-05-17T13:20:34.023Z] .ci/scripts/fleet-test.sh: line 12: syntax error near unexpected token `<<<'
[2021-05-17T13:20:34.023Z] .ci/scripts/fleet-test.sh: line 12: `<<<<<<< HEAD'
[2021-05-17T13:20:34.023Z] 
[2021-05-17T13:20:34.023Z] check-jenkins-pipelines..............................(no files to check)Skipped
[2021-05-17T13:20:34.023Z] - hook id: check-jenkins-pipelines
[2021-05-17T13:20:34.023Z] check-unicode-non-breaking-spaces........................................Passed
[2021-05-17T13:20:34.023Z] remove-unicode-non-breaking-spaces.......................................Passed
[2021-05-17T13:20:34.023Z] check-en-dashes..........................................................Passed
[2021-05-17T13:20:34.023Z] remove-en-dashes.........................................................Passed
[2021-05-17T13:20:34.023Z] check-jjbb...........................................(no files to check)Skipped
[2021-05-17T13:20:34.023Z] - hook id: check-jjbb
[2021-05-17T13:20:34.023Z] check-gherkin-lint...................................(no files to check)Skipped
[2021-05-17T13:20:34.097Z] $ ssh-agent -k
[2021-05-17T13:20:34.102Z] unset SSH_AUTH_SOCK;
[2021-05-17T13:20:34.102Z] unset SSH_AGENT_PID;
[2021-05-17T13:20:34.102Z] echo Agent pid 4859 killed;
[2021-05-17T13:20:34.114Z] [ssh-agent] Stopped.
[2021-05-17T13:20:34.493Z] Archiving artifacts
[2021-05-17T13:20:35.096Z] Recording test results
[2021-05-17T13:20:35.910Z] [Checks API] No suitable checks publisher found.
[2021-05-17T13:20:37.630Z] Stage "Build Docs" skipped due to earlier failure(s)
[2021-05-17T13:20:37.731Z] Stage "End-To-End Tests" skipped due to earlier failure(s)
[2021-05-17T13:20:37.834Z] Stage "Release" skipped due to earlier failure(s)
[2021-05-17T13:20:38.345Z] Running on Jenkins in /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1177
[2021-05-17T13:20:38.443Z] [INFO] getVaultSecret: Getting secrets
[2021-05-17T13:20:38.492Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-05-17T13:20:39.430Z] + chmod 755 generate-build-data.sh
[2021-05-17T13:20:39.430Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-1177/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-1177/runs/1 FAILURE 307699
[2021-05-17T13:20:39.430Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-1177/runs/1/steps/?limit=10000 -o steps-info.json

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Test stats 🧪

Test Results
Failed 2
Passed 79
Skipped 0
Total 81

Genuine test errors 2

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

  • Name: Initializing / Pre-Submit / Sanity checks / golangcilint – pre_commit.lint
  • Name: Initializing / Pre-Submit / Sanity checks / checkbashsyntax – pre_commit.lint

@mdelapenya mdelapenya closed this May 17, 2021
@mergify mergify Bot deleted the mergify/bp/7.13.x/pr-1159 branch May 17, 2021 14:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

conflicts There is a conflict in the backported pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants