OpenRTB: Fix request model types and preserve missing fields - #4626
Open
pavel-ptashyts wants to merge 1 commit into
Open
OpenRTB: Fix request model types and preserve missing fields#4626pavel-ptashyts wants to merge 1 commit into
pavel-ptashyts wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of changes
What's the context?
The shared request model rejects alphanumeric OpenRTB 2.6 pod IDs and drops several content fields during JSON round trips. For example,
video.podid: "pod-001"cannot be decoded as an Integer, andcontent.genresandcontent.data[].cidsdisappear from the serialized request.Change
Video.podidandAudio.podidto String. AddContent.gtax,genres,realtime,firstbroadcast, andData.cids. Update thelivestreamdocumentation to distinguish scheduled broadcasts from real-time events, and explain the version-dependent interpretation.Also retain the legacy OpenRTB 2.5 fields
Banner.wmax/hmax/wmin/hmin,Video.protocol, andContent.videoqualityso a 2.5 request can pass through the model without losing them. Their JavaDoc and the compatibility documentation explain that they were removed in 2.6 in favor offormat,protocols, andprodq. Values remain independent; the model does not perform implicit conversion between legacy fields and their replacements.Rationale behind the change
Numeric JSON pod IDs are still accepted through existing Jackson coercion and are serialized as strings. Java consumers must update Integer pod ID builder arguments/getter usages to String and recompile. The separate video endpoint's numeric pod IDs are unchanged.
Test plan
Regression tests cover alphanumeric and numeric pod IDs, leading zeros, preservation of content fields in site/app/DOOH, zero-valued flags, empty arrays, omitted optional fields, and the legacy 2.5 fields alongside their replacements. Existing Groovy converter fixtures now use string pod IDs.
mvn teston JDK 25: 8,794 tests, 3 failures, 0 errors, 2 skipped. All 14 new regression tests pass, as do the OpenRTB version-converter tests. Checkstyle reports no violations.The three failures are existing
UidsCookieServiceTestcookie-size/order expectations:updateUidsCookieShouldNotFitPrioritizedFamilyWhenSizeExceedsLimitAndIncrementMetric,updateUidsCookieShouldFitPrioritizedFamily, andupdateUidsCookieShouldFitNonPrioritizedFamily. All three were reproduced by runningmvn test -Dtest=UidsCookieServiceTest -Dmaven.gitcommitid.skip=truein a clean archive of unchanged baseline commiteed9a61046072694d4b42b5aec7a852ceed3a188.After the final documentation/test cleanup, the focused run passed all 30 tests:
mvn test -Dtest=OpenRtbRequestModelTest,BidRequestOrtb25To26ConverterTest,BidRequestOrtb26To25ConverterTest. Checkstyle also passed.Groovy functional tests compile as part of the build; the Docker-based functional suite was not run.
Quality check
com/iab/openrtb/**; these DTOs have behavioral regression tests, but no coverage percentage is claimed.