OpenRTB: Fix request model types and preserve missing fields - #4626
OpenRTB: Fix request model types and preserve missing fields#4626pavel-ptashyts wants to merge 2 commits into
Conversation
CTMBNara
left a comment
There was a problem hiding this comment.
Check whether you need to add any logic to BidRequestOrtbVersionConverter.
Also, update ProtobufRequestUtils if needed
There was a problem hiding this comment.
Removed OpenRtbRequestModelTest as requested. The protobuf mapping changes are covered in the existing ProtobufRequestUtilsTest, and content preservation scenarios were added to the existing OrtbConverterSpec.
There was a problem hiding this comment.
Removed this file. The field/version explanations remain in the model JavaDoc and PR description.
|
Thanks for the review. I updated I also checked both The requested document and generic DTO test class are removed. I added scenarios to Validation: all 55 focused protobuf/version-converter Java tests pass, Checkstyle passes, and the Groovy scenarios compile. I attempted the new scenarios with a rebuilt server Docker image, but the local run stalled during global Testcontainers setup while copying files into MySQL, before any scenarios executed; I stopped that run rather than reporting it as passed. |
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 thelivestreamJavaDoc 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 shared model without losing them. Their JavaDoc explains 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.ProtobufRequestUtilsnow maps all six legacy fields to their existing protobuf counterparts. The bundled protobuf schema does not define the other 2.6 fields added or corrected here, so this PR does not add protobuf tags or invent extension mappings for them.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.
The 2.5/2.6 converters were checked: these fields introduce no new
ext-to-root relocation. Their existing behavior of retaining newer content and media fields for older adapters is preserved.Test plan
ProtobufRequestUtilsTest, both request version-converter test classes andBidRequestOrtbVersionConverterFactoryTest. Checkstyle passed; production, Java test and Groovy functional test sources compiled.OrtbConverterSpecscenarios cover content metadata anddata.cidsin site/app/DOOH for 2.5 and 2.6 adapters, including zero flags and leading-zero identifiers. These scenarios compile. A local Docker run using the rebuilt server image was attempted but stopped during global Testcontainers setup: the JVM waited inCopyArchiveToContainerCmdwhile copying files into MySQL, before any scenarios ran. No functional pass is claimed.The generic DTO round-trip test class and separate compatibility document were removed following review.
Quality check
The existing JaCoCo configuration excludes
com/iab/openrtb/**; no DTO coverage percentage is claimed.