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

Flipp: use height value from server response #3940

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Conversation

MishelleBit
Copy link
Contributor

@MishelleBit MishelleBit commented Sep 25, 2024

Using standardHeight and compactHeight from server response. Modified some tests accordingly as well.

…ds in decisions response (#8)

* add compactHeight and standardHeight fields in decision response

* modify tests

* modify tests

* modify tests

* modify tests

* adding height to expectedBidResponses

* final testing

* final changes

* final changes

* final changes
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 70dec6e

flipp

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/flipp/flipp.go:49:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/flipp/flipp.go:57:	MakeRequests		100.0%
github.com/prebid/prebid-server/v2/adapters/flipp/flipp.go:75:	makeRequest		75.0%
github.com/prebid/prebid-server/v2/adapters/flipp/flipp.go:95:	processImp		88.6%
github.com/prebid/prebid-server/v2/adapters/flipp/flipp.go:171:	buildPrebidRequest	100.0%
github.com/prebid/prebid-server/v2/adapters/flipp/flipp.go:188:	MakeBids		85.7%
github.com/prebid/prebid-server/v2/adapters/flipp/flipp.go:226:	getAdTypes		100.0%
github.com/prebid/prebid-server/v2/adapters/flipp/flipp.go:233:	buildBid		100.0%
github.com/prebid/prebid-server/v2/adapters/flipp/flipp.go:263:	paramsUserKeyPermitted	80.0%
total:								(statements)		89.3%

@MishelleBit MishelleBit changed the title flipp: change height to use compactHeight and standardHeight fields and modify tests accordingly Flipp: use height value from server response Sep 25, 2024
@MishelleBit
Copy link
Contributor Author

Hi, could I please get two reviews to proceed with this change? Thank you @przemkaczmarek @bsardo @onkarvhanumante @minaguib @dlackty @dmitris @asweeney86 @hhhjort

@przemkaczmarek przemkaczmarek self-assigned this Oct 10, 2024
@przemkaczmarek przemkaczmarek self-requested a review October 10, 2024 13:20
@MishelleBit
Copy link
Contributor Author

Hi @przemkaczmarek, I hope you're doing well. Can we get an update on this?

przemkaczmarek
przemkaczmarek previously approved these changes Oct 23, 2024
@MishelleBit
Copy link
Contributor Author

Hello, could I please get another review to proceed with this change? Thank you @bsardo @onkarvhanumante @minaguib @dlackty @dmitris @asweeney86 @hhhjort

@bsardo bsardo self-assigned this Oct 24, 2024
@MishelleBit
Copy link
Contributor Author

Hi @bsardo , I hope you're doing well. Can we get an update on this?

@bsardo
Copy link
Collaborator

bsardo commented Nov 4, 2024

Hi @MishelleBit, we recently released PBS 3.0, more specifically v3.1.0, which updates Prebid Server package import references throughout the project from v2 to v3.
For example:

import (
    "github.com/prebid/prebid-server/v3/adapters"
)

As a result, please merge with master (no rebase) and then ensure all Prebid Server package import references in the files you’ve changed are v3 such that the test suite passes so we can resume reviewing. Thanks!

Copy link

github-actions bot commented Nov 5, 2024

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 18cf454

flipp

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:50:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:58:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:76:	makeRequest		75.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:96:	processImp		88.6%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:172:	buildPrebidRequest	100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:189:	MakeBids		85.7%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:227:	getAdTypes		100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:234:	buildBid		100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:264:	paramsUserKeyPermitted	80.0%
total:								(statements)		89.3%

Copy link

github-actions bot commented Nov 5, 2024

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 18cf454

flipp

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:50:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:58:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:76:	makeRequest		75.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:96:	processImp		88.6%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:172:	buildPrebidRequest	100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:189:	MakeBids		85.7%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:227:	getAdTypes		100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:234:	buildBid		100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:264:	paramsUserKeyPermitted	80.0%
total:								(statements)		89.3%

@MishelleBit
Copy link
Contributor Author

Hi @bsardo, done!

@MishelleBit
Copy link
Contributor Author

Hi @bsardo I hope you're doing well, can we get an update?

@@ -231,7 +243,20 @@ func buildBid(decision *InlineModel, impId string) *openrtb2.Bid {
if decision.Contents[0].Data.Width != 0 {
bid.W = decision.Contents[0].Data.Width
}
bid.H = 0
customDataInterface := decision.Contents[0].Data.CustomData
customDataMap := customDataInterface.(map[string]interface{})
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a test case where customdata is a different type to verify this adapter code gracefully handles and error and doesn't panic on an incorrect response.

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, cbe75ab

flipp

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:50:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:58:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:76:	makeRequest		75.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:96:	processImp		88.6%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:172:	buildPrebidRequest	100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:189:	MakeBids		85.7%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:227:	getAdTypes		100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:234:	buildBid		100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:271:	paramsUserKeyPermitted	80.0%
total:								(statements)		89.4%

@MishelleBit
Copy link
Contributor Author

Thanks @SyntaxNode ! It should handle different types and i've set customeData to null in simple-banner-dtx.json

@MishelleBit
Copy link
Contributor Author

Hi @przemkaczmarek can you please reapprove? thank you!

@przemkaczmarek przemkaczmarek self-requested a review November 26, 2024 07:55
@MishelleBit
Copy link
Contributor Author

Hi @SyntaxNode can you please reapprove? thank you!

przemkaczmarek
przemkaczmarek previously approved these changes Nov 27, 2024
@bsardo bsardo removed their assignment Dec 4, 2024
@MishelleBit
Copy link
Contributor Author

@SyntaxNode Hello, you previously approved can you please re-approve? thank you.

Copy link
Collaborator

@bsardo bsardo left a comment

Choose a reason for hiding this comment

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

Just one last change and then we're good to go.

if err != nil {
return nil, []error{fmt.Errorf("flipp params not found. %v", err)}
}
err = json.Unmarshal(params, &flippExtParams)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use jsonutil.Unmarshal instead.

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 7c84694

flipp

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:50:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:58:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:76:	makeRequest		75.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:96:	processImp		88.6%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:172:	buildPrebidRequest	100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:189:	MakeBids		85.7%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:227:	getAdTypes		100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:234:	buildBid		100.0%
github.com/prebid/prebid-server/v3/adapters/flipp/flipp.go:271:	paramsUserKeyPermitted	80.0%
total:								(statements)		89.4%

@bsardo bsardo merged commit 183b1ec into prebid:master Dec 10, 2024
5 checks passed
scr-oath pushed a commit to scr-oath/prebid-server that referenced this pull request Dec 16, 2024
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.

5 participants