-
Notifications
You must be signed in to change notification settings - Fork 749
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
New Adapter: Connatix #3916
New Adapter: Connatix #3916
Conversation
New Adapter: Connatix
Code coverage summaryNote:
connatixRefer here for heat map coverage report
|
Code coverage summaryNote:
connatixRefer here for heat map coverage report
|
Fix content type header
Code coverage summaryNote:
connatixRefer here for heat map coverage report
|
include ipv6 in ip validation and add headers
Code coverage summaryNote:
connatixRefer here for heat map coverage report
|
@patrickszeleczki Please add more JSON tests (Check which lines of code are not covered by tests). We usually approve PRs when the test coverage is more than 85%. |
Code coverage summaryNote:
connatixRefer here for heat map coverage report
|
Cnx adapter improvements
Code coverage summaryNote:
connatixRefer here for heat map coverage report
|
@bsardo Thanks a lot for the thorough review and I really appreciate the clear suggestions for the new tests and the small improvement suggestions! 🙇 |
ping @bsardo @przemkaczmarek |
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.
Looks good, just a couple more comments.
adapters/connatix/connatix.go
Outdated
uri, err := url.Parse(config.Endpoint) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
bidder := &adapter{ | ||
uri: *uri, | ||
} | ||
return bidder, nil |
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 see any endpoint params. You can simplify this to:
bidder := &adapter{
endpoint: config.Endpoint,
}
return bidder, nil
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.
fixed
adapters/connatix/models.go
Outdated
) | ||
|
||
type adapter struct { | ||
uri url.URL |
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 docs guidance is for this struct to be:
type adapter struct {
endpoint string
}
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.
fixed
adapters/connatix/connatix.go
Outdated
if request.Device != nil && request.Device.IP == "" && request.Device.IPv6 == "" { | ||
return nil, []error{&errortypes.BadInput{ | ||
Message: "Device IP is required", | ||
}} |
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.
Do you also want to report this error if request.Device == nil
?
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.
indeed. thank you! fixed
) | ||
|
||
const ( | ||
maxImpsPerReq = 1 |
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.
Why do you have a value of 1 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.
because right now we only support a single impression per request and it would be much simpler and clearer (for new devs too) to update this constraint when we will support multiple impressions per request
Code coverage summaryNote:
connatixRefer here for heat map coverage report
|
Small fixes to cnx adapter
Code coverage summaryNote:
connatixRefer here for heat map coverage report
|
@bsardo @przemkaczmarek do you have any estimate when this will be included in a release? thank you! |
Docs: prebid/prebid.github.io#5595