Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapter alias: syncer related changes #3075

Closed
wants to merge 6 commits into from

Conversation

onkarvhanumante
Copy link
Contributor

As per adapter alias feature, if alias doesn't define syncher config in YAML then alias will inherit syncher config of its parent bider. This includes inheriting syncer urls, keys etc.

As of now, PBS has logic that prevents bidders from using same syncer key. But this logic doesn't check if bidders using same key have parent alias relationship among them. Due to this, validation fails for alias which inherits syncer config from parent. To address this issue, pull request introduces changes to allow the use of the same syncer key for aliases and their parent bidders.

Also, an alias can define its syncer key in YAML configuration, but this key must not be the same as that of a bidder other than its parent. For this, pull introduces to catcg alias whose syncher key conflicts with bidder other than its parent

parent1:
  syncer:
     key: k1

alias1:
   aliasOf: parent1
   syncer:
     Key: k1

parent2:
  syncer:
    key: k2

alias2:
  aliasOf: parent2
  syncer:
     key: k1 // syncer key conflicts with parent1 key

refactor to avoid usage of additional map and loop
@onkarvhanumante onkarvhanumante force-pushed the adapter-alias/syncer-related-change branch 2 times, most recently from 890101d to 7078ba5 Compare September 5, 2023 10:01
getSyncerKey will help to decide syncer key for an alias or non-alias bidder
Code block also uses cfg for syncer config. So to avoid confusion between syncer and bidder info, rename cfg to bidderInfo
As per adapter alias feature, if alias doesn't define syncher config in YAML then alias will inherit syncher config of its parent bider. This includes inheriting syncer urls, keys etc.

As of now, PBS has logic that prevents bidders from using same syncer key. But this logic doesn't check if bidders using same key have parent alias relationship. Due to this, validation fails for alias which inherits syncer config from parent.

To fix this, commit makes changes to allow use of same syncer key for alias and parent bidder.
… its parent

An alias can define its syncer key in YAML configuration, but this key must not be the same as that of a bidder other than its parent

For example,

parent1:
  syncer:
     key: k1

alias1:
   aliasOf: parent1
   syncer:
     Key: k1

parent2:
  syncer:
    key: k2

alias2:
  aliasOf: parent2
  syncer:
     key: k1 // syncer key k1 conflicts with parent1 key
@onkarvhanumante onkarvhanumante force-pushed the adapter-alias/syncer-related-change branch from 7078ba5 to 660f505 Compare September 5, 2023 10:11
@gargcreation1992 gargcreation1992 deleted the adapter-alias/syncer-related-change branch December 19, 2023 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants