-
Notifications
You must be signed in to change notification settings - Fork 766
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
DSA: Inject default in bid requests if not present #3540
Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
23eca73
Add account config
bsardo 9cddf2b
Add DSA writer to insert default DSA in requests
bsardo e0c174e
Use DSA writer to insert default into each bidder request
bsardo a424d16
Add DSA default JSON test with test framework update
bsardo 3d0a754
Insert default into request before splitting into bidder requests
bsardo ea58098
Change DataToPub to a pointer
bsardo 2da4088
Rename dsawriter.go to writer.go
bsardo 1bc45e6
Update variable name
bsardo 3828209
Address feedback
bsardo d2ec47e
Update host config to accept DSA default as stringified JSON and map …
bsardo 94857a3
Update exchange JSON test to accept stringified JSON in account config
bsardo e202460
Convert UnpackDSADefault from receiver method to function for use in …
bsardo c6c0d6f
Update account fetching to validate default DSA and unpack to struct
bsardo 2ee9652
Update DSA writer to use unpacked default
bsardo 8c29cb1
Handle error returned from RebuildRequest
bsardo ff93f52
Merge branch 'master' into DSA-3424
bsardo 5729ab7
Group related conditions in Write
bsardo bdfca44
Feedback: error msg, env vars, minor refactor
bsardo f216c82
Clone DSA default unpacked and set on request
bsardo bcf23f3
Add integration test where default is ignored due to DSA on request
bsardo 59309eb
Return error from RebuildRequest call
bsardo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Group related conditions in Write
- Loading branch information
commit 5729ab79855873c8db13ebe871743f29b61fb4f9
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 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is a stronger version of the function, but here's a version where we combine all of the conditions that result in us returning nil, rather than breaking them all up:
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is really a matter of preference. I see your perspective that there are multiple conditionals that result in the same return value, though my tendency is to break complex conditionals into logical groupings because I think it is easier to digest and instills confidence in the intended behavior. I also think it is easier to scan code vertically. In that case, at a minimum the first two conditionals could be grouped as such:
if req == nil || getReqDSA(req) != nil {
.@SyntaxNode do you feel strongly either way here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm thinking your latest update looks great