-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Ignore bugfix version when running version compatibility check against Elasticsearch #30746
Ignore bugfix version when running version compatibility check against Elasticsearch #30746
Conversation
This pull request does not have a backport label. Could you fix it @kvch? 🙏
NOTE: |
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
@@ -883,7 +883,7 @@ func (b *Beat) checkElasticsearchVersion() { | |||
if err != nil { | |||
return err | |||
} | |||
if esVersion.LessThan(beatVersion) { | |||
if esVersion.LessThanMajorMinor(beatVersion) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't our comparison be LessThanOrEqual?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we return an error if the version of ES is less than the version of Beats. If this was LessThanOrEqual
, we would return an error when ES and Beats is on the same version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I compared the wrong way around 🤦♂️
Co-authored-by: Nicolas Ruflin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -883,7 +883,7 @@ func (b *Beat) checkElasticsearchVersion() { | |||
if err != nil { | |||
return err | |||
} | |||
if esVersion.LessThan(beatVersion) { | |||
if esVersion.LessThanMajorMinor(beatVersion) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I compared the wrong way around 🤦♂️
…t Elasticsearch (#30746) (#30750) (cherry picked from commit 46be42e) Co-authored-by: Noémi Ványi <[email protected]>
What does this PR do?
In #29683 we introduced a check to make sure we are not sending events to Elasticsearch instances that might be incompatible with Beats. However, the current check is too strict. Patch versions should not be considered during version checks. Beats 8.1.1 should be able to connect to Elasticsearch 8.1.0.
Why is it important?
The check is too strict. This is not what we agreed on in the original issue. Furthermore, it interferes with our own release process.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues
#30157