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

Fix few adapter aliases bug #3055

Merged
merged 7 commits into from
Sep 5, 2023
Merged

Fix few adapter aliases bug #3055

merged 7 commits into from
Sep 5, 2023

Conversation

gargcreation1992
Copy link
Contributor

This PR makes the following changes -

  • change /bidders/params endpoint to also return aliases bidder params.
  • move SetAliasBidderName up in the function call. This is required to fix the issue where we read bidderInfo first, check if it is an alias and then SetAliasBidderName. So that normalizeBidderName returns the dynamically added alias names. See commit for more reference.

We no longer require to maintain aliasBidderNames in separate slice. Instead, we will be needing aliasBidderToParentBidder map to maintain so that we can use it to get parent schema in later commit.
This refactor makes it easier to test the NewBidderParamsValidator function. Also adds the test cases.
This is required to fix the issue where we read bidderInfo first, check if it is an alias and then SetAliasBidderName. So that normalizeBidderName returns the dynamically added alias names.
Base automatically changed from PBS-1194 to master August 31, 2023 10:45
# Conflicts:
#	config/bidderinfo.go
#	openrtb_ext/bidders.go
#	openrtb_ext/bidders_test.go
@Sonali-More-Xandr Sonali-More-Xandr self-assigned this Aug 31, 2023
//required for CoreBidderNames function to also return aliasBiddernames
openrtb_ext.SetAliasBidderName(openrtb_ext.BidderName(string(bidderName)))
if err := openrtb_ext.SetAliasBidderName(openrtb_ext.BidderName(string(bidderName)), openrtb_ext.BidderName(aliasBidderInfo.AliasOf)); err != nil {
Copy link
Contributor

@Sonali-More-Xandr Sonali-More-Xandr Aug 31, 2023

Choose a reason for hiding this comment

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

bidderName need be typecasted to string as it is already a string. We have done these changes in this commit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be done in the merge master commit.

Copy link
Contributor

@VeronikaSolovei9 VeronikaSolovei9 left a comment

Choose a reason for hiding this comment

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

Looks good to me, added minor comment and question

config/bidderinfo.go Show resolved Hide resolved
config/bidderinfo.go Show resolved Hide resolved
Copy link
Contributor

@Sonali-More-Xandr Sonali-More-Xandr left a comment

Choose a reason for hiding this comment

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

Lgtm!

router/router.go Outdated Show resolved Hide resolved
@@ -552,11 +556,11 @@ var bidderNameLookup = func() map[string]BidderName {
lookup[bidderNameLower] = name
}
return lookup
}()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

mostly for my understanding, any specific reason to make this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because of - #3055 (comment)

router/router.go Outdated Show resolved Hide resolved
@onkarvhanumante onkarvhanumante self-assigned this Sep 1, 2023
router/router.go Outdated Show resolved Hide resolved
Copy link
Contributor

@onkarvhanumante onkarvhanumante left a comment

Choose a reason for hiding this comment

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

some suggestions

@gargcreation1992 gargcreation1992 merged commit 55fcb1c into master Sep 5, 2023
3 checks passed
@gargcreation1992 gargcreation1992 deleted the PBS-1194-1 branch September 5, 2023 05:50
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.

4 participants