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

New Adapter: Loyal #3586

Merged
merged 12 commits into from
Apr 25, 2024
Merged

New Adapter: Loyal #3586

merged 12 commits into from
Apr 25, 2024

Conversation

teqblaze
Copy link
Contributor

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

loyal

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:29:	Builder		100.0%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:36:	MakeRequests	83.9%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:90:	makeRequest	85.7%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:107:	MakeBids	100.0%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:146:	getBidMediaType	85.7%
total:								(statements)	89.6%

var bidderExt adapters.ExtImpBidder
var loyalExt openrtb_ext.ImpExtLoyal

if err = json.Unmarshal(reqCopy.Imp[0].Ext, &bidderExt); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make it clear in your docs PR that only the ext of the first impression is used and that the other exts are ignored.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don’t quite understand you, we create a separate request in a loop (41 line) for each Imp object.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see. Please change reqCopy.Imp[0].Ext to imp.Ext to avoid confusion. You'll avoid a dereference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,14 @@
endpoint: "https://us-east-1.loyal.app/pserver"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have endpoints in other regions? Is only US traffic supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do not have endpoints in other regions and only support US traffic

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha. Please add the following in this yaml file to declare US traffic only:

geoscope:
  - USA

See https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html#bidder-info for further info on the geoscope.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


func TestJsonSamples(t *testing.T) {
bidder, buildErr := Builder(openrtb_ext.BidderEmtv, config.Adapter{
Endpoint: "http://example.com/pserver"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"})
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice use of an obviously fake testing endpoint. Thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

replaced

Copy link
Contributor

Choose a reason for hiding this comment

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

This was a compliment, not a critique. Sorry if you interpreted this as sarcasm. We prefer the use of a fake testing endpoint in unit tests. Feel free to revert commit cf18f0e

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

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

loyal

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:29:	Builder		100.0%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:36:	MakeRequests	83.9%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:90:	makeRequest	85.7%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:107:	MakeBids	100.0%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:146:	getBidMediaType	85.7%
total:								(statements)	89.6%

@bsardo bsardo changed the title Loyal Bid Adapter: initial release New Adapter: Loyal Apr 1, 2024
@@ -0,0 +1,14 @@
endpoint: "https://us-east-1.loyal.app/pserver"
maintainer:
email: "hello@loyal.app"
Copy link
Contributor

Choose a reason for hiding this comment

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

@teqblaze Email is being sent from prebid team to verify hello@loyal.app address. Requesting to respond back on email thread.

Copy link
Contributor

Choose a reason for hiding this comment

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

received response from loyal team

Comment on lines 121 to 122
bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp))
bidResponse.Currency = response.Cur
Copy link
Contributor

Choose a reason for hiding this comment

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

by default line 130 will initialize bidResponse.Currency as USD

reassigning bidResponse.Currency on line 131 without checking response.Cur length may overwrite bidResponse.Currency with blank value

code block can be refactored as below

	bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp))
        if len(response.Cur) != 0 {
	    bidResponse.Currency = response.Cur
        }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines 124 to 128
impsMappedByID := make(map[string]openrtb2.Imp, len(request.Imp))
for i, imp := range request.Imp {
impsMappedByID[request.Imp[i].ID] = imp
}

Copy link
Contributor

Choose a reason for hiding this comment

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

impsMappedByID is not being used. should be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@onkarvhanumante
Copy link
Contributor

@teqblaze should update json test

  • to have request with multiple imps
  • to have multi-format imp request

Copy link

github-actions bot commented Apr 7, 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, 0d364b2

loyal

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:29:	Builder		100.0%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:36:	MakeRequests	77.8%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:94:	makeRequest	85.7%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:111:	MakeBids	100.0%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:147:	getBidMediaType	85.7%
total:								(statements)	85.7%

@teqblaze
Copy link
Contributor Author

teqblaze commented Apr 7, 2024

@teqblaze should update json test

  • to have request with multiple imps
  • to have multi-format imp request

thanks for review, tests added

}

func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
var err error
Copy link
Contributor

Choose a reason for hiding this comment

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

since scope of err is within the loop, no need to err outside for loop on line 42

line 48 and 52 could be modified as below:


		if err := json.Unmarshal(imp.Ext, &bidderExt); err != nil {
			errs = append(errs, err)
			continue
		}
		if err := json.Unmarshal(bidderExt.Bidder, &loyalExt); err != nil {
			errs = append(errs, err)
			continue
		}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

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.

just one suggestion

Additionally, @teqblaze PTAL at #3586 (comment)

Copy link

github-actions bot commented Apr 8, 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, 0d72164

loyal

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:29:	Builder		100.0%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:36:	MakeRequests	77.1%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:93:	makeRequest	85.7%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:110:	MakeBids	100.0%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:146:	getBidMediaType	85.7%
total:								(statements)	85.5%

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

loyal

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:29:	Builder		100.0%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:36:	MakeRequests	77.1%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:93:	makeRequest	85.7%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:110:	MakeBids	100.0%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:146:	getBidMediaType	77.8%
total:								(statements)	84.5%

@onkarvhanumante
Copy link
Contributor

@teqblaze test suite is failing with following errors

--- FAIL: TestJsonSamples (0.01s)
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/loyal_test.go:19
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	loyaltest/exemplary/endpointId.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/loyal_test.go:19
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	loyaltest/exemplary/multi-format.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/loyal_test.go:19
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	loyaltest/exemplary/multi-imp.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/loyal_test.go:19
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	loyaltest/exemplary/multi-imp.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[1]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/loyal_test.go:19
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	loyaltest/exemplary/simple-banner.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/loyal_test.go:19
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	loyaltest/exemplary/simple-native.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/loyal_test.go:19
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	loyaltest/exemplary/simple-video.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/loyal_test.go:19
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	loyaltest/exemplary/simple-web-banner.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/loyal_test.go:19
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	loyaltest/supplemental/bad_media_type.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/loyal_test.go:19
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	loyaltest/supplemental/bad_response.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/loyal_test.go:19
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	loyaltest/supplemental/status-204.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/loyal/loyal_test.go:19
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	loyaltest/supplemental/status-not-[200](https://github.com/prebid/prebid-server/actions/runs/8688510132/job/23861843049?pr=3586#step:4:201).json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]

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

loyal

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:29:	Builder		100.0%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:36:	MakeRequests	77.1%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:93:	makeRequest	85.7%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:111:	MakeBids	100.0%
github.com/prebid/prebid-server/v2/adapters/loyal/loyal.go:147:	getBidMediaType	77.8%
total:								(statements)	84.5%

@teqblaze
Copy link
Contributor Author

@onkarvhanumante fixed

@Sonali-More-Xandr Sonali-More-Xandr merged commit 74ff6ae into prebid:master Apr 25, 2024
5 checks passed
mefjush pushed a commit to adhese/prebid-server that referenced this pull request Apr 25, 2024
Co-authored-by: loyal <hello@loyal.app>
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