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

[Backport 1.x] Faraday 2 support for opensearch-transport 2 #86

Merged
merged 2 commits into from
Jul 6, 2022

Conversation

opensearch-trigger-bot[bot]
Copy link

Backport 60840f7 from #76

* Faraday 2 support for opensearch-transport 2

- Support Faraday 1.x and 2.x in opensearch-transport.
- Made client autodetection not break if the detected HTTP client is
  there but the associated Faraday adapter is not.
- Made the test setup require the referenced adapters.
- Made it more clear in the README that Faraday uses adapters.

[Fixes #59]

Signed-off-by: Brian Hawley <[email protected]>

* Additional requested fixes

- The Ruby < 2.7, Faraday 2+, and Typhoeus combination doesn't work.
  Adjusted the README and test setup accordingly.
- Fix the MiniTest transport test setup.
- Add extra opensearch-transport tests to the matrix for Faraday 1.

Signed-off-by: Brian Hawley <[email protected]>

* More requested fixes

- Use Gem::Version comparison.
- Fix the faraday-typhoeus links.

Signed-off-by: Brian Hawley <[email protected]>

* More fixes and requested changes

- Move the Faraday 1 tests to their own job.
- Don't reference faraday-typhoeus during Faraday 1 tests.
- Use ENV.key?('FARADAY_VERSION').

Signed-off-by: Brian Hawley <[email protected]>

* Make the version checks backwards compatible

Signed-off-by: Brian Hawley <[email protected]>
(cherry picked from commit 60840f7)
@opensearch-trigger-bot opensearch-trigger-bot bot requested review from a team and robsears as code owners July 1, 2022 17:26
@BrianHawley
Copy link
Contributor

BrianHawley commented Jul 1, 2022

@VachaShah the failures are the same "mydoc" failures that I had to fix in #75. Can I add the same fixes here?

@BrianHawley
Copy link
Contributor

Looks like 1.x also needs a backport of #74.

@BrianHawley
Copy link
Contributor

BrianHawley commented Jul 1, 2022

I did both changes in https://github.com/BrianHawley/opensearch-ruby/tree/backport/backport-76-to-1.x so they can be copied here. I can't push to this branch directly. I made #87 to add the commits through a PR, but you might not prefer to do it that way.

VachaShah
VachaShah previously approved these changes Jul 5, 2022
Copy link
Collaborator

@VachaShah VachaShah left a comment

Choose a reason for hiding this comment

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

The CI should be fixed after #87 is merged.

* Remove deprecated escape_utils. (#74)

Signed-off-by: Brian Hawley <[email protected]>

* Backport test fixes from 2.0

Signed-off-by: Brian Hawley <[email protected]>

Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
@dblock dblock requested a review from VachaShah July 6, 2022 18:21
@VachaShah VachaShah merged commit 6daa5cf into 1.x Jul 6, 2022
@github-actions github-actions bot deleted the backport/backport-76-to-1.x branch July 6, 2022 19:11
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