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

migrate x-pack/libbeat to static #38964

Merged
merged 20 commits into from
Apr 19, 2024

Conversation

sharbuz
Copy link
Contributor

@sharbuz sharbuz commented Apr 16, 2024

What is the problem this PR solves?

Jenkins->Buildkite pipelines migration

Migrate x-pack/libbeat from dynamic to static pipeline

Examples of the pipelines:
https://buildkite.com/elastic/beats/builds/5828
https://buildkite.com/elastic/beats-xpack-libbeat/builds/2673

Related issues

https://github.com/elastic/ingest-dev/issues/1693

@sharbuz sharbuz added libbeat arm Enable builds in the CI for ARM testing backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.13.0 Automated backport with mergify labels Apr 16, 2024
@sharbuz sharbuz self-assigned this Apr 16, 2024
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 16, 2024
@botelastic
Copy link

botelastic bot commented Apr 16, 2024

This pull request doesn't have a Team:<team> label.

Copy link
Contributor

mergify bot commented Apr 16, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b migrate-xpack-libbeat-to-static upstream/migrate-xpack-libbeat-to-static
git merge upstream/main
git push upstream migrate-xpack-libbeat-to-static

@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 16, 2024

💚 Build Succeeded

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

  • Duration: 13 min 11 sec

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the 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.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Contributor

mergify bot commented Apr 16, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b migrate-xpack-libbeat-to-static upstream/migrate-xpack-libbeat-to-static
git merge upstream/main
git push upstream migrate-xpack-libbeat-to-static

@sharbuz sharbuz marked this pull request as ready for review April 16, 2024 14:02
@sharbuz sharbuz requested a review from a team as a code owner April 16, 2024 14:02
@sharbuz sharbuz requested review from dliappis and alexsapran April 17, 2024 08:07
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

Mostly good, but there are a few things missing for the migration.
For testing, can you enable the :Windows label to also see the windows extended tests results?

Copy link
Contributor

mergify bot commented Apr 17, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b migrate-xpack-libbeat-to-static upstream/migrate-xpack-libbeat-to-static
git merge upstream/main
git push upstream migrate-xpack-libbeat-to-static

@dliappis dliappis self-requested a review April 19, 2024 08:38
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

We are getting there. I think there were some accidental additions for x-pack/heartbeat and x-pack/filebeat

@@ -90,18 +89,12 @@ packaging_changeset=(
)

case "${BUILDKITE_PIPELINE_SLUG}" in
"beats-libbeat")
BEAT_CHANGESET_REFERENCE=${libbeat_changeset[@]}
;;
Copy link
Contributor

Choose a reason for hiding this comment

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

are we intentionally removing beats-libbeat? the PR is about x-pack/libbeat

Copy link
Contributor Author

Choose a reason for hiding this comment

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

answered here

libbeat_changeset=(
"^libbeat/.*"
)

Copy link
Contributor

Choose a reason for hiding this comment

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

is this on purpose? given that the PR is about x-pack/libbeat

Copy link
Contributor Author

Choose a reason for hiding this comment

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

libbeat pipeline has already merged.
Also, in this pipeline I've added one part from libbeat (we discussed that earlier):

diff: "git diff --name-only origin/${GITHUB_PR_TARGET_BRANCH}...HEAD"

- dev-tools/
- testing/
# x-pack
- libbeat/
Copy link
Contributor

Choose a reason for hiding this comment

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

My understanding from /Jenkinsfile.yml is that the common changesets for x-pack are:

 # x-pack
                - go.mod
                - pytest.ini
                - dev-tools/
                - libbeat/
                - testing/
                - x-pack/libbeat/

we've already used this pattern in x-pack/heartbeat so perhaps we can standardize i.e. replace both oss and x-pack with one "# x-pack" section for x-pack related projects (similar to Jenkinsfile)?

Copy link
Contributor Author

@sharbuz sharbuz Apr 19, 2024

Choose a reason for hiding this comment

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

ok, let's compare what we have:

                - x-pack/libbeat/
                - .buildkite/x-pack/pipeline.xpack.libbeat.yml
                - .buildkite/scripts
                - .buildkite/hooks
                #OSS
                - go.mod
                - pytest.ini
                - dev-tools/
                - testing/
                # x-pack
                - libbeat/

Copy link
Contributor Author

@sharbuz sharbuz Apr 19, 2024

Choose a reason for hiding this comment

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

or you mean we shouldn't merge them?

Copy link
Contributor

@dliappis dliappis Apr 19, 2024

Choose a reason for hiding this comment

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

they are the same, I am just saying that for consistency's sake we should have a section

                # x-pack
                - go.mod
                - pytest.ini
                - dev-tools/
                - libbeat/
                - testing/
                - x-pack/libbeat/

for all x-pack pipelines. The pipeline specific bits will, of course, remain above, so the total thing with my proposal would be:

- x-pack/<whatever beat>/ # exceptionally here, since it's x-pack/libbeat which is part of the the x-pack common section below we should skip this line
- .buildkite/x-pack/pipeline.xpack.libbeat.yml
- .buildkite/scripts/
- .buildkite/hooks/
# x-pack
- go.mod
- pytest.ini
- dev-tools/
- libbeat/
- testing/
- x-pack/libbeat/

Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

LGTM

Left a minor ask in https://github.com/elastic/beats/pull/38964/files#r1572334321
which doesn't require another review cycle.

@sharbuz sharbuz removed libbeat arm Enable builds in the CI for ARM testing labels Apr 19, 2024
@sharbuz
Copy link
Contributor Author

sharbuz commented Apr 19, 2024

/test

@sharbuz sharbuz merged commit b0690b5 into elastic:main Apr 19, 2024
77 of 110 checks passed
mergify bot pushed a commit that referenced this pull request Apr 19, 2024
* migrate x-pack/libbeat to static

* Update pull-requests.json

* change paths

* Update pull-requests.json

* change conditions for group-steps

* change the pipeline.yml

* work with remarks

* work with remarks

* remove libbeat and x-pack/libbeat changesets from the common.sh

* remove libbeat and x-pack/libbeat changesets from the common.sh

* fix merge issues

* Update .buildkite/x-pack/pipeline.xpack.libbeat.yml

Co-authored-by: Dimitrios Liappis <[email protected]>

* apply common.sh from main and cleanup it

* change paths

---------

Co-authored-by: Dimitrios Liappis <[email protected]>
(cherry picked from commit b0690b5)

# Conflicts:
#	.buildkite/pipeline.yml
#	.buildkite/pull-requests.json
#	.buildkite/scripts/common.sh
mergify bot pushed a commit that referenced this pull request Apr 19, 2024
* migrate x-pack/libbeat to static

* Update pull-requests.json

* change paths

* Update pull-requests.json

* change conditions for group-steps

* change the pipeline.yml

* work with remarks

* work with remarks

* remove libbeat and x-pack/libbeat changesets from the common.sh

* remove libbeat and x-pack/libbeat changesets from the common.sh

* fix merge issues

* Update .buildkite/x-pack/pipeline.xpack.libbeat.yml

Co-authored-by: Dimitrios Liappis <[email protected]>

* apply common.sh from main and cleanup it

* change paths

---------

Co-authored-by: Dimitrios Liappis <[email protected]>
(cherry picked from commit b0690b5)

# Conflicts:
#	.buildkite/pipeline.yml
#	.buildkite/pull-requests.json
#	.buildkite/scripts/common.sh
#	.buildkite/x-pack/pipeline.xpack.libbeat.yml
@sharbuz sharbuz added the backport-v8.14.0 Automated backport with mergify label Apr 19, 2024
mergify bot pushed a commit that referenced this pull request Apr 19, 2024
* migrate x-pack/libbeat to static

* Update pull-requests.json

* change paths

* Update pull-requests.json

* change conditions for group-steps

* change the pipeline.yml

* work with remarks

* work with remarks

* remove libbeat and x-pack/libbeat changesets from the common.sh

* remove libbeat and x-pack/libbeat changesets from the common.sh

* fix merge issues

* Update .buildkite/x-pack/pipeline.xpack.libbeat.yml

Co-authored-by: Dimitrios Liappis <[email protected]>

* apply common.sh from main and cleanup it

* change paths

---------

Co-authored-by: Dimitrios Liappis <[email protected]>
(cherry picked from commit b0690b5)

# Conflicts:
#	.buildkite/pipeline.yml
#	.buildkite/scripts/common.sh
sharbuz added a commit that referenced this pull request Apr 22, 2024
* migrate x-pack/libbeat to static (#38964)

* migrate x-pack/libbeat to static

* Update pull-requests.json

* change paths

* Update pull-requests.json

* change conditions for group-steps

* change the pipeline.yml

* work with remarks

* work with remarks

* remove libbeat and x-pack/libbeat changesets from the common.sh

* remove libbeat and x-pack/libbeat changesets from the common.sh

* fix merge issues

* Update .buildkite/x-pack/pipeline.xpack.libbeat.yml

Co-authored-by: Dimitrios Liappis <[email protected]>

* apply common.sh from main and cleanup it

* change paths

---------

Co-authored-by: Dimitrios Liappis <[email protected]>
(cherry picked from commit b0690b5)

# Conflicts:
#	.buildkite/pipeline.yml
#	.buildkite/pull-requests.json
#	.buildkite/scripts/common.sh

* Update pipeline.yml

* Update pull-requests.json

* Update pull-requests.json

* Update common.sh

* Update common.sh

---------

Co-authored-by: Siarhei Harbuz <[email protected]>
sharbuz added a commit that referenced this pull request Apr 22, 2024
* migrate x-pack/libbeat to static (#38964)

* migrate x-pack/libbeat to static

* Update pull-requests.json

* change paths

* Update pull-requests.json

* change conditions for group-steps

* change the pipeline.yml

* work with remarks

* work with remarks

* remove libbeat and x-pack/libbeat changesets from the common.sh

* remove libbeat and x-pack/libbeat changesets from the common.sh

* fix merge issues

* Update .buildkite/x-pack/pipeline.xpack.libbeat.yml

Co-authored-by: Dimitrios Liappis <[email protected]>

* apply common.sh from main and cleanup it

* change paths

---------

Co-authored-by: Dimitrios Liappis <[email protected]>
(cherry picked from commit b0690b5)

# Conflicts:
#	.buildkite/pipeline.yml
#	.buildkite/scripts/common.sh

* Update pipeline.yml

* Update common.sh

* Update common.sh

---------

Co-authored-by: Siarhei Harbuz <[email protected]>
sharbuz added a commit that referenced this pull request Apr 22, 2024
* migrate x-pack/libbeat to static (#38964)

* migrate x-pack/libbeat to static

* Update pull-requests.json

* change paths

* Update pull-requests.json

* change conditions for group-steps

* change the pipeline.yml

* work with remarks

* work with remarks

* remove libbeat and x-pack/libbeat changesets from the common.sh

* remove libbeat and x-pack/libbeat changesets from the common.sh

* fix merge issues

* Update .buildkite/x-pack/pipeline.xpack.libbeat.yml

Co-authored-by: Dimitrios Liappis <[email protected]>

* apply common.sh from main and cleanup it

* change paths

---------

Co-authored-by: Dimitrios Liappis <[email protected]>
(cherry picked from commit b0690b5)

# Conflicts:
#	.buildkite/pipeline.yml
#	.buildkite/pull-requests.json
#	.buildkite/scripts/common.sh
#	.buildkite/x-pack/pipeline.xpack.libbeat.yml

* Update pipeline.yml

* Update pull-requests.json

* Update pull-requests.json

* Update common.sh

* Update pipeline.xpack.libbeat.yml

* Update pipeline.xpack.libbeat.yml

* Update pipeline.xpack.libbeat.yml

---------

Co-authored-by: Siarhei Harbuz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.13.0 Automated backport with mergify backport-v8.14.0 Automated backport with mergify needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants