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

Remove node-fetch dependency #20

Merged
merged 7 commits into from
Mar 31, 2020

Conversation

kindsun
Copy link

@kindsun kindsun commented Mar 30, 2020

Follow up to elastic/kibana#61846. Another step to unblocking elastic/kibana#60942. This PR accomplishes the following:

  • Removes node-fetch
  • Adds warning if no fetchFunction provided
  • Updates the patch version and adds notes around reason for patch

Feel free to suggest any revisions you think are necessary!

@kindsun kindsun added the v7.7.2 label Mar 30, 2020
@kindsun kindsun requested a review from nickpeihl March 30, 2020 17:10
@nickpeihl
Copy link
Member

With this PR, does a fetchFunction have to be provided for use by Node.js (not in a browser)? Since Node.js does not have a native fetch?

Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

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

For symmetry, I'm fine removing the node-fetch and explicitly having the client provide it.

Otherwise, we could consider modifying the two builds (one for browser and one for server). But I think for now it's important we move the Kibana NP work forward as quickly as possible, so whatever gets us there quickest is the way to go.

@kindsun
Copy link
Author

kindsun commented Mar 30, 2020

With this PR, does a fetchFunction have to be provided for use by Node.js (not in a browser)? Since Node.js does not have a native fetch?

Yeah. I also considered throwing if no function was provided. Maybe smarter than a warning "slap on the wrist" here. Thoughts?

Copy link
Member

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

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

Just a couple of nits.

This is a breaking change for ems-client. But I'm not sure if we really need to document it further? ems-client "should" only be used by Kibana and ems-landing-page. ems-landing-page is client only and should not be affected. Since it appears to be breaking Kibana, perhaps it's more of a breaking bug fix? And since we're matching the stack release, it wouldn't make sense to publish a new major version anyways.

@thomasneirynck
Copy link
Contributor

wrt

This is a breaking change for ems-client.

I think that's fine. We don't guarantee any compatibility across minors, neither for ems-client or in Kibana even (in Kibana, we don't want to break at config or end-user experience, but no guarantees in code). This will also get bumped to 7.8, so there's no real issue for existing users. And possible bug-fixes for older branches would get patched on those (7.7.x, 7.6.x, ...)

@kindsun kindsun requested a review from nickpeihl March 30, 2020 21:27
Copy link
Member

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

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

lgtm! thanks.

@kindsun kindsun force-pushed the remove-node-fetch-dependency branch from be047c4 to ad8fabc Compare March 31, 2020 15:23
@kindsun kindsun merged commit c1a53ec into elastic:master Mar 31, 2020
@kindsun kindsun deleted the remove-node-fetch-dependency branch March 31, 2020 15:35
@kindsun kindsun added v7.8.0 and removed v7.7.2 labels Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants