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

Required some size to exist on banner requests #646

Merged
merged 2 commits into from
Oct 12, 2018

Conversation

dbemiller
Copy link
Contributor

In #644, I found this test which wasn't testing what it thought it was.

It intended to make sure we reject sizeless banners... but it was failing for other reasons.

Unfortunately, this is now a breaking change :(. Still probably better late than never. We can measure its true impact whenever we release it.

@@ -355,6 +355,11 @@ func validateBanner(banner *openrtb.Banner, impIndex int) error {
return fmt.Errorf("request.imp[%d].banner uses unsupported property: \"hmax\". Use the \"format\" array instead.", impIndex)
}

hasRootSize := banner.H != nil && banner.W != nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't this be banner.H != nil || banner.W != nil? We need both for a size.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is defining hasRootSize, in the positive. Like you said, we need both to have one.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Doh, my bad.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

all good. It did point me to the fact that you could still set these to 0, which isn't helpful either.

I added some logic for that & a few more tests.

@dbemiller dbemiller added the breaking change - callers Has breaking API changes for those calling Prebid Server endpoints label Aug 6, 2018
hhhjort
hhhjort previously approved these changes Aug 6, 2018
Copy link
Collaborator

@hhhjort hhhjort left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@hhhjort hhhjort left a comment

Choose a reason for hiding this comment

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

LGTM

@dbemiller dbemiller merged commit 9eaff5a into master Oct 12, 2018
@dbemiller dbemiller deleted the require-banner-sizes branch October 12, 2018 13:54
katsuo5 pushed a commit to flux-dev-team/prebid-server-1 that referenced this pull request Dec 1, 2020
* Required some size to exist on banner requests.

* Added more tests. Fixed the code a bit.
katsuo5 pushed a commit to flux-dev-team/prebid-server-1 that referenced this pull request Dec 2, 2020
* Required some size to exist on banner requests.

* Added more tests. Fixed the code a bit.
katsuo5 pushed a commit to flux-dev-team/prebid-server-1 that referenced this pull request Dec 4, 2020
* Required some size to exist on banner requests.

* Added more tests. Fixed the code a bit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change - callers Has breaking API changes for those calling Prebid Server endpoints
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants