Skip to content

Copper6 adapter: change utility suite - #14991

Merged
patmmccann merged 14 commits into
prebid:masterfrom
Vidazoo:adapter-copper6
Jul 28, 2026
Merged

Copper6 adapter: change utility suite #14991
patmmccann merged 14 commits into
prebid:masterfrom
Vidazoo:adapter-copper6

Conversation

@anna-y-perion

@anna-y-perion anna-y-perion commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Type of change

  • Bugfix

  • Feature

  • New bidder adapter

  • Updated bidder adapter

  • Code style update (formatting, local variables)

  • Refactoring (no functional changes, no api changes)

  • Build related changes

  • CI related changes

  • Does this change affect user-facing APIs or examples documented on http://prebid.org?

  • Other

Description of change

Other information

We have received the following email that approves start of our maintenance:
Perion Mail - Fwd_ Copper6 Prebid Adapter - now Operated by Vidazoo _ Perion.pdf

Related PRs:
prebid/prebid.github.io#6597
prebid/prebid-server#4812

@review-assignment-bot
review-assignment-bot Bot requested a review from lksharma June 4, 2026 06:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee4645d5a1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread modules/copper6BidAdapter.d.ts Outdated
bids: [
{
bidder: 'copper6ssp',
params: {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What are these params, it seems In order to not break existing integrations you'll need to figure out some sort of translation layer

@anna-y-perion anna-y-perion Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We explain this params in Documentation
https://github.com/prebid/prebid.github.io/pull/6597/changes
We have added these type recently
@typedef {import('./copper6sspBidAdapter.d.ts').Copper6SSPBidRequestParams} Copper6SSPBidRequestParams
I thought that this file was requested for additional clarity of the code.
Also I have changed the "ext" object and added comment to have some explanation. Do you think it is clearer now?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

your doc file has the wrong name, you can't force pubs to change params in a minor version so you should figure out how to translate what they do now to what you want

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see. I will work on it. Thank you

@anna-y-perion anna-y-perion Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@patmmccann we have internal discussion and have talked to Copper6 team to understand the impact on the partners that use the adapter. Copper6 team took responsibility of the requested change. The request initially came from them and they will manage all publishers accordingly. Please see the attached conversation.
Can it be possible from this perspective to approve the change we want to make in minor version?
image (9)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @patmmccann
Is there any chance that the awareness of the partner from Copper6 (see my previous comment) can make this pr appropriate for a minor version?
If not - do you have any idea when v12 is expected to be published?

@patmmccann patmmccann Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Even if they made it themselves, the issue is it is breaking; why doesn't perion do a server side translation of the requests without the required params? If there's only 18 pubs, surely you can ease their pain by inferring a cid and pid server side from their referer URL and placementId?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We expect to publish v12 in May or June of 2027

@anna-y-perion anna-y-perion Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@patmmccann
We had find the way to accept old style bid requests on our end and changed the adapter accordingly.
We do not want to wait till the v12. :)
Please review.

Comment thread modules/copper6sspBidAdapter.js
@patmmccann patmmccann changed the title override Copper6 adapter Copper6 adapter: change utility suite Jun 5, 2026
Comment thread modules/copper6sspBidAdapter.md Outdated
@barecheck

barecheck Bot commented Jun 8, 2026

Copy link
Copy Markdown

Barecheck - Code coverage report

Total: 96.61%

Your code coverage diff: 0.01% ▴

Uncovered files and lines
FileLines
libraries/vidazooUtils/bidderUtils.js127
test/spec/modules/copper6sspBidAdapter_spec.js214

Anna Yablonsky added 2 commits July 9, 2026 14:29
# Conflicts:
#	test/spec/modules/copper6sspBidAdapter_spec.js
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Tread carefully! This PR adds 5 linter errors (possibly disabled through directives):

  • libraries/vidazooUtils/bidderUtils.js (+1 error)
  • modules/copper6sspBidAdapter.js (+4 errors)

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

This PR introduces changes that may not work on all browsers. According to Babel, the following polyfills may be needed, and they are not automatically included:

  • Changes to modules/copper6sspBidAdapter.js may need:
    • es.iterator.constructor
    • es.iterator.map
    • esnext.iterator.constructor
    • esnext.iterator.map
  • Changes to test/spec/modules/copper6sspBidAdapter_spec.js may need:
    • es.array.with
    • es.json.stringify
    • esnext.array.with

The best way to address this is to provide good test coverage, as normal PR checks run unit tests on older browsers.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

This PR introduces changes that may not work on all browsers. According to Babel, the following polyfills may be needed, and they are not automatically included:

  • Changes to modules/copper6sspBidAdapter.js may need:
    • es.iterator.constructor
    • es.iterator.map
    • esnext.iterator.constructor
    • esnext.iterator.map
  • Changes to test/spec/modules/copper6sspBidAdapter_spec.js may need:
    • es.array.with
    • es.json.stringify
    • esnext.array.with

The best way to address this is to provide good test coverage, as normal PR checks run unit tests on older browsers.

@anna-y-perion

Copy link
Copy Markdown
Contributor Author

@patmmccann
We had bypass the problem in mapping old adapter's fields to the new request.
Please review.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

This PR introduces changes that may not work on all browsers. According to Babel, the following polyfills may be needed, and they are not automatically included:

  • Changes to modules/copper6sspBidAdapter.js may need:
    • es.iterator.constructor
    • es.iterator.map
    • esnext.iterator.constructor
    • esnext.iterator.map
  • Changes to test/spec/modules/copper6sspBidAdapter_spec.js may need:
    • es.array.with
    • es.json.stringify
    • esnext.array.with
    • esnext.json.parse

The best way to address this is to provide good test coverage, as normal PR checks run unit tests on older browsers.

@github-actions

Copy link
Copy Markdown

This PR includes an adapter whose code does not match its file name. Bid adapter modules should be named <bidderCode>BidAdapter, userId <userIdCode>IdSystem, RTD <rtdCode>RtdProvider, and analytics <analyticsCode>AnalyticsAdapter.

@anna-y-perion

anna-y-perion commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

@lksharma @patmmccann
Please help to understand if the change we introduced can be merged in minor version.
Please help us to understand how we can push the change so our partner can start work with us ASAP.
Related prs:
prebid/prebid.github.io#6597
prebid/prebid-server#4812

@patmmccann

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48d8df4851

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


isBidRequestValid: isBidRequestValid(),
buildRequests: buildRequests(AD_URL),
isBidRequestValid,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Validate legacy params before normalizing them

For existing publishers using the previously documented placementId/endpointId parameters, core calls isBidRequestValid before buildRequests, and this imported validator requires both cId and pId. Those bids are therefore discarded before legacySupport can translate the legacy fields or apply its defaults, so the added compatibility path is unreachable during a real auction; the validator must accept the legacy forms that the build wrapper handles.

Useful? React with 👍 / 👎.

Comment thread modules/copper6sspBidAdapter.d.ts Outdated
@@ -0,0 +1,9 @@
import { VidazooBaseBidderParams } from "../libraries/vidazooUtils/vidazooTypes.ts";

export type Copper6SSPBidRequestParams = VidazooBaseBidderParams;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve legacy params in the exported type

For TypeScript publishers retaining the adapter's existing configuration, aliasing this interface to VidazooBaseBidderParams makes cId and pId mandatory, omits endpointId, and permits placementId only as a number. Consequently previously valid placementId/endpointId string configurations now fail type checking even though the implementation explicitly attempts to support them; model the legacy and new parameter shapes as a union.

AGENTS.md reference: AGENTS.md:L60-L60

Useful? React with 👍 / 👎.

}

function legacySupport(createDomain, createUniqueRequestData, storage, BIDDER_CODE, BIDDER_VERSION, allowSingleRequest = false) {
const buildFunction = createBuildRequestsFn(createDomain, createUniqueRequestData, storage, BIDDER_CODE, BIDDER_VERSION, allowSingleRequest);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Declare the newly persisted deal identifier

Every Copper6 request now passes this storage manager into createBuildRequestsFn, whose shared request builder calls getUniqueDealId and persists a page-derived identifier under u_<hash>. The repository's generated Copper6 metadata currently records no disclosures from https://ssp.copper6.com/deviceStorage.json, and the module documentation does not describe this storage, so this newly introduced identifier needs the required device-storage disclosure and documentation before the adapter ships.

AGENTS.md reference: AGENTS.md:L75-L75

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fix will be set in the relevant json page.

@patmmccann

Copy link
Copy Markdown
Collaborator

@anna-y-perion my tooling is suggesting the param conversion needs a bit of work

@anna-y-perion

Copy link
Copy Markdown
Contributor Author

@patmmccann thank you very much for the review.
"Validate legacy params before normalizing them" and "Preserve legacy params in the exported type" were implemented and relevant tests were added.

@patmmccann patmmccann removed the core label Jul 28, 2026
@patmmccann
patmmccann merged commit c86964f into prebid:master Jul 28, 2026
99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants