Repository navigation
Keep failure BidInfo free of an earlier bid - #1048
Merged
Merged
Conversation
1 task done
mdanylov-sigma
force-pushed
the
fix/bidinfo-native-cache-and-request-id
branch
from
November 14, 2026 22:59
7b2ddf4 to
e7bd2db
Compare
- AdUnit kept the previous response until the next network callback, so a fetch that failed validation (no network, empty account id) returned the earlier response's keywords, price and request id with the failure code. fetchDemand now clears it first. - BidInfo.getRequestId documented the id as set whenever a response was received, but NO_BIDS and NO_CACHED_BIDS are reported without the response, including a parsed one that filterOutUncachedBids emptied. The doc now states it is set for SUCCESS and null otherwise. Follow-up to #1035. The native double cache save this branch also fixed landed on master with #1047. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mdanylov-sigma
force-pushed
the
fix/bidinfo-native-cache-and-request-id
branch
from
November 30, 2026 11:55
e7bd2db to
cbb5fd6
Compare
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.
Follow-up to #1035, from the review of #1047.
Changes
AdUnitkept the previous response until the next network callback, so a fetch that failed validation (no network, empty account id, invalid size) returned the earlier response's keywords, price and request id with the failure code.fetchDemand(Object, OnCompleteListener)now clears it first. TheOnCompleteListenercallbacks don't read that response, so they are unchanged.getRequestId()doc. It said the id is set whenever a response was received, butNO_BIDSandNO_CACHED_BIDSare reported without the response, including a parsed one thatfilterOutUncachedBidsemptied. The doc now says it is set forSUCCESS(even with no designated bid) andnullfor any other result. The Mediation API passes the response only withSUCCESS, so the same holds there.This branch also fixed the native bid being saved to
CacheManagertwice. #1047 landed its own fix for that (NativeAdUnit.createBidInfopasses the listener's cache id toBidInfo.create), with tests, so that part was dropped when rebasing onto master.Test plan
AdUnitTestcases check that a validation failure after an earlier response reports only the result code, throughfetchDemandBidInfoandfetchDemand(OnFetchDemandResult). Both fail without theAdUnitchange (they get the earlier keywords) and pass with it, re-checked on the rebased branch.:PrebidMobile-core:testDebugUnitTestlocally on the rebased branch: 1585 tests. The 3 failures also fail on master at 18e416d (MraidInternalBrowserActionTest.handleInternalBrowserActionFollowUrlSuccessAndIsMraid_StartActionViewActivity,InterstitialAdUnitTest.onPrebidSdkWin_serverIsMuted_rendersFromAMutedCopyAndKeepsTheAdUnitUnmuted,RewardedAdUnitTest.onPrebidSdkWin_rendersFromACopyThatSharesTheAdUnitRewardManager).🤖 Generated with Claude Code