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

agma: bugfixes #3495

Merged
merged 6 commits into from
Nov 4, 2024
Merged

agma: bugfixes #3495

merged 6 commits into from
Nov 4, 2024

Conversation

steffenmllr
Copy link
Contributor

@steffenmllr steffenmllr commented Oct 9, 2024

🔧 Type of changes

  • bugfix

✨ What's the context?

Thanks @AntoxaAntoxic for the port of our adapter! During testing we found 2 minor bugs in the implementation-

  • 9da4ca8: prevents triggering a POST request when the buffer is empty. original
  • 2271af3: respect the sitesApp config and allow empty strings as publisherId, when the sitesApp is set. This also allows a publisher to set multiple codes for multiple sites/apps for the same publisherId. original test

Thanks again for the port!

@steffenmllr steffenmllr changed the title Check if the buffer has entries before flushing via timer agma: bugfixes Oct 9, 2024
@steffenmllr steffenmllr marked this pull request as ready for review October 15, 2024 08:52
@steffenmllr
Copy link
Contributor Author

@AntoxaAntoxic Is there any chance this can be included in the next release? The bugs, especially the issue with the config, are preventing our members from using your port.

If there is anything I can do, please let me know

@AntoxaAntoxic
Copy link
Collaborator

@Compile-Ninja When will be the next release?

Copy link
Collaborator

@AntoxaAntoxic AntoxaAntoxic left a comment

Choose a reason for hiding this comment

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

only minors

@steffenmllr
Copy link
Contributor Author

@AntoxaAntoxic thanks for the review, hope I've addressed everything. If there is anything more I can do, please let me know

@@ -200,7 +206,9 @@ private static String getPublisherId(BidRequest bidRequest) {
return null;
}

return publisherId;
return appSiteId != null
? String.format("%s_%s", StringUtils.defaultString(publisherId, ""), appSiteId)
Copy link
Collaborator

Choose a reason for hiding this comment

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

the second param is redundant, use just StringUtils.defaultString(publisherId)

also if it's a blank publisherId it will return _appSiteId value, imho just looks weird, but maybe it's fine for 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.

_appSiteId is used when the publisherId is not set, this is not optimal, but 1:1 how the golang config works since some users don't configure the publishers in their system. (https://github.com/prebid/prebid-server-java/pull/3495/files#diff-9a3b09aae9225494e90113eb6184a4a888e0ed043127af1d267e95c85eea5bfaR481)

I've updated to StringUtils.defaultString(publisherId)

Thanks again for your patience!

AntoxaAntoxic
AntoxaAntoxic previously approved these changes Oct 29, 2024
Comment on lines 115 to 121
account -> {
final String publisherId = account.getPublisherId();
final String siteAppId = account.getSiteAppId();
return StringUtils.isNotBlank(siteAppId)
? String.format("%s_%s", publisherId, siteAppId)
: publisherId;
},
Copy link
Member

Choose a reason for hiding this comment

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

Please, extract to separate method.

Comment on lines 103 to 105
if (!toFlush.isEmpty()) {
sendEvents(toFlush);
}
Copy link
Member

Choose a reason for hiding this comment

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

Please, move this check to sendEvents method.

@steffenmllr
Copy link
Contributor Author

@And1sS Thanks for the view, please let me know if I need to change more

@Compile-Ninja Compile-Ninja merged commit 4ca292e into prebid:master Nov 4, 2024
7 checks passed
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