Skip to content

Conversation

DiMurer
Copy link

@DiMurer DiMurer commented Jun 6, 2025

🔧 Type of changes

  • new bid adapter
  • bid adapter update
  • new feature
  • new analytics adapter
  • new module
  • module update
  • bugfix
  • documentation
  • configuration
  • dependency update
  • tech debt (test coverage, refactorings, etc.)

✨ What's the context?

There are two updates for the Yandex adapter.

  1. The аdapter now supports video banners.
  2. The "displaymanager" and "displaymanagerver" fields have been added.

🧠 Rationale behind the change

Why did you choose to make these changes? Were there any trade-offs you had to consider?

🧪 Test plan

The tests were updated, too.

🏎 Quality check

  • Are your changes following our code style guidelines?
  • Are there any breaking changes in your code?
  • Does your test coverage exceed 90%?
  • Are there any erroneous console logs, debuggers or leftover code in your changes?

@DiMurer DiMurer force-pushed the yandex-bid-adapter-add-support-video-ads branch from 00a9017 to dc3dec7 Compare June 10, 2025 13:10
@DiMurer
Copy link
Author

DiMurer commented Jun 10, 2025

@osulzhenko fixed

@osulzhenko osulzhenko requested a review from AntoxaAntoxic June 17, 2025 14:15
@AntoxaAntoxic
Copy link
Collaborator

@DiMurer is it a port from PBS Go? Could you link a porting issue or a PR from PBS Go if any?

@DiMurer
Copy link
Author

DiMurer commented Jun 18, 2025

@AntoxaAntoxic
The merged PR is in Prebid.js: prebid/Prebid.js#13062
The same logic is used in PBS Go: prebid/prebid-server#4344

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.

please double-check the whole Go implementation and fix all the differences, and make the Java version functionally identical in that way

@osulzhenko
Copy link
Collaborator

update required

@osulzhenko
Copy link
Collaborator

@DiMurer any updates on this one?

@DiMurer
Copy link
Author

DiMurer commented Jul 18, 2025

@osulzhenko
I will fix it in a couple of days. I made some changes to the Go adapter.

@osulzhenko osulzhenko requested a review from AntoxaAntoxic July 29, 2025 09:56
@DiMurer DiMurer force-pushed the yandex-bid-adapter-add-support-video-ads branch from dc3dec7 to 3755550 Compare July 31, 2025 14:46
@DiMurer
Copy link
Author

DiMurer commented Jul 31, 2025

@AntoxaAntoxic @osulzhenko
I synced this PR with the Go repository. I added multiformat support and fixed previous issues.

@AntoxaAntoxic AntoxaAntoxic linked an issue Aug 6, 2025 that may be closed by this pull request
AntoxaAntoxic
AntoxaAntoxic previously approved these changes Aug 18, 2025
Copy link
Collaborator

@CTMBNara CTMBNara left a comment

Choose a reason for hiding this comment

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

There is some differences with GO version:

  • in yandex.yaml: usersync.redirect.url
  • I don't see such logic in GO:
        if (CollectionUtils.isEmpty(video.getMimes())) {
            videoBuilder.mimes(Collections.singletonList("video/mp4"));
        }
  • I don't see any logic related to the placement_id parameter that exists in GO.

Also, please, make a change according to this comment #4004 (comment)

@DiMurer DiMurer force-pushed the yandex-bid-adapter-add-support-video-ads branch from d694fce to 2db652e Compare September 5, 2025 15:25
@DiMurer
Copy link
Author

DiMurer commented Sep 5, 2025

@CTMBNara

in yandex.yaml:

If you mean the difference between an.yandex.ru and yandex.ru/an, they are aliases, but I synchronized them.
I'm not sure about the difference in parameters, such as {{gdpr}} vs. {{.GDPR}}. However, I believe they are correct.

I don't see such logic in GO:

In the Go PR, I was told that I was trying to fix an impossible problem because this logic was checked before the adapter code. So, I deleted it in the Go PR. If it's the same for Java, that's fine. I deleted it here, too.

I don't see any logic related to the placement_id parameter that exists in GO.

I'm a little confused. I didn't change any placement_id logic in my GO PR. Can we accept this part, about the video logic? I don't want to turn this PR into "add video support and synchronize all the logic between the repositories."

@CTMBNara
Copy link
Collaborator

@CTMBNara

in yandex.yaml:

If you mean the difference between an.yandex.ru and yandex.ru/an, they are aliases, but I synchronized them. I'm not sure about the difference in parameters, such as {{gdpr}} vs. {{.GDPR}}. However, I believe they are correct.

I don't see such logic in GO:

In the Go PR, I was told that I was trying to fix an impossible problem because this logic was checked before the adapter code. So, I deleted it in the Go PR. If it's the same for Java, that's fine. I deleted it here, too.

I don't see any logic related to the placement_id parameter that exists in GO.

I'm a little confused. I didn't change any placement_id logic in my GO PR. Can we accept this part, about the video logic? I don't want to turn this PR into "add video support and synchronize all the logic between the repositories."

  1. Yes, thanks for the clarification.
  2. video.mimes is a required field, so without it the initial request will fail validation. Therefore, yes, there is no need to set this field on the adapter side.
  3. Yes, of course. I just pointed it out so that Yandex knows about the adapter differences between GO and Java.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please change the order of all tests so that makeHttpRequest* tests come first, followed by makeBids* tests.

@osulzhenko
Copy link
Collaborator

update required

@DiMurer
Copy link
Author

DiMurer commented Oct 1, 2025

@CTMBNara
I changed the order of tests

@DiMurer DiMurer requested a review from CTMBNara October 2, 2025 15:38
CTMBNara
CTMBNara previously approved these changes Oct 13, 2025
Copy link
Collaborator

@CTMBNara CTMBNara left a comment

Choose a reason for hiding this comment

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

Please, remove this comments

assertThatIllegalArgumentException().isThrownBy(() -> new YandexBidder("invalid_url", jacksonMapper));
}

// ========== makeHttpRequest* tests ==========
Copy link
Collaborator

Choose a reason for hiding this comment

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

.

tuple("prebid.java", "1.1"));
}

// ========== makeBids* tests ==========
Copy link
Collaborator

Choose a reason for hiding this comment

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

.

assertThat(result.getValue().getFirst().getType()).isEqualTo(video); // Video has highest priority
}

// ========== Helper methods ==========
Copy link
Collaborator

Choose a reason for hiding this comment

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

.

@DiMurer
Copy link
Author

DiMurer commented Oct 13, 2025

@CTMBNara done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port PR from PBS-Go: Yandex: Add video support

4 participants