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

[7.13.x](backport #1163) Update installer code to support deployer abstraction#1199

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

[7.13.x](backport #1163) Update installer code to support deployer abstraction#1199
mergify[bot] wants to merge 1 commit into7.13.xfrom
mergify/bp/7.13.x/pr-1163

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented May 25, 2021

This is an automatic backport of pull request #1163 done by Mergify.
Cherry-pick of 584769a has failed:

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

You are currently cherry-picking commit 584769a.
  (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:
	modified:   e2e/_suites/fleet/stand-alone.go
	modified:   e2e/_suites/fleet/world.go
	modified:   internal/deploy/base.go
	modified:   internal/deploy/docker.go
	modified:   internal/deploy/docker_client.go
	modified:   internal/deploy/docker_client_test.go
	modified:   internal/deploy/kubernetes.go
	modified:   internal/installer/elasticagent.go
	new file:   internal/installer/elasticagent_deb.go
	new file:   internal/installer/elasticagent_rpm.go
	new file:   internal/installer/elasticagent_tar.go
	modified:   internal/kibana/fleet.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   e2e/_suites/fleet/fleet.go
	both modified:   internal/installer/base.go
	deleted by them: internal/installer/deb.go
	deleted by them: internal/installer/rpm.go
	deleted by them: internal/installer/tar.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/

* Installer refactor
* More work abstracting out installer bits
* Update internal/deploy/docker.go
* Update installer to support attaching a deployment
* cleanup execing into services
* fix e2e tests
* print logs of container, up timeout factor
* revert jenkinsfile
* remove dead code

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
(cherry picked from commit 584769a)

# Conflicts:
#	e2e/_suites/fleet/fleet.go
#	internal/installer/base.go
#	internal/installer/deb.go
#	internal/installer/rpm.go
#	internal/installer/tar.go
@mergify mergify bot added the conflicts There is a conflict in the backported pull request label May 25, 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 #1199 opened

  • Start Time: 2021-05-25T15:46:51.860+0000

  • Duration: 6 min 37 sec

  • Commit: df7847f

Test stats 🧪

Test Results
Failed 1
Passed 88
Skipped 0
Total 89

Trends 🧪

Image of Build Times

Image of Tests

Test errors 1

Expand to view the tests failures

Initializing / Pre-Submit / Sanity checks / golangcilint – 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 27 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-25T15:50:12.262Z] Archiving artifacts script returned exit code 2

Log output

Expand to view the last 100 lines of log output

[2021-05-25T15:51:53.632Z]   Downloading importlib_metadata-4.0.1-py3-none-any.whl (16 kB)
[2021-05-25T15:51:53.893Z] Collecting toml
[2021-05-25T15:51:53.893Z]   Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
[2021-05-25T15:51:53.893Z] Collecting virtualenv>=20.0.8
[2021-05-25T15:51:53.893Z]   Downloading virtualenv-20.4.7-py2.py3-none-any.whl (7.2 MB)
[2021-05-25T15:51:54.465Z] Collecting cfgv>=2.0.0
[2021-05-25T15:51:54.465Z]   Downloading cfgv-3.3.0-py2.py3-none-any.whl (7.3 kB)
[2021-05-25T15:51:54.465Z] Collecting identify>=1.0.0
[2021-05-25T15:51:54.465Z]   Downloading identify-2.2.6-py2.py3-none-any.whl (98 kB)
[2021-05-25T15:51:54.725Z] Collecting importlib-resources
[2021-05-25T15:51:54.725Z]   Downloading importlib_resources-5.1.4-py3-none-any.whl (26 kB)
[2021-05-25T15:51:54.725Z] Collecting pyyaml>=5.1
[2021-05-25T15:51:54.725Z]   Downloading PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl (640 kB)
[2021-05-25T15:51:54.985Z] Collecting filelock<4,>=3.0.0
[2021-05-25T15:51:54.985Z]   Downloading filelock-3.0.12-py3-none-any.whl (7.6 kB)
[2021-05-25T15:51:54.985Z] Collecting six<2,>=1.9.0
[2021-05-25T15:51:54.985Z]   Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
[2021-05-25T15:51:54.985Z] Collecting distlib<1,>=0.3.1
[2021-05-25T15:51:54.985Z]   Downloading distlib-0.3.1-py2.py3-none-any.whl (335 kB)
[2021-05-25T15:51:54.985Z] Collecting appdirs<2,>=1.4.3
[2021-05-25T15:51:54.985Z]   Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
[2021-05-25T15:51:55.246Z] Collecting zipp>=0.5
[2021-05-25T15:51:55.246Z]   Downloading zipp-3.4.1-py3-none-any.whl (5.2 kB)
[2021-05-25T15:51:55.246Z] Collecting typing-extensions>=3.6.4
[2021-05-25T15:51:55.246Z]   Downloading typing_extensions-3.10.0.0-py3-none-any.whl (26 kB)
[2021-05-25T15:51:55.506Z] Installing collected packages: zipp, typing-extensions, six, importlib-resources, importlib-metadata, filelock, distlib, appdirs, virtualenv, toml, pyyaml, nodeenv, identify, cfgv, pre-commit
[2021-05-25T15:51:56.077Z] Successfully installed appdirs-1.4.4 cfgv-3.3.0 distlib-0.3.1 filelock-3.0.12 identify-2.2.6 importlib-metadata-4.0.1 importlib-resources-5.1.4 nodeenv-1.6.0 pre-commit-2.13.0 pyyaml-5.4.1 six-1.16.0 toml-0.10.2 typing-extensions-3.10.0.0 virtualenv-20.4.7 zipp-3.4.1
[2021-05-25T15:51:56.077Z] Downloading https://files.pythonhosted.org/packages/a4/e3/1f067de470e3a86875ed915438dc3bd781fb0346254f541190a09472b677/virtualenv-16.7.10.tar.gz
[2021-05-25T15:51:56.077Z] Done.
[2021-05-25T15:51:56.077Z] *******************************************************************************
[2021-05-25T15:51:56.077Z] Installing pre-commit to /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/bin/pre-commit
[2021-05-25T15:51:56.077Z] *******************************************************************************
[2021-05-25T15:51:56.490Z] + export PATH=/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/.gvm/versions/go1.15.9.linux.amd64/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/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-1199/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/src/github.com/elastic/e2e-testing/.ci/scripts
[2021-05-25T15:51:56.491Z] + pre-commit install --install-hooks
[2021-05-25T15:51:56.491Z] pre-commit installed at .git/hooks/pre-commit
[2021-05-25T15:51:56.491Z] [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-25T15:51:56.491Z] [INFO] Initializing environment for git://github.com/pre-commit/pre-commit-hooks.
[2021-05-25T15:51:57.061Z] [INFO] Initializing environment for git://github.com/dnephin/pre-commit-golang.
[2021-05-25T15:51:57.322Z] [INFO] Initializing environment for git@github.com:elastic/apm-pipeline-library.
[2021-05-25T15:51:58.710Z] [INFO] Installing environment for git://github.com/pre-commit/pre-commit-hooks.
[2021-05-25T15:51:58.710Z] [INFO] Once installed this environment will be reused.
[2021-05-25T15:51:58.710Z] [INFO] This may take a few minutes...
[2021-05-25T15:52:04.338Z] + export PATH=/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/.gvm/versions/go1.15.9.linux.amd64/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/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-1199/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/src/github.com/elastic/e2e-testing/.ci/scripts
[2021-05-25T15:52:04.338Z] + set +e
[2021-05-25T15:52:04.338Z] + find /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/.cache/pre-commit -type d -name scripts
[2021-05-25T15:52:04.338Z] + grep .ci/scripts
[2021-05-25T15:52:04.338Z] + searchFile=/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/.cache/pre-commit/repoq86c4_8n/.ci/scripts
[2021-05-25T15:52:04.338Z] + [ -e /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/.cache/pre-commit/repoq86c4_8n/.ci/scripts ]
[2021-05-25T15:52:04.338Z] + export PATH=/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/.gvm/versions/go1.15.9.linux.amd64/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/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-1199/bin:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/src/github.com/elastic/e2e-testing/.ci/scripts:/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/.cache/pre-commit/repoq86c4_8n/.ci/scripts
[2021-05-25T15:52:04.338Z] + set -e
[2021-05-25T15:52:04.338Z] + git diff-tree --no-commit-id --name-only -r df7847fb792ea935e74bf8e575b6b206de29461f
[2021-05-25T15:52:04.338Z] + xargs pre-commit run --files
[2021-05-25T15:52:04.338Z] + tee pre-commit.out
[2021-05-25T15:52:04.338Z] [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-25T15:52:04.599Z] Check for case conflicts.................................................Passed
[2021-05-25T15:52:04.599Z] Check that executables have shebangs.................(no files to check)Skipped
[2021-05-25T15:52:04.599Z] Check JSON...........................................(no files to check)Skipped
[2021-05-25T15:52:04.599Z] Check for merge conflicts................................................Passed
[2021-05-25T15:52:04.599Z] Check Yaml...........................................(no files to check)Skipped
[2021-05-25T15:52:04.599Z] Check Xml............................................(no files to check)Skipped
[2021-05-25T15:52:04.859Z] Fix End of Files.........................................................Passed
[2021-05-25T15:52:04.860Z] go fmt...................................................................Passed
[2021-05-25T15:52:04.860Z] go lint..................................................................Passed
[2021-05-25T15:52:04.860Z] Check files aren't using go's testing package........(no files to check)Skipped
[2021-05-25T15:52:22.986Z] golangci-lint............................................................Failed
[2021-05-25T15:52:22.986Z] - hook id: golangci-lint
[2021-05-25T15:52:22.986Z] - exit code: 3
[2021-05-25T15:52:22.986Z] 
[2021-05-25T15:52:22.986Z] level=warning msg="[runner] Can't run linter goanalysis_metalinter: S1039: failed prerequisites: [(inspect@github.com/elastic/e2e-testing/internal/installer [github.com/elastic/e2e-testing/internal/installer.test], isgenerated@github.com/elastic/e2e-testing/internal/installer [github.com/elastic/e2e-testing/internal/installer.test]): analysis skipped: errors in package: [/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/src/github.com/elastic/e2e-testing/internal/installer/base.go:17:1: expected declaration, found '<<' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/src/github.com/elastic/e2e-testing/internal/installer/base.go:25:1: expected '}', found '==' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/src/github.com/elastic/e2e-testing/internal/installer/base.go:34:2: expected declaration, found 'if' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/src/github.com/elastic/e2e-testing/internal/installer/base.go:49:73: illegal character U+0023 '#']]"
[2021-05-25T15:52:22.987Z] level=error msg="Running error: S1039: failed prerequisites: [(inspect@github.com/elastic/e2e-testing/internal/installer [github.com/elastic/e2e-testing/internal/installer.test], isgenerated@github.com/elastic/e2e-testing/internal/installer [github.com/elastic/e2e-testing/internal/installer.test]): analysis skipped: errors in package: [/var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/src/github.com/elastic/e2e-testing/internal/installer/base.go:17:1: expected declaration, found '<<' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/src/github.com/elastic/e2e-testing/internal/installer/base.go:25:1: expected '}', found '==' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/src/github.com/elastic/e2e-testing/internal/installer/base.go:34:2: expected declaration, found 'if' /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199/src/github.com/elastic/e2e-testing/internal/installer/base.go:49:73: illegal character U+0023 '#']]"
[2021-05-25T15:52:22.987Z] 
[2021-05-25T15:52:22.987Z] check-bash-syntax....................................(no files to check)Skipped
[2021-05-25T15:52:22.987Z] check-jenkins-pipelines..............................(no files to check)Skipped
[2021-05-25T15:52:22.987Z] - hook id: check-jenkins-pipelines
[2021-05-25T15:52:22.987Z] check-unicode-non-breaking-spaces........................................Passed
[2021-05-25T15:52:22.987Z] remove-unicode-non-breaking-spaces.......................................Passed
[2021-05-25T15:52:22.987Z] check-en-dashes..........................................................Passed
[2021-05-25T15:52:22.987Z] remove-en-dashes.........................................................Passed
[2021-05-25T15:52:22.987Z] check-jjbb...........................................(no files to check)Skipped
[2021-05-25T15:52:22.987Z] - hook id: check-jjbb
[2021-05-25T15:52:22.987Z] check-gherkin-lint...................................(no files to check)Skipped
[2021-05-25T15:52:23.059Z] $ ssh-agent -k
[2021-05-25T15:52:23.063Z] unset SSH_AUTH_SOCK;
[2021-05-25T15:52:23.064Z] unset SSH_AGENT_PID;
[2021-05-25T15:52:23.064Z] echo Agent pid 5350 killed;
[2021-05-25T15:52:23.076Z] [ssh-agent] Stopped.
[2021-05-25T15:52:23.361Z] Archiving artifacts
[2021-05-25T15:52:24.010Z] Recording test results
[2021-05-25T15:52:24.825Z] [Checks API] No suitable checks publisher found.
[2021-05-25T15:52:26.383Z] Stage "Build Docs" skipped due to earlier failure(s)
[2021-05-25T15:52:26.471Z] Stage "End-To-End Tests" skipped due to earlier failure(s)
[2021-05-25T15:52:26.567Z] Stage "Release" skipped due to earlier failure(s)
[2021-05-25T15:52:27.853Z] Running on worker-395930 in /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1199
[2021-05-25T15:52:27.931Z] [INFO] getVaultSecret: Getting secrets
[2021-05-25T15:52:27.978Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-05-25T15:52:30.156Z] + chmod 755 generate-build-data.sh
[2021-05-25T15:52:30.156Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-1199/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-1199/runs/1 FAILURE 336899
[2021-05-25T15:52:30.156Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-1199/runs/1/steps/?limit=10000 -o steps-info.json
[2021-05-25T15:52:32.855Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-1199/runs/1/tests/?status=FAILED -o tests-errors.json
[2021-05-25T15:52:32.855Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-1199/runs/1/log/ -o pipeline-log.txt

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Test stats 🧪

Test Results
Failed 1
Passed 88
Skipped 0
Total 89

Genuine test errors 1

💔 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

@mdelapenya
Copy link
Copy Markdown
Contributor

PTAL at #1200. This PR shouldn't be merged until that issue is solved

@adam-stokes adam-stokes deleted the mergify/bp/7.13.x/pr-1163 branch May 26, 2021 13:28
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.

3 participants