Skip to content

Conversation

@spottsdd
Copy link
Contributor

@spottsdd spottsdd commented Jul 1, 2025

Description

This branch adds the ability to enable AB testing on ads services. You can run two ads services and define what percent of the traffic you want to route to ADS_B.

The default behavior does not require these ADS_* variables to be set. Nginx will default to ads:3030.
When the ADS_B_PERCENT is greater than 0, you will need to define ADS_B_UPSTREAM and uncomment the ads-python service section of docker-compose.yml. You can also set ADS_A_UPSTREAM to a different value if needed.

Also updated nginx and postgres default DD_VERSION values to be the actual versions used.

Important

The branch is based on the ads-java-postgres branch and should be merged after that branch.

How to test

Clone the repo
Checkout this branch
Uncomment the ads-python service section of docker-compose.dev.yml
Set the ADS_B_PERCENT value as a local env, in the .env file, or directly in docker-compose.dev.yml to a value greater than zero.
run docker compose -f docker-compose.dev.yml up -d
View trace data to see both store-ads and store-ads-python present

@spottsdd spottsdd requested review from a team as code owners July 1, 2025 13:46
Copy link
Contributor

@TaraScho TaraScho left a comment

Choose a reason for hiding this comment

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

Looks great! Tested successfully with the test steps. Note that I do not have enough Java knowledge to give good feedback on the updates in java/adsjava, but everything worked as expected.

No blocking feedback - only thought is, it would be useful if somewhere there is documentation specifically about how to turn on A/B testing that covers the steps across the various files. It's well covered under Nginx/Service Proxy Configuration VariablesinREADME, but if I was thinking trying to turn on A/B testing and going to scan the READMEI'm not sure it would be obvious to me where to find the info. TheFeature flags section is a good example of what I would be looking for I think. This is minor though - the comments and updates to the README are probably sufficient for most.

spottsdd and others added 2 commits July 3, 2025 09:13
Co-authored-by: Tara Schofield <taradschofield@gmail.com>
@spottsdd spottsdd merged commit ee4cc55 into main Jul 3, 2025
1 check passed
@spottsdd spottsdd deleted the a-b-testing-ads branch July 3, 2025 16:53
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.

3 participants