Skip to content

Conversation

@osulzhenko
Copy link
Collaborator

🔧 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 requested a review from marki1an September 25, 2025 12:47
@osulzhenko osulzhenko self-assigned this Sep 25, 2025
@osulzhenko osulzhenko added the tests Functional or other tests label Sep 25, 2025
@osulzhenko osulzhenko added work in progress Signals not finished work and removed work in progress Signals not finished work labels Oct 9, 2025
Comment on lines 1 to 11
package org.prebid.server.functional.model.config

import groovy.transform.ToString

@ToString(includeNames = true, ignoreNulls = true)
class Audience {
String provider
List<AudienceId> ids
String keyspace
Integer rtbSegtax
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. Please add an empty line
  2. keyspace and rtbSegtax unused variable

Comment on lines 6 to 7
class AudienceId {
String id
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just add empty line

Comment on lines 12 to 13
boolean enabled
int ttlSeconds
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 boolean and int like Object in order to possibly have null.

Comment on lines +13 to +15
String apiKey
String tenant
String origin
Copy link
Collaborator

Choose a reason for hiding this comment

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

apiKey, tenant, origin, unused fields, add it into default method or remove

when: "PBS processes auction request"
prebidServerStoredCacheService.sendAuctionRequest(bidRequest)

then: "PBS should update metrics for new saved text storage cache"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wrong description


then: "PBS should update metrics for new saved text storage cache"
def metrics = prebidServerStoredCacheService.sendCollectedMetricsRequest()
assert metrics[METRIC_CREATIVE_SIZE_TEXT] == getTargetingResultSize(targetingResult)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use in line since one use case encodeBase64(encode(result).bytes).size()

def targetingResult = getBodyByRequest(bidRequest)
mockServerClient.when(request()
.withMethod("GET")
.withPath('/stored-cache'), Times.unlimited(), TimeToLive.unlimited(), -10)
Copy link
Collaborator

Choose a reason for hiding this comment

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

'/stored-cache' can be raplaced with endpoint

}

TargetingResult setCachedTargetingResponse(BidRequest bidRequest) {
def targetingResult = getBodyByRequest(bidRequest)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe better to direct pass targetingResult without returning the same object?


void setCachingResponse(HttpStatusCode statusCode = NO_CONTENT_204) {
mockServerClient.when(request()
.withMethod("POST")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you sure that should be POST here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure, that for BasicPbcStorageService.storeEntry

def gdprConsent = bidRequest.user?.consent

[gdprConsent != null ? "&gdpr_consent=${gdprConsent}" : null,
"&gdpr=${gdpr ? 1 : 0}",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can be regs?.gdpr in line(meaning no need variable for it)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It should be either 1 or 0, but with regs?.gdpr, it can be null.

…s/module-storage-metrics

# Conflicts:
#	src/test/groovy/org/prebid/server/functional/model/ModuleName.groovy
#	src/test/groovy/org/prebid/server/functional/model/config/ModuleHookImplementation.groovy
#	src/test/groovy/org/prebid/server/functional/model/config/PbsModulesConfig.groovy
@osulzhenko osulzhenko requested a review from marki1an October 21, 2025 11:58
@osulzhenko osulzhenko merged commit 560231b into module-storage-metrics Oct 22, 2025
1 check passed
@osulzhenko osulzhenko deleted the functional-tests/module-storage-metrics branch October 22, 2025 08:46
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