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 tests Functional or other tests blocked labels Feb 18, 2025
@osulzhenko osulzhenko requested a review from marki1an February 18, 2025 21:27
@osulzhenko osulzhenko self-assigned this Feb 18, 2025
…support-gpp-usnat-v2

# Conflicts:
#	src/test/groovy/org/prebid/server/functional/tests/privacy/GppCookieSyncSpec.groovy
#	src/test/groovy/org/prebid/server/functional/tests/privacy/GppSyncUserActivitiesSpec.groovy
#	src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitUfpdActivitiesSpec.groovy
#	src/test/groovy/org/prebid/server/functional/util/privacy/gpp/GppConsent.groovy
#	src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsUtV1Consent.groovy
#	src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsVaV1Consent.groovy
#	src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsCaV1Consent.groovy
#	src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsCoV1Consent.groovy
#	src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsCtV1Consent.groovy
#	src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsNatV1Consent.groovy
@osulzhenko osulzhenko force-pushed the functional-tests/support-gpp-usnat-v2 branch from 623fee2 to c4a5902 Compare November 21, 2025 12:30
Comment on lines 429 to 430
.setMspaServiceProviderMode(MspaMode.YES)
.setMspaServiceProviderMode(MspaMode.NO)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Dublication

def cookieSyncRequest = CookieSyncRequest.defaultCookieSyncRequest.tap {
it.gppSid = US_NAT_V1.value
it.account = accountId
it.gpp = 'DBABLA~CAAAAAAAAASA.QA' // new UsNatV2Consent.Builder().setKnownChildSensitiveDataConsents(new UsNationalV2ChildSensitiveData(childFrom16to17: DataActivity.NO_CONSENT))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use UsNatV2Consent instead of string

]
}

def "PBS cookie sync call when privacy module contain some part of of disallow logic US nat v2 validation should exclude bidders URLs"() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Weird naming

]
}

def "PBS cookie sync call when privacy module contain some part of of disallow logic US nat v2 validation should exclude bidders URLs"() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also add negative scenario

Comment on lines 712 to 713
.setMspaServiceProviderMode(MspaMode.YES)
.setMspaServiceProviderMode(MspaMode.NO)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here

Comment on lines 1166 to 1169
and: "Generic bidder request should have data in EIDS fields"
assert bidderRequest.user.eids == bidRequest.user.eids
where:
disallowGppLogic << [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add empty line

]
}

def "PBS auction call when privacy module contain some part of disallow raw logic US nat v2 validation should remove UFPD fields in request"() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same weird naming

Copy link
Collaborator

Choose a reason for hiding this comment

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

What mean "some part"?

Comment on lines 1170 to 1173
'DBABLA~CAAAqqiqqgCA.QA', //SensitiveDataProcessing[1-7,9-16]=2
'DBABLA~CAAAVUAERACA.QA', //SensitiveDataProcessing[1-5,11,13,15]=1
'DBABLA~CAAAABRREQCA.QA', //SensitiveDataProcessing[6,7,9,10,12,14,16]=1
'DBABLA~CAAAACiiIgCA.QA' //SensitiveDataProcessing[6,7,9,10,12,14,16]=2
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not obj?


import com.fasterxml.jackson.annotation.JsonValue

enum DataActivity {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't see zero value in define doc

KnownChildSensitiveDataConsents, PersonalDataConsents, SensitiveDataProcessing:

1 - No Consent
2 - Consent

Copy link
Collaborator Author

Comment on lines 8 to 9
YES(1),
NO(2)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Raname to PROVIDED(1), NOT_PROVIDED(2) correspoding to doc.

SaleOptOutNotice, SharingNotice, TargetedAdvertisingOptOutNotice, SensitiveDataProcessingOptOutNotice, SensitiveDataLimitUseNotice:

0 - Not Applicable
1 - Notice was provided
2 - Notice was not provided


class UsCaliforniaV1ChildSensitiveData {

DataActivity childBlow13
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor: renama please to childUnder13

Comment on lines 15 to 40
static UsColoradoV1SensitiveData generateRandomSensitiveData() {
new UsColoradoV1SensitiveData().tap {
racialEthnicOrigin = PBSUtils.getRandomEnum(DataActivity)
religiousBeliefs = PBSUtils.getRandomEnum(DataActivity)
healthInfo = PBSUtils.getRandomEnum(DataActivity)
orientation = PBSUtils.getRandomEnum(DataActivity)
citizenshipStatus = PBSUtils.getRandomEnum(DataActivity)
geneticId = PBSUtils.getRandomEnum(DataActivity)
biometricId = PBSUtils.getRandomEnum(DataActivity)
}
}

static UsColoradoV1SensitiveData fromList(List<DataActivity> data) {
if (data.size() != 7) {
throw new IllegalArgumentException("Invalid data size. Expected 7 values.")
}
new UsColoradoV1SensitiveData().tap {
racialEthnicOrigin = data[0]
religiousBeliefs = data[1]
healthInfo = data[2]
orientation = data[3]
citizenshipStatus = data[4]
geneticId = data[5]
biometricId = data[6]
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Each class contains code that isn’t used, so the question is: do we need it?

new UsCtV1Consent.Builder().build() | US_CT_V1
}

def "PBS auction call when request have disallow logic US nat v2 validation should call bid adapter"() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Weird naming — I literally can’t understand what this test is doing.

@osulzhenko osulzhenko requested a review from marki1an November 27, 2025 11:08
GppDataActivity childSensitive

static UsColoradoV1ChildSensitiveData getDefault(GppDataActivity childSensitive = GppDataActivity.NOT_APPLICABLE) {

Copy link
Collaborator

Choose a reason for hiding this comment

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

Empty line

Comment on lines 509 to 514
new UsNatV2Consent.Builder()
.setSharingOptOut(OptOut.DID_NOT_OPT_OUT)
.build(),
new UsNatV2Consent.Builder()
.setSharingOptOut(OptOut.DID_NOT_OPT_OUT)
.build(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Duplication logic

Comment on lines 855 to 860
new UsNatV2Consent.Builder()
.setSharingOptOut(OptOut.DID_NOT_OPT_OUT)
.build(),
new UsNatV2Consent.Builder()
.setSharingOptOut(OptOut.DID_NOT_OPT_OUT)
.build()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here also

assert bidderRequest.user.eids == bidRequest.user.eids

where:
usNationalV2SensitiveData << [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please check on unique values)

@osulzhenko osulzhenko requested a review from marki1an November 28, 2025 10:32
Comment on lines 2804 to 2806
new UsNatV2Consent.Builder()
.setSaleOptOut(OptOut.DID_NOT_OPT_OUT)
.build(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here also duplication :)

@osulzhenko osulzhenko requested a review from marki1an November 28, 2025 11:23
@osulzhenko osulzhenko merged commit cedc939 into support-gpp-usnat-v2 Nov 28, 2025
1 check passed
@osulzhenko osulzhenko deleted the functional-tests/support-gpp-usnat-v2 branch November 28, 2025 17:23
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