Skip to content

Fix breakage caused by external use of our internal API #953

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

Merged

Conversation

yaauie
Copy link
Contributor

@yaauie yaauie commented Jul 15, 2020

Because Logstash Core v7.7.0-v7.8.x override the use_event_type? in a
monitoring implelentation's subclass with a required (and ignored) client
argument, when we send use_event_type? internally, we must send an argument
or else we break compatibility with those versions of Logstash.

This change re-adds the required argument and modifies our call-site to send
with an arity of 1, re-names the resulting local variable to be descriptive
of our intent, and adds commentary to prevent future accidental breakage.

Because Logstash Core v7.7.0-v7.8.x override the `use_event_type?` in a
monitoring implelentation's subclass with a required (and ignored) `client`
argument, when we send `use_event_type?` internally, we must send an argument
or else we break compatibility with those versions of Logstash.

This change re-adds the required argument and modifies our call-site to send
with an arity of 1, re-names the resulting local variable to be descriptive
of our intent, and adds commentary to prevent future accidental breakage.
@yaauie
Copy link
Contributor Author

yaauie commented Jul 15, 2020

Not sure how or why, but I've pushed changelog and version bump to the branch referenced here and Github is not picking it up -> master...yaauie:fix-external-use-of-internal-api

@yaauie yaauie requested a review from jsvd July 15, 2020 17:00
@jsvd
Copy link
Member

jsvd commented Jul 15, 2020 via email

@yaauie yaauie force-pushed the fix-external-use-of-internal-api branch from 5dee3ba to baeb4b1 Compare July 15, 2020 17:03
@yaauie
Copy link
Contributor Author

yaauie commented Jul 15, 2020

Ah, it seems caught up now.

Copy link
Member

@jsvd jsvd left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -60,7 +60,14 @@ def successful_connection?
!!maximum_seen_major_version
end

def use_event_type?
##
# WARNING: This method is overridden in a subclass in Logstash Core 7.7-7.8's monitoring,
Copy link
Member

Choose a reason for hiding this comment

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

❤️

@yaauie
Copy link
Contributor Author

yaauie commented Jul 15, 2020

Needs a doc fix too before publishing.

@yaauie yaauie force-pushed the fix-external-use-of-internal-api branch from a14e5da to fb9657c Compare July 15, 2020 20:23
Copy link
Contributor

@karenzone karenzone left a comment

Choose a reason for hiding this comment

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

Left a suggestion on link format. Your way is ideal, but we have some technical issues around versioning to sort out before the attribute will work in the Versioned Plugin Reference.

Versioned Plugins doc gen doesn't have the placeholder, so using it breaks the build.

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
@karenzone karenzone self-requested a review July 15, 2020 20:55
Copy link
Contributor

@karenzone karenzone left a comment

Choose a reason for hiding this comment

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

LGTM

@yaauie yaauie merged commit bcfe4e9 into logstash-plugins:master Jul 15, 2020
@yaauie yaauie deleted the fix-external-use-of-internal-api branch July 15, 2020 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants