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

New Adapter: Connatix #3916

Merged
merged 36 commits into from
Dec 10, 2024
Merged

New Adapter: Connatix #3916

merged 36 commits into from
Dec 10, 2024

Conversation

patrickszeleczki
Copy link
Contributor

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 08242be

connatix

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:23:	Builder			80.0%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:35:	MakeRequests		66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:81:	MakeBids		80.0%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:121:	validateAndBuildImpExt	66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:134:	validateConnatixExt	66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:143:	splitRequests		90.9%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:185:	buildRequestImp		66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:233:	buildDisplayManageVer	55.6%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:251:	getBidType		100.0%
total:									(statements)		74.5%

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 55ec262

connatix

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:23:	Builder			80.0%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:35:	MakeRequests		66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:81:	MakeBids		80.0%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:121:	validateAndBuildImpExt	66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:134:	validateConnatixExt	66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:143:	splitRequests		90.9%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:185:	buildRequestImp		66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:233:	buildDisplayManageVer	55.6%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:251:	getBidType		100.0%
total:									(statements)		74.5%

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 28ed966

connatix

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:23:	Builder			80.0%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:35:	MakeRequests		66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:81:	MakeBids		80.0%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:121:	validateAndBuildImpExt	66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:134:	validateConnatixExt	66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:143:	splitRequests		90.9%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:185:	buildRequestImp		66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:233:	buildDisplayManageVer	55.6%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:251:	getBidType		100.0%
total:									(statements)		74.5%

Copy link

github-actions bot commented Oct 2, 2024

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 4c7a620

connatix

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:23:	Builder			80.0%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:35:	MakeRequests		66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:81:	MakeBids		80.0%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:121:	validateAndBuildImpExt	66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:134:	validateConnatixExt	66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:143:	splitRequests		92.9%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:197:	buildRequestImp		66.7%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:245:	buildDisplayManageVer	55.6%
github.com/prebid/prebid-server/v2/adapters/connatix/connatix.go:263:	getBidType		100.0%
total:									(statements)		75.9%

@przemkaczmarek
Copy link
Collaborator

@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%.

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 5e74e5c

connatix

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:24:	Builder			80.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:36:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:82:	MakeBids		80.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:122:	validateAndBuildImpExt	83.3%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:135:	validateConnatixExt	100.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:144:	splitRequests		92.9%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:198:	buildRequestImp		90.5%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:246:	buildDisplayManageVer	55.6%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:264:	getBidType		100.0%
total:									(statements)		87.9%

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 38d26e9

connatix

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:24:	Builder			80.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:36:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:71:	MakeBids		95.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:111:	validateAndBuildImpExt	100.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:120:	splitRequests		93.1%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:176:	buildRequestImp		100.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:218:	buildDisplayManagerVer	88.9%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:236:	getBidType		100.0%
total:									(statements)		95.2%

@patrickszeleczki
Copy link
Contributor Author

@bsardo Thanks a lot for the thorough review and I really appreciate the clear suggestions for the new tests and the small improvement suggestions! 🙇

@patrickszeleczki
Copy link
Contributor Author

ping @bsardo @przemkaczmarek
thank you!

Copy link
Collaborator

@bsardo bsardo left a 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.

Comment on lines 25 to 33
uri, err := url.Parse(config.Endpoint)
if err != nil {
return nil, err
}

bidder := &adapter{
uri: *uri,
}
return bidder, nil
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

)

type adapter struct {
uri url.URL
Copy link
Collaborator

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
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment on lines 37 to 40
if request.Device != nil && request.Device.IP == "" && request.Device.IPv6 == "" {
return nil, []error{&errortypes.BadInput{
Message: "Device IP is required",
}}
Copy link
Collaborator

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?

Copy link
Contributor Author

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
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link

github-actions bot commented Dec 3, 2024

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, b4b1be2

connatix

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:24:	Builder			80.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:36:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:71:	MakeBids		95.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:111:	validateAndBuildImpExt	100.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:120:	splitRequests		93.1%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:176:	buildRequestImp		100.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:218:	buildDisplayManagerVer	88.9%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:236:	getBidType		100.0%
total:									(statements)		95.2%

Copy link

github-actions bot commented Dec 3, 2024

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, a8891b9

connatix

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:23:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:30:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:65:	MakeBids		95.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:105:	validateAndBuildImpExt	100.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:114:	splitRequests		93.1%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:170:	buildRequestImp		100.0%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:212:	buildDisplayManagerVer	88.9%
github.com/prebid/prebid-server/v3/adapters/connatix/connatix.go:230:	getBidType		100.0%
total:									(statements)		96.1%

@patrickszeleczki
Copy link
Contributor Author

@bsardo @przemkaczmarek do you have any estimate when this will be included in a release? thank you!

@bsardo bsardo merged commit f46883b into prebid:master Dec 10, 2024
5 checks passed
scr-oath pushed a commit to scr-oath/prebid-server that referenced this pull request Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants