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

DMX: Enforcing w and h in imp #1245

Merged
merged 2 commits into from
Apr 27, 2021
Merged

DMX: Enforcing w and h in imp #1245

merged 2 commits into from
Apr 27, 2021

Conversation

RodionOrets
Copy link
Contributor

@RodionOrets RodionOrets force-pushed the enforce-w-and-h-in-dmx-imp branch 2 times, most recently from bc57a15 to 5f66aa2 Compare April 23, 2021 00:07
@RodionOrets RodionOrets force-pushed the enforce-w-and-h-in-dmx-imp branch from 5f66aa2 to 661b1c1 Compare April 26, 2021 12:37
Copy link
Collaborator

@SerhiiNahornyi SerhiiNahornyi left a comment

Choose a reason for hiding this comment

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

Pls rearrange methods in call order

src/main/java/org/prebid/server/bidder/dmx/DmxBidder.java Outdated Show resolved Hide resolved
src/main/java/org/prebid/server/bidder/dmx/DmxBidder.java Outdated Show resolved Hide resolved
src/main/java/org/prebid/server/bidder/dmx/DmxBidder.java Outdated Show resolved Hide resolved
src/main/java/org/prebid/server/bidder/dmx/DmxBidder.java Outdated Show resolved Hide resolved
src/main/java/org/prebid/server/bidder/dmx/DmxBidder.java Outdated Show resolved Hide resolved
return app == null
? null
: app.toBuilder()
.id(StringUtils.isNotBlank(app.getId()) ? app.getId() : device.getIfa())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can device here be null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If device is null, then validateRequest method would throw an PreBidException. I'll add unit test to cover this case

Copy link
Collaborator

Choose a reason for hiding this comment

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

As I see validateRequest will not throw ex with some userValues, and null device can be passed forward

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In real world, we expect that device being null is kinda impossible because it holds the info about physical device through which user is interacting with website/app. Anyway, I'll add device == null check to validateRequest

Copy link
Collaborator

Choose a reason for hiding this comment

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

As I know, we have stored requests and AMP, which as I know can not hold any user information

Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting. Seems we can't have null device because of Ortb2ImplicitParametersResolver.populateDevice()

src/main/java/org/prebid/server/bidder/dmx/DmxBidder.java Outdated Show resolved Hide resolved
@RodionOrets RodionOrets force-pushed the enforce-w-and-h-in-dmx-imp branch from 661b1c1 to 02dc60a Compare April 26, 2021 14:49
@RodionOrets RodionOrets force-pushed the enforce-w-and-h-in-dmx-imp branch from 02dc60a to 307e144 Compare April 26, 2021 14:51
@RodionOrets
Copy link
Contributor Author

Pls rearrange methods in call order

I see. Completely agree. I've tried to rearrange them and keep the abstraction level

@RodionOrets RodionOrets force-pushed the enforce-w-and-h-in-dmx-imp branch from 307e144 to 8b2a46f Compare April 26, 2021 14:59
src/main/java/org/prebid/server/bidder/dmx/DmxBidder.java Outdated Show resolved Hide resolved
return app == null
? null
: app.toBuilder()
.id(StringUtils.isNotBlank(app.getId()) ? app.getId() : device.getIfa())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting. Seems we can't have null device because of Ortb2ImplicitParametersResolver.populateDevice()

@RodionOrets RodionOrets force-pushed the enforce-w-and-h-in-dmx-imp branch 2 times, most recently from 1b2c4f3 to 10f342d Compare April 27, 2021 07:27
SerhiiNahornyi
SerhiiNahornyi previously approved these changes Apr 27, 2021
@rpanchyk rpanchyk merged commit c8a22e9 into master Apr 27, 2021
@rpanchyk rpanchyk deleted the enforce-w-and-h-in-dmx-imp branch April 27, 2021 13:35
nickluck9 pushed a commit that referenced this pull request Aug 9, 2021
nickluck9 pushed a commit that referenced this pull request Aug 10, 2021
nickluck9 pushed a commit that referenced this pull request Aug 10, 2021
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.

3 participants