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

InMobi: mtype support #3921

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

bkaneyama
Copy link

No description provided.

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, 73b2411

inmobi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:27:	MakeRequests		85.7%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:60:	MakeBids		92.3%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:91:	preprocess		93.8%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:121:	getMediaTypeForImp	28.6%
total:									(statements)		76.3%

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, 7c2044a

inmobi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:27:	MakeRequests		85.7%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:60:	MakeBids		92.3%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:91:	preprocess		93.8%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:121:	getMediaTypeForImp	66.7%
total:									(statements)		88.2%

przemkaczmarek
przemkaczmarek previously approved these changes Sep 19, 2024
Comment on lines 131 to 132
default:
return openrtb_ext.BidTypeBanner
Copy link
Collaborator

Choose a reason for hiding this comment

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

It appears you were defaulting to banner before adding mtype support but now that you have it, is your server supposed to always set it? If so, you might want to do what most other adapters do which is to return an error if mtype does not equal one of your supported formats.

default:
	return "", fmt.Errorf("unrecognized bid type in response from inmobi for bid %s", bid.ImpID)

and then in the calling code:

mediaType, err := getMediaTypeForImp(sb.Bid[i].ImpID, internalRequest.Imp)
if err != nil {
	return nil, []error{err}
}

Thoughts?

Copy link
Author

Choose a reason for hiding this comment

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

Sounds good. I've made the recommended 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, 03c700e

inmobi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:27:	MakeRequests		85.7%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:60:	MakeBids		93.3%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:94:	preprocess		93.8%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:124:	getMediaTypeForImp	83.3%
total:									(statements)		90.6%

Comment on lines 130 to 131
case openrtb2.MarkupAudio:
return openrtb_ext.BidTypeAudio, nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

You haven't declared audio support in your YAML file so it might be best to remove this and let this case result in an error.

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, b8b21d0

inmobi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:27:	MakeRequests		85.7%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:60:	MakeBids		93.3%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:94:	preprocess		93.8%
github.com/prebid/prebid-server/v2/adapters/inmobi/inmobi.go:124:	getMediaTypeForImp	100.0%
total:									(statements)		92.3%

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