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

actions: run check for x-pack/packetbeat and packebeat #32711

Merged
merged 6 commits into from
Aug 22, 2022

Conversation

v1v
Copy link
Member

@v1v v1v commented Aug 16, 2022

What does this PR do?

Use GitHub actions to run the check stage for packetbeat and x-pack/packetbeat

What's the check stage?

  • make check
  • make update
  • make check-no-changes
  • mage check
  • mage update

Why is it important?

Faster build by running linting/checks outside of the main CI Pipeline.

Further details

The existing checks in Jenkins are replaced with GitHub checks, hence the union of these 2 new Github workflows substitutes each former check. Therefore, the same commands will run for the same scenarios.

Solved Issues

pcap.h: No such file or directory

# github.com/google/gopacket/pcap
Error: ../../../../go/pkg/mod/github.com/elastic/[email protected]/pcap/pcap_unix.go:[34](https://github.com/elastic/beats/runs/7875203008?check_suite_focus=true#step:5:35):10: fatal error: pcap.h: No such file or directory
   34 | #include <pcap.h>
      |          ^~~~~~~~
compilation terminated.
Error: failed running go vet, please fix the issues reported: running "go vet ./..." failed with exit code 2
make: *** [../libbeat/scripts/Makefile:153: check] Error 1
make: Leaving directory '/home/runner/work/beats/beats/packetbeat'
Error: Process completed with exit code 2.

Solved with a315907

Results

Nearly 10 minutes since they build was triggered in Jenkins and still waiting for workers to be assigned, while the new GitHub checks finished relatively much faster

Follow ups

If agreed then we can roll out this approach for the remaining beats

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 16, 2022
@mergify mergify bot assigned v1v Aug 16, 2022
@mergify
Copy link
Contributor

mergify bot commented Aug 16, 2022

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @v1v? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)
    To fixup this pull request, you need to add the backport labels for the needed
    branches, such as:
  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 16, 2022

💚 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: 2022-08-17T09:15:51.355+0000

  • Duration: 49 min 4 sec

Test stats 🧪

Test Results
Failed 0
Passed 1672
Skipped 19
Total 1691

💚 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.

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

@v1v v1v requested a review from a team August 17, 2022 09:25
@v1v v1v added automation Team:Automation Label for the Observability productivity team backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.4.0 Automated backport with mergify labels Aug 17, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 17, 2022
@v1v v1v marked this pull request as ready for review August 17, 2022 09:26
@v1v v1v requested review from a team as code owners August 17, 2022 09:26
@v1v v1v requested review from rdner and faec and removed request for a team August 17, 2022 09:26
Comment on lines +6 to +8
- '.github/workflows/check-packetbeat.yml'
- 'packetbeat/**'
- 'x-pack/packetbeat/**'
Copy link
Member Author

Choose a reason for hiding this comment

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

When changes in those files

Comment on lines +27 to +30
export PATH=$PATH:$(go env GOPATH)/bin
go install github.com/magefile/mage@latest
make -C ${{ env.BEAT_MODULE }} check update
make check-no-changes
Copy link
Member Author

Choose a reason for hiding this comment

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

Then run make

Comment on lines +6 to +8
- '.github/workflows/check-xpack-packetbeat.yml'
- 'x-pack/packetbeat/**'
- 'packetbeat/**'
Copy link
Member Author

Choose a reason for hiding this comment

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

When changes in these files

@v1v v1v merged commit 54b6f15 into elastic:main Aug 22, 2022
mergify bot pushed a commit that referenced this pull request Aug 22, 2022
(cherry picked from commit 54b6f15)

# Conflicts:
#	packetbeat/Jenkinsfile.yml
#	x-pack/packetbeat/Jenkinsfile.yml
mergify bot pushed a commit that referenced this pull request Aug 22, 2022
v1v pushed a commit that referenced this pull request Aug 23, 2022
v1v added a commit that referenced this pull request Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.4.0 Automated backport with mergify Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants