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

Unruly: dynamic bid response array size #3644

Merged
merged 3 commits into from
May 22, 2024

Conversation

bhainesnexxen
Copy link
Contributor

Though it doesn't seem to matter, we decided that the static size of 5 was unacceptable. Dynamically size the array like other adapters.

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, 2b85ca0

unruly

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:27:	MakeRequests		84.6%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:53:	preProcess		72.0%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:93:	MakeBids		94.7%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:137:	getBidCount		100.0%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:145:	getMediaTypeForImp	92.9%
total:									(statements)		85.7%

@@ -113,7 +113,8 @@ func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest
}}
}

bidResponse := adapters.NewBidderResponseWithBidsCapacity(5)
count := getBidCount(bidResp)
bidResponse := adapters.NewBidderResponseWithBidsCapacity(count)
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of computing count. could use length of internalRequest.imps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, missed this comment. Fixed.

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, 9c31ea4

unruly

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:27:	MakeRequests		84.6%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:53:	preProcess		72.0%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:93:	MakeBids		94.4%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:136:	getMediaTypeForImp	92.9%
total:									(statements)		84.7%

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, 389f272

unruly

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:27:	MakeRequests		84.6%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:53:	preProcess		72.0%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:93:	MakeBids		95.2%
github.com/prebid/prebid-server/v2/adapters/unruly/unruly.go:142:	getMediaTypeForImp	92.9%
total:									(statements)		85.3%

@onkarvhanumante onkarvhanumante merged commit a939c4b into prebid:master May 22, 2024
5 checks passed
mefjush pushed a commit to adhese/prebid-server that referenced this pull request Jul 19, 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.

3 participants