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

Add request_id option to client #133

Merged
merged 51 commits into from
Apr 23, 2018
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a6a0946
Add request_id option to client
funkyboy Apr 17, 2018
fef93a1
Simplify options setting
funkyboy Apr 17, 2018
67d06b8
Add request_id to connection error and timeouts
funkyboy Apr 17, 2018
1fc2ef8
Remove path munging
funkyboy Apr 17, 2018
5d3666c
Add ConnectionTimeout test with request_id
funkyboy Apr 17, 2018
1670bb1
Use urlsafe_base64 and a local var for request_id
funkyboy Apr 17, 2018
9357a13
Add request_id to printed exception
funkyboy Apr 17, 2018
55f18aa
Fix spacing
funkyboy Apr 17, 2018
a1f71d4
Use attr_reader to access add_request_ids
funkyboy Apr 17, 2018
d39e11c
Add request_id to Faraday request context
funkyboy Apr 18, 2018
d9b6b8f
Read request_id from Faraday context
funkyboy Apr 18, 2018
3e55b9e
Reorganize request_id generation tests
funkyboy Apr 18, 2018
a061d3b
Add test for UnauthorizedRequest nonce
funkyboy Apr 18, 2018
c227120
Fix frozen hash issue
funkyboy Apr 18, 2018
890ced2
Add test without request_id
funkyboy Apr 18, 2018
97febef
Rename test context
funkyboy Apr 18, 2018
dc6f216
Pass request_id in Exception options
funkyboy Apr 18, 2018
844a938
Fix fetching of request_id from Faraday context
funkyboy Apr 18, 2018
a7f1e29
Merge request_id with Faraday context options
funkyboy Apr 18, 2018
66259dc
Fix spacing and indentation
funkyboy Apr 18, 2018
21da79c
Rename random_request_id as request_id
funkyboy Apr 18, 2018
aca07ad
Declare request_id as a local var
funkyboy Apr 18, 2018
f5cfc0f
Fix indentation
funkyboy Apr 19, 2018
f99e186
Add test to check if request_id is the same at request and response time
funkyboy Apr 20, 2018
4159c51
Add request_id option to client
funkyboy Apr 17, 2018
c2478be
Simplify options setting
funkyboy Apr 17, 2018
daacf46
Add request_id to connection error and timeouts
funkyboy Apr 17, 2018
44d08b7
Remove path munging
funkyboy Apr 17, 2018
d531f5a
Add ConnectionTimeout test with request_id
funkyboy Apr 17, 2018
24435b8
Use urlsafe_base64 and a local var for request_id
funkyboy Apr 17, 2018
4425fb8
Add request_id to printed exception
funkyboy Apr 17, 2018
756b266
Fix spacing
funkyboy Apr 17, 2018
72eda17
Use attr_reader to access add_request_ids
funkyboy Apr 17, 2018
3308586
Add request_id to Faraday request context
funkyboy Apr 18, 2018
39a9b75
Read request_id from Faraday context
funkyboy Apr 18, 2018
eb87ad6
Reorganize request_id generation tests
funkyboy Apr 18, 2018
f0e3730
Add test for UnauthorizedRequest nonce
funkyboy Apr 18, 2018
8efa111
Fix frozen hash issue
funkyboy Apr 18, 2018
a34000f
Add test without request_id
funkyboy Apr 18, 2018
df94980
Rename test context
funkyboy Apr 18, 2018
2731ca7
Pass request_id in Exception options
funkyboy Apr 18, 2018
528c92a
Fix fetching of request_id from Faraday context
funkyboy Apr 18, 2018
7399f18
Merge request_id with Faraday context options
funkyboy Apr 18, 2018
48c6cfc
Fix spacing and indentation
funkyboy Apr 18, 2018
c2ab83c
Rename random_request_id as request_id
funkyboy Apr 18, 2018
705f143
Declare request_id as a local var
funkyboy Apr 18, 2018
0b33cdd
Fix indentation
funkyboy Apr 19, 2018
8b87e5f
Add test to check if request_id is the same at request and response time
funkyboy Apr 20, 2018
749d49c
Add test for request_id when fallback is on and the request is retried
funkyboy Apr 23, 2018
e17125c
Dup params only if needed
funkyboy Apr 23, 2018
0774a2d
Add note about request_id in the middleware request context
funkyboy Apr 23, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions spec/acceptance/rest/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,7 @@ def encode64(text)
end

context 'request_id generation' do
context 'Timeout error' do
Copy link
Member

Choose a reason for hiding this comment

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

Indentation issues here. Why did you add context & end without indenting the code?

let(:client_options) { default_options.merge(key: api_key, http_request_timeout: 0, add_request_ids: true) }
it 'includes request_id in ConnectionTimeout error' do
begin
Expand All @@ -972,3 +973,4 @@ def encode64(text)
end
end
end
end