Skip to content

Conversation

@osulzhenko
Copy link
Collaborator

@osulzhenko osulzhenko commented Feb 18, 2025

🔧 Type of changes

  • new bid adapter
  • bid adapter update
  • new feature
  • new analytics adapter
  • new module
  • module update
  • bugfix
  • documentation
  • configuration
  • dependency update
  • tech debt (test coverage, refactorings, etc.)

✨ What's the context?

What's the context for the changes?

🧠 Rationale behind the change

Why did you choose to make these changes? Were there any trade-offs you had to consider?

🔎 New Bid Adapter Checklist

  • verify email contact works
  • NO fully dynamic hostnames
  • geographic host parameters are NOT required
  • direct use of HTTP is prohibited - implement an existing Bidder interface that will do all the job
  • if the ORTB is just forwarded to the endpoint, use the generic adapter - define the new adapter as the alias of the generic adapter
  • cover an adapter configuration with an integration test

🧪 Test plan

How do you know the changes are safe to ship to production?

🏎 Quality check

  • Are your changes following our code style guidelines?
  • Are there any breaking changes in your code?
  • Does your test coverage exceed 90%?
  • Are there any erroneous console logs, debuggers or leftover code in your changes?

@osulzhenko osulzhenko added the tests Functional or other tests label Feb 18, 2025
@osulzhenko osulzhenko requested a review from marki1an February 18, 2025 13:26
@osulzhenko osulzhenko self-assigned this Feb 18, 2025
@osulzhenko osulzhenko changed the title Functional tests for prebid cache trace ability Functional tests for prebid cache traceability Feb 18, 2025
import org.prebid.server.functional.model.response.auction.Adm
import org.prebid.server.functional.model.response.auction.BidResponse
import org.prebid.server.functional.util.PBSUtils
import spock.lang.IgnoreRest
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove redundant import

Comment on lines 23 to 34
private final static String PBS_API_HEADER = 'x-pbc-api-key'
private static final Integer MAX_DATACENTER_REGION_LENGTH = 4

private final static String XML_CREATIVE_SIZE_METRIC = "account.%s.prebid_cache.creative_size.xml"
private final static String JSON_CREATIVE_SIZE_METRIC = "account.%s.prebid_cache.creative_size.json"
private final static String XML_CREATIVE_TTL_METRIC = "account.%s.prebid_cache.creative_ttl.xml"
private final static String JSON_CREATIVE_TTL_METRIC = "account.%s.prebid_cache.creative_ttl.json"
private final static String CACHE_REQUEST_OK_METRIC = "account.%s.prebid_cache.requests.ok"
private final static String XML_CREATIVE_SIZE_GENERAL_METRIC = "prebid_cache.creative_size.xml"
private final static String JSON_CREATIVE_SIZE_GENERAL_METRIC = "prebid_cache.creative_size.json"
private final static String OK_GENERAL_METRIC = "prebid_cache.requests.ok"

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use one order for all variables (like private static final TYPE NAME)

Copy link
Collaborator

Choose a reason for hiding this comment

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

We specified general metrics but not specified for accounts.
Maybe better to specify them

Comment on lines 163 to 165
and: "Set bidder response"
def bidResponse = BidResponse.getDefaultBidResponse(bidRequest)
bidder.setResponse(bidRequest.id, bidResponse)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need the bidder's response?

@osulzhenko osulzhenko requested a review from marki1an February 19, 2025 13:07
Comment on lines 173 to 174
and: "PBS cache key should have length equal to default UUID"
assert cacheKey.length() == UUID.randomUUID().toString().length()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe it's better to specify certain values for the length instead of generating them each time?

def pbsService = pbsServiceFactory.getService(pbsConfig)

and: "Default BidRequest with cache, targeting and large account ID"
def bidRequest = BidRequest.defaultBidRequest
Copy link
Collaborator

Choose a reason for hiding this comment

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

I hope it's almost a coding style for us to use tap.{} for bidRequest.

@osulzhenko osulzhenko requested a review from marki1an February 19, 2025 15:20
@osulzhenko osulzhenko merged commit 4d9449a into prebid-cache-traceability Feb 20, 2025
1 check passed
@osulzhenko osulzhenko deleted the functional-tests/prebid-cache-traceability branch February 20, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Functional or other tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants