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

[7.15](backport #28526) fix: use declarative style for complete variant of the elastic-agent #28634

Closed
wants to merge 3 commits into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 26, 2021

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

On branch mergify/bp/7.15/pr-28526
Your branch is up to date with 'origin/7.15'.

You are currently cherry-picking commit 554399aa1e.
  (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:   dev-tools/mage/dockerbuilder.go
	modified:   dev-tools/mage/pkgtypes.go
	modified:   x-pack/elastic-agent/README.md

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   dev-tools/packaging/packages.yml
	both modified:   dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/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/

…28526)

* Revert "[elastic-agent] Fix docker tar.gz generation for complete image (#27621)"

This reverts commit 89e415d.

* Revert "[elastic-agent] Use -complete in docker image name, not tag (#27399)"

This reverts commit 954a250.

* chore: use declarative variant for complete

* fix: pass agent dockerfile to complete spec

* fix: do not append variant to the artifact name

* docs: update reference to complete variant

* chore: remove unused param

* chore: remove Variants from PacakgeSpec struct

As we prefer using the declarative way over the programmatic way, we do
not need the variable. Instead, we'll use the YAML file for declaring the
new variants

* fix: align comment

Co-authored-by: Jaime Soriano Pastor <[email protected]>

Co-authored-by: Jaime Soriano Pastor <[email protected]>
(cherry picked from commit 554399a)

# Conflicts:
#	dev-tools/packaging/packages.yml
#	dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl
@mergify mergify bot requested a review from a team as a code owner October 26, 2021 05:50
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Oct 26, 2021
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 26, 2021
@mdelapenya mdelapenya added the Team:Automation Label for the Observability productivity team label Oct 26, 2021
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 26, 2021
@mdelapenya mdelapenya added build-system Issue or change affecting Mage, Make, or build scripts. and removed conflicts There is a conflict in the backported pull request labels Oct 26, 2021
@mdelapenya
Copy link
Contributor

@Mergifyio refresh

@mergify
Copy link
Contributor Author

mergify bot commented Oct 26, 2021

refresh

✅ Pull request refreshed

@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 26, 2021

💔 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 preview

Expand to view the summary

Build stats

  • Start Time: 2021-10-26T06:01:37.685+0000

  • Duration: 167 min 23 sec

  • Commit: 25c0b88

Test stats 🧪

Test Results
Failed 0
Passed 53143
Skipped 5289
Total 58432

Steps errors 5

Expand to view the steps failures

x-pack/elastic-agent-packaging-linux - mage package
  • Took 37 min 28 sec . View more details here
  • Description: mage package
gsutil -m -q cp -a public-read build/system-tests-*.tar.gz gs://beats-ci-temp/Beats/beats/PR-28634-3
  • Took 0 min 2 sec . View more details here
  • Description: gsutil -m -q cp -a public-read build/system-tests-*.tar.gz gs://beats-ci-temp/Beats/beats/PR-28634-3
x-pack/elastic-agent-packaging-arm-arm - mage package
  • Took 16 min 27 sec . View more details here
  • Description: mage package
gsutil -m -q cp -a public-read build/system-tests-*.tar.gz gs://beats-ci-temp/Beats/beats/PR-28634-3
  • Took 0 min 3 sec . View more details here
  • Description: gsutil -m -q cp -a public-read build/system-tests-*.tar.gz gs://beats-ci-temp/Beats/beats/PR-28634-3
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Error 'hudson.AbortException: script returned exit code 1'

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

@mdelapenya
Copy link
Contributor

mdelapenya commented Nov 2, 2021

@jsoriano I'm checking why this backport is failing in 7.15 and found this error:

<.image_name>: map has no entry for key "image_name"

[2021-10-26T08:23:11.721Z] Error: failed building elastic-agent type=docker for platform=linux/arm64: failed to prepare build: expanding template '/var/lib/jenkins/workspace/PR-28634-3-2491b2d4-78a1-48d3-aa19-a0c166dc7e8e/src/github.com/elastic/beats/dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl' to 'build/package/elastic-agent/elastic-agent-linux-arm64.docker/docker-build/Dockerfile': failed to expand template: template: /var/lib/jenkins/workspace/PR-28634-3-2491b2d4-78a1-48d3-aa19-a0c166dc7e8e/src/github.com/elastic/beats/dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl:49:22: executing "/var/lib/jenkins/workspace/PR-28634-3-2491b2d4-78a1-48d3-aa19-a0c166dc7e8e/src/github.com/elastic/beats/dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl" at <.image_name>: map has no entry for key "image_name"

Do you think we should not backport this to 7.15? Or should we adapt the code in the backport to fulfill 7.15 requirements?

@jsoriano
Copy link
Member

jsoriano commented Nov 2, 2021

Do you think we should not backport this to 7.15? Or should we adapt the code in the backport to fulfill 7.15 requirements?

If this is not causing any problem in 7.15 I would say that it isn't worth backporting it. If we backport it, we would have to check what haven't been backported to have these conflicts.

@mdelapenya
Copy link
Contributor

Ok, will close it then. Thanks!

@mdelapenya mdelapenya closed this Nov 5, 2021
@mergify mergify bot deleted the mergify/bp/7.15/pr-28526 branch November 5, 2021 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport build-system Issue or change affecting Mage, Make, or build scripts. Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants