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

Fix libbeat BK crosscompile step #37870

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Conversation

sharbuz
Copy link
Contributor

@sharbuz sharbuz commented Feb 6, 2024

What is the problem this PR solves?

Jenkins->Buildkite pipelines migration

The PR fixes the issues:
https://buildkite.com/elastic/beats-libbeat/builds/241#018d4186-2241-458f-adae-376886577d54
https://buildkite.com/elastic/beats-libbeat/builds/248#018d41c0-29d2-46d8-87d6-bbbae4c7271d
https://buildkite.com/elastic/beats-libbeat/builds/249#018d41cd-4648-46ba-b4bb-ac1cab28bd99

How does this PR solve the problem?

Exclude unsupported by GO combinations of GOX_OS/GOX_OSARCH

Related issues

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

@sharbuz sharbuz added bug backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.12.0 Automated backport with mergify labels Feb 6, 2024
@sharbuz sharbuz requested review from dliappis and v1v February 6, 2024 10:16
@sharbuz sharbuz self-assigned this Feb 6, 2024
@sharbuz sharbuz requested a review from a team as a code owner February 6, 2024 10:16
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Feb 6, 2024
@botelastic
Copy link

botelastic bot commented Feb 6, 2024

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

@sharbuz sharbuz added failed-test indicates a failed automation test relates and removed bug labels Feb 6, 2024
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.

Can you explain what's the error if not updated? and also a link or copy of the error itself?

make: Entering directory '/opt/buildkite-agent/builds/bk-agent-prod-gcp-1706201338146898021/elastic/beats-libbeat/libbeat'
--
  | go install github.com/mitchellh/gox
  | mkdir -p /opt/buildkite-agent/builds/bk-agent-prod-gcp-1706201338146898021/elastic/beats-libbeat/libbeat/build/bin
  | gox -output="/opt/buildkite-agent/builds/bk-agent-prod-gcp-1706201338146898021/elastic/beats-libbeat/libbeat/build/bin/{{.Dir}}-{{.OS}}-{{.Arch}}" -os="linux darwin windows freebsd netbsd openbsd" -osarch="!darwin/arm !darwin/arm64"
  | Number of parallel builds: 15
  |  
  | -->   openbsd/amd64: github.com/elastic/beats/v7/libbeat
  | -->    linux/mipsle: github.com/elastic/beats/v7/libbeat
  | -->   freebsd/amd64: github.com/elastic/beats/v7/libbeat
  | -->     windows/386: github.com/elastic/beats/v7/libbeat
  | -->     linux/ppc64: github.com/elastic/beats/v7/libbeat
  | -->     linux/amd64: github.com/elastic/beats/v7/libbeat
  | -->      darwin/386: github.com/elastic/beats/v7/libbeat
  | -->    linux/mips64: github.com/elastic/beats/v7/libbeat
  | -->      netbsd/arm: github.com/elastic/beats/v7/libbeat
  | -->   windows/amd64: github.com/elastic/beats/v7/libbeat
  | -->    darwin/amd64: github.com/elastic/beats/v7/libbeat
  | -->    netbsd/amd64: github.com/elastic/beats/v7/libbeat
  | -->   linux/ppc64le: github.com/elastic/beats/v7/libbeat
  | -->     freebsd/386: github.com/elastic/beats/v7/libbeat
  | -->       linux/386: github.com/elastic/beats/v7/libbeat
  | -->     freebsd/arm: github.com/elastic/beats/v7/libbeat
  | -->      netbsd/386: github.com/elastic/beats/v7/libbeat
  | -->     linux/arm64: github.com/elastic/beats/v7/libbeat
  | -->       linux/arm: github.com/elastic/beats/v7/libbeat
  | -->     linux/s390x: github.com/elastic/beats/v7/libbeat
  | -->      linux/mips: github.com/elastic/beats/v7/libbeat
  | -->  linux/mips64le: github.com/elastic/beats/v7/libbeat
  | -->     openbsd/386: github.com/elastic/beats/v7/libbeat


2 errors occurred:
--
  | --> darwin/386 error: exit status 2
  | Stderr: go: unsupported GOOS/GOARCH pair darwin/386

I'd like to understand whether it's something broken in the current Jenkins pipeline, since I cannot see this in libbeat-crosscompile

...
[2024-02-06T06:19:48.671Z]   GOX_OSARCH: null
...
[2024-02-06T06:19:48.841Z] + make -C libbeat crosscompile
[2024-02-06T06:19:48.841Z] make: Entering directory '/var/lib/jenkins/workspace/main-2289-ef82a482-494b-4d96-b5b6-8b84710be033/src/github.com/elastic/beats/libbeat'
[2024-02-06T06:19:49.444Z] go install github.com/mitchellh/gox
[2024-02-06T06:19:49.847Z] mkdir -p /var/lib/jenkins/workspace/main-2289-ef82a482-494b-4d96-b5b6-8b84710be033/src/github.com/elastic/beats/libbeat/build/bin
[2024-02-06T06:19:49.847Z] gox -output="/var/lib/jenkins/workspace/main-2289-ef82a482-494b-4d96-b5b6-8b84710be033/src/github.com/elastic/beats/libbeat/build/bin/{{.Dir}}-{{.OS}}-{{.Arch}}" -os="linux darwin windows freebsd netbsd openbsd" -osarch="!darwin/arm !darwin/arm64" -arch amd64
[2024-02-06T06:19:52.156Z] Number of parallel builds: 7
[2024-02-06T06:19:52.156Z] 
[2024-02-06T06:19:52.156Z] -->   openbsd/amd64: github.com/elastic/beats/v7/libbeat
[2024-02-06T06:19:52.156Z] -->   windows/amd64: github.com/elastic/beats/v7/libbeat
[2024-02-06T06:19:52.156Z] -->     linux/amd64: github.com/elastic/beats/v7/libbeat
[2024-02-06T06:19:52.156Z] -->    darwin/amd64: github.com/elastic/beats/v7/libbeat
[2024-02-06T06:19:52.156Z] -->   freebsd/amd64: github.com/elastic/beats/v7/libbeat
[2024-02-06T06:19:52.156Z] -->    netbsd/amd64: github.com/elastic/beats/v7/libbeat

GOX_OSARCH=null since

beats/Jenkinsfile

Line 1046 in ac6e223

GOX_OSARCH: ${env.GOX_OSARCH}
- it uses the default variables defined in the Makefile

What's the reason those platforms are not the same in Jenkins and Builldkite?

@sharbuz sharbuz enabled auto-merge (squash) February 6, 2024 10:46
@elasticmachine
Copy link
Collaborator

elasticmachine commented Feb 6, 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

  • Start Time: 2024-02-06T12:18:46.126+0000

  • Duration: 130 min 55 sec

Test stats 🧪

Test Results
Failed 0
Passed 28777
Skipped 2016
Total 30793

💚 Flaky test report

Tests succeeded.

🤖 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!)

@sharbuz sharbuz added the libbeat label Feb 6, 2024
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @sharbuz

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

Copy link
Collaborator

@jlind23 jlind23 left a comment

Choose a reason for hiding this comment

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

LGTM

@sharbuz sharbuz merged commit a21051d into elastic:main Feb 6, 2024
104 of 105 checks passed
mergify bot pushed a commit that referenced this pull request Feb 6, 2024
(cherry picked from commit a21051d)

# Conflicts:
#	libbeat/scripts/Makefile
mergify bot pushed a commit that referenced this pull request Feb 6, 2024
sharbuz added a commit that referenced this pull request Feb 6, 2024
* Fix libbeat BK crosscompile step (#37870)

(cherry picked from commit a21051d)

# Conflicts:
#	libbeat/scripts/Makefile

* Update Makefile

* Update Makefile

---------

Co-authored-by: sharbuz <87968844+sharbuz@users.noreply.github.com>
sharbuz added a commit that referenced this pull request Feb 6, 2024
(cherry picked from commit a21051d)

Co-authored-by: sharbuz <87968844+sharbuz@users.noreply.github.com>
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.12.0 Automated backport with mergify failed-test indicates a failed automation test relates libbeat needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants