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

Add warning messages to magefile for version mismatches in beats #3580

Merged

Conversation

fearful-symmetry
Copy link
Contributor

@fearful-symmetry fearful-symmetry commented Oct 10, 2023

What does this PR do?

This adds a few warning lines to the magefile to handle cases where there's a version mismatch between the agent repo and the beat repo. Shot myself in the foot a few times with this, so it will just quit if it detects a version mismatch.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works

@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@mergify
Copy link
Contributor

mergify bot commented Oct 10, 2023

This pull request does not have a backport label. Could you fix it @fearful-symmetry? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 10, 2023

💚 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: 2023-10-13T19:22:02.174+0000

  • Duration: 26 min 2 sec

Test stats 🧪

Test Results
Failed 0
Passed 6493
Skipped 59
Total 6552

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

  • run integration tests : Run the Elastic Agent Integration tests.

  • run end-to-end tests : Generate the packages and run the E2E Tests.

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

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 10, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 98.78% (81/82) 👍
Files 67.559% (202/299) 👍
Classes 66.187% (368/556) 👍
Methods 53.613% (1165/2173) 👍
Lines 39.738% (13545/34086) 👎 -0.038
Conditionals 100.0% (0/0) 💚

Copy link
Contributor

@belimawr belimawr left a comment

Choose a reason for hiding this comment

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

LGTM, however I would make that an error and interrupt the packaging process.

I've shoot myself in the foot because of this as well. If we need mismatched versions for testing/development, we know what we're doing and we can just modify the version files.

As a general behaviour I rather error on the safe side and not generate an inconsistent package.

magefile.go Outdated Show resolved Hide resolved
magefile.go Outdated Show resolved Hide resolved
magefile.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

A few minor comments but overall LGTM!

fearful-symmetry and others added 3 commits October 13, 2023 12:20
Co-authored-by: Shaunak Kashyap <[email protected]>
Co-authored-by: Shaunak Kashyap <[email protected]>
Co-authored-by: Shaunak Kashyap <[email protected]>
@elastic-sonarqube
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@fearful-symmetry fearful-symmetry merged commit 069b065 into elastic:main Oct 13, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants