-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VSRE-414: Get TeamCity CI working (#9)
This gets TeamCity CI working again on the version of this gem's code from #4. We've decided that all the changes since then should be undone. #6 has already been reverted, but #5 couldn't be done in isolation. It was opened, after all, because the code from #4 no longer passed. I structured this into two commits. The first is a revert of #5. The second is the set of test/development fixes to get TeamCity CI passing. There are no changes to the actual gem code, so this does not need to be published as a new version. Details: - Update to a recent version of Ruby - Use some Ruby `prepend` magic to normalize the `Thrift:ThinHTTPServer::RackApplication` response. In most cases, a Rack app can return either an array of `[status, header, body]` or a `Rack::Response` that encapsulates the three. The former is technically the only form permitted by the Rack specification, while the latter is what's returned by `Thrift:ThinHTTPServer`. This wasn't a problem when `faraday_http_client_transport_spec.rb` was originally written, but since then `Rack::Lint` has been updated to allow only the array response. I don't know why `Thrift:ThinHTTPServer` hasn't been updated to fix this, but this workaround is the simplest solution. See https://github.com/apache/thrift/blob/1d6a3262cf32d5063cfcb9ee09355aa1315e7f80/lib/rb/lib/thrift/server/thin_http_server.rb#L73 for the server code and rack/rack@6ab28c2 for the linter change. - Regenerate the thrift files for the test with the latest Thrift version. The old version was causing issues because it was expecting to receive a payload containing just the serialzed object, while what was actually being sent had a header that needed to be read first. This can be seen in the diff for `YetiThriftTest::SimpleService::Client#recv_mutate`. Command used: `thrift -o spec/support --gen rb -I thrift spec/thrift/spec.thrift` - Include `active_support` explicitly in a test that now needs it. - Allow newer versions of `rspec` (3.x instead of 3.0.x) to work with the latest version of `rake`. - Require `rack` v2.x for development only, since the `thin` web server used for testing does not work with `rack` 3.x I intentionally did not try to add cloudbuild support back in. That can be done as a follow-on
- Loading branch information
Mark Kostick
authored
Jun 16, 2023
1 parent
14ac2b5
commit 1eb5246
Showing
9 changed files
with
97 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
require 'spec_helper' | ||
require 'active_support' | ||
|
||
describe Thrift::Struct_Union, 'timestamp' do | ||
|
||
|
27 changes: 27 additions & 0 deletions
27
spec/lib/gem_ext/thrift/transport/faraday_http_client_transport_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters