-
Notifications
You must be signed in to change notification settings - Fork 762
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
Flipp + Alkimi: Minor Refactoring #3622
Conversation
Code coverage summaryNote:
alkimiRefer here for heat map coverage report
flippRefer here for heat map coverage report
|
@@ -59,12 +63,12 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E | |||
adapterRequests = append(adapterRequests, adapterReq) | |||
} | |||
if len(adapterRequests) == 0 { | |||
return nil, append(errors, fmt.Errorf("adapterRequest is empty")) |
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.
There's no need for fmt.Errorf
with a fixed string. Hoisted the error to a top level variable to be more sensitive to allocations.
// Builder builds a new instance of the Flipp adapter for the given bidder with the given config. | ||
func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { | ||
uuidGenerator = uuidutil.UUIDRandomGenerator{} |
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.
The uuidGenerator
should be scoped to the adapter instance per our rules. This is to avoid memory access issues if there are adapter aliases specified.
@SyntaxNode The change looks fine on alkimi adapter. Thanks. |
@SyntaxNode the changes on Flipp adapter looks good. Thank you for making those! |
I was reviewing the code to see if any new adapters needed to have ImpIDs added. We're all good though, thanks very much to @pmsaurabh-narkhede.
It was harder for me to quickly see the ImpIDs implementation for Flipp + Alkimi, so I'm proposing a minor refactor to make it easier. Also noticed some policy violations in Flipp and are correcting them here.
Flipp: @hasan-kanjee
Alkimi: @kalidas-alkimi