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

[Ruby][Faraday][#10137] Fix config request options and timeout #10405

Merged
merged 2 commits into from
Oct 2, 2021

Conversation

NivathaSV8
Copy link
Contributor

@NivathaSV8 NivathaSV8 commented Sep 16, 2021

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (5.3.0), 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@NivathaSV8 NivathaSV8 changed the title [Ruby][Faraday] Fix config request options and timeout [Ruby][Faraday][#10137] Fix config request options and timeout Sep 16, 2021
@NivathaSV8
Copy link
Contributor Author

@wing328 Can you please review this PR and get it merged.

@wing328
Copy link
Member

wing328 commented Sep 21, 2021

cc @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02)

@wing328
Copy link
Member

wing328 commented Oct 2, 2021

Ruby tests with updated samples passed via https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds/238968179.

I'll update samples after merging this PR into master.

@wing328 wing328 merged commit 0eb7189 into OpenAPITools:master Oct 2, 2021
if @config.debugging
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
end
end
request.headers = header_params
request.body = req_body
request.options = OpenStruct.new(req_opts)
Copy link
Contributor

Choose a reason for hiding this comment

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

@wing328 @NivathaSV8 I've been attempting to use this feature in a generated ruby SDK, as well as add the ability to directly return the binary media data gotten for a file. It appears to me that this PR has broken the functionality of the code fixed in #7842. While the temp file is created, the file is empty, and directly returning the binary data shows that @stream is empty. Prior to this PR, this seemed to work properly, and the culprit appears to be this line (89), as removing it allows the temp file to be created properly and the binary media return I'm working on in #11254 to work as well. I'm still fairly new to ruby, so I may be missing something here, but is there any way this issue could be validated? I've generated the SDK with version 5.3.1 of the CLI that was current as of 1/7/2021. I'm happy to provide more of my findings about this issue to help fix it, but I'd like to make sure I'm not incorrectly using this feature first. Any explanation as to why I might be seeing this issue and what could be done to fix it is greatly appreciated, thanks!

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.

None yet

3 participants