Prebid 11: toss mediatype mismatch bids; avoid mediaType mismatch rejects when adapter omits mediaType#14496
Open
patmmccann wants to merge 1 commit intoprebid-11.0from
Open
Prebid 11: toss mediatype mismatch bids; avoid mediaType mismatch rejects when adapter omits mediaType#14496patmmccann wants to merge 1 commit intoprebid-11.0from
patmmccann wants to merge 1 commit intoprebid-11.0from
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.
redoes #14468 on the 11 branch as review indicated it might be breaking
Motivation
mediaTypefrom having their bids rejected due tocreateBid()defaultingmediaTypeto'banner'.mediaType.Description
responseMediaTypeparameter propagated viaaddBidWithCode()intoisValid()so the code can distinguish an adapter-omittedmediaTypefrom an explicit one.mediaTypeby passingnullwhenmediaTypeis not an own property of the adapter response; only enforce the ad-unit vs response media-type guard whenresponseMediaTypeis non-null.isValid()signature to accept{responseMediaType}and run the media-type compatibility check against the ad unit only whenresponseMediaType != null.test/spec/unit/core/bidderFactory_spec.jsthat cover rejecting explicit mismatches, accepting explicit matches, and skipping the guard when the adapter omittedmediaType.Testing
npx eslint --cache --cache-strategy contentandnpx gulp lint --files 'src/adapters/bidderFactory.ts,test/spec/unit/core/bidderFactory_spec.js'completed successfully.npx gulp test --nolint --file test/spec/unit/core/bidderFactory_spec.jscompleted successfully (tests passed).src/adapters/bidderFactory.tsandtest/spec/unit/core/bidderFactory_spec.jsand the updated tests validate the new behavior.Codex Task