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

Migrate PBS from using embedded Vert.x to verticles #2306

Merged
merged 17 commits into from
Apr 8, 2024
Merged

Conversation

And1sS
Copy link
Member

@And1sS And1sS commented Apr 20, 2023

To bump Vert.x to version 4 we need to move from embedded usage (via ContextRunner class) to Vert.x verticles deployment model usage. This is due to updates in Vert.x internal context management.

Previously, we were obtaining new event loop contexts via vertx.getOrCreateContext() calls from spring boot config classes. When spring boot bootstraps application context it runs all configurations on single thread. Since Vert.x 4, call to vertx.getOrCreateContext() is going to create new event loop context for the first time and put it in thread local variable, so subsequent calls will just return same event loop context. It breaks ContextRunner class) and our deployment model.

So, we decided to switch to verticles deployment model, where each instance of deployed verticle is assigned new event loop context and that is guaranteed by contract. This way we are not relying on vertx internal implementation.

@And1sS And1sS changed the title Started rewriting old usage of embedded vertx to verticles deployment… Migrate PBS from using embedded Vert.x to verticals Apr 20, 2023
# Conflicts:
#	src/main/java/org/prebid/server/handler/info/BiddersHandler.java
#	src/main/java/org/prebid/server/privacy/gdpr/vendorlist/VendorListService.java
#	src/main/java/org/prebid/server/privacy/gdpr/vendorlist/VendorListServiceV2.java
#	src/main/java/org/prebid/server/spring/config/PrivacyServiceConfiguration.java
#	src/main/java/org/prebid/server/spring/config/SettingsConfiguration.java
#	src/main/java/org/prebid/server/spring/config/VertxConfiguration.java
#	src/main/resources/application.yaml
#	src/test/java/org/prebid/server/privacy/gdpr/vendorlist/VendorListServiceTest.java
@SerhiiNahornyi SerhiiNahornyi changed the base branch from master to remove-pg March 4, 2024 12:05
@CTMBNara CTMBNara changed the base branch from remove-pg to pbs-3-0-preparation March 6, 2024 10:39
@CTMBNara CTMBNara changed the base branch from pbs-3-0-preparation to remove-pg March 6, 2024 10:43
ddubyk and others added 5 commits March 6, 2024 13:00
# Conflicts:
#	src/main/java/org/prebid/server/deals/AlertHttpService.java
#	src/main/java/org/prebid/server/deals/DeliveryStatsService.java
#	src/main/java/org/prebid/server/deals/PlannerService.java
#	src/main/java/org/prebid/server/deals/RegisterService.java
#	src/main/java/org/prebid/server/deals/UserService.java
#	src/main/java/org/prebid/server/deals/simulation/SimulationAwareDeliveryStatsService.java
#	src/main/java/org/prebid/server/deals/simulation/SimulationAwareHttpBidderRequester.java
#	src/main/java/org/prebid/server/deals/simulation/SimulationAwarePlannerService.java
#	src/main/java/org/prebid/server/deals/simulation/SimulationAwareRegisterService.java
#	src/main/java/org/prebid/server/deals/simulation/SimulationAwareUserService.java
#	src/main/java/org/prebid/server/handler/admin/DealsStatusHandler.java
#	src/main/java/org/prebid/server/handler/admin/ForceDealsUpdateHandler.java
#	src/main/java/org/prebid/server/handler/admin/LineItemStatusHandler.java
#	src/main/java/org/prebid/server/handler/openrtb2/AuctionHandler.java
#	src/main/java/org/prebid/server/handler/openrtb2/VideoHandler.java
#	src/main/java/org/prebid/server/spring/config/DealsConfiguration.java
#	src/main/java/org/prebid/server/spring/config/server/admin/AdminEndpointsConfiguration.java
#	src/main/java/org/prebid/server/spring/config/server/application/ApplicationServerConfiguration.java
#	src/test/java/org/prebid/server/deals/AlertHttpServiceTest.java
#	src/test/java/org/prebid/server/deals/DeliveryStatsServiceTest.java
#	src/test/java/org/prebid/server/deals/PlannerServiceTest.java
#	src/test/java/org/prebid/server/deals/RegisterServiceTest.java
#	src/test/java/org/prebid/server/deals/UserServiceTest.java
#	src/test/java/org/prebid/server/deals/simulation/SimulationAwareHttpBidderRequesterTest.java
#	src/test/java/org/prebid/server/deals/simulation/SimulationAwarePlannerServiceTest.java
#	src/test/java/org/prebid/server/handler/DealsStatusHandlerTest.java
#	src/test/java/org/prebid/server/handler/ForceDealsUpdateHandlerTest.java
#	src/test/java/org/prebid/server/handler/LineItemStatusHandlerTest.java
@And1sS And1sS marked this pull request as ready for review March 6, 2024 14:56
# Conflicts:
#	src/main/java/org/prebid/server/auction/ExchangeService.java
#	src/test/groovy/org/prebid/server/functional/service/PrebidServerService.groovy
#	src/test/groovy/org/prebid/server/functional/tests/privacy/PrivacyBaseSpec.groovy
#	src/test/resources/org/prebid/server/it/deals/premature/responses/test-auction-first-and-second-response.json
#	src/test/resources/org/prebid/server/it/deals/premature/responses/test-auction-first-bid-only-response.json
#	src/test/resources/org/prebid/server/it/deals/premature/responses/test-auction-in-order-response.json
#	src/test/resources/org/prebid/server/it/deals/premature/responses/test-auction-in-reverse-order-response.json
#	src/test/resources/org/prebid/server/it/deals/premature/responses/test-auction-second-bid-only-response.json
#	src/test/resources/org/prebid/server/it/deals/premature/responses/test-auction-third-and-second-response.json
#	src/test/resources/org/prebid/server/it/deals/premature/responses/test-auction-third-bid-only-response.json
#	src/test/resources/org/prebid/server/it/deals/simulation/test-auction-response-1.json
#	src/test/resources/org/prebid/server/it/deals/simulation/test-auction-response-2.json
#	src/test/resources/org/prebid/server/it/deals/test-auction-response.json
@And1sS And1sS added the PBS 3.0 Major release version label Mar 18, 2024
Base automatically changed from remove-pg to master April 5, 2024 02:58
@Net-burst Net-burst changed the title Migrate PBS from using embedded Vert.x to verticals Migrate PBS from using embedded Vert.x to verticles Apr 8, 2024
@Net-burst Net-burst self-requested a review April 8, 2024 21:43
Copy link
Collaborator

@Net-burst Net-burst left a comment

Choose a reason for hiding this comment

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

LGTM

@Net-burst Net-burst merged commit 4ab3cae into master Apr 8, 2024
5 checks passed
@Net-burst Net-burst deleted the verticles branch April 8, 2024 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not port PBS 3.0 Major release version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants