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

ruby relay server (FF-3496) #96

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

leoromanovsky
Copy link
Member

@leoromanovsky leoromanovsky commented Dec 16, 2024

support for testing package ruby sdk

@leoromanovsky leoromanovsky marked this pull request as ready for review December 17, 2024 00:26
Base automatically changed from lr/ff-3655/ruby-relay2 to main December 17, 2024 02:13
Copy link
Collaborator

@typotter typotter 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!
Let's get the relay server checked in and then iterate on dynamic SDK versioning and then make sure github workflow integration is working

@@ -12,7 +12,7 @@ docker remove php-relay

docker build . -t Eppo-exp/php-sdk-relay:$VERSION

docker run -p $SDK_RELAY_PORT:$SDK_RELAY_PORT \
docker run -p $SDK_RELAY_PORT:$SDK_RELAY_PORT \
Copy link
Collaborator

Choose a reason for hiding this comment

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

🙌

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
Copy link
Collaborator

Choose a reason for hiding this comment

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

it may be easier to use build-and-run.sh instead of wrapping in a docker container. PHP was probably not the best example of how to set up the run scripts.
I think you'll want to use build-and-run.sh and switch on the platform variable (EPPO_SDK_PLATFORM ) to handle build specifics for each (windows, macos, ubuntu)
build-and-run.sh will also need to install gems at the version specified by SDK_VERSION or github reference specified by SDK_REF

Copy link
Member Author

Choose a reason for hiding this comment

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

I realized ruby is not installed natively!

end
end

def initialize_client_and_wait
Copy link
Collaborator

Choose a reason for hiding this comment

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

💪

client = EppoClient::Client.instance

begin
result = case data['assignmentType']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ruby looks pretty slick. I like this select-expression-return. Kotlin has this as well.

@@ -91,7 +91,7 @@ The following env variable can be set when running the `test-sdk.sh` script

The following components are required to use the the package test runner with a new SDK

1. An **SDK relay server**. This is a REST server running at `localhost:4000` resonding to the [Asssignment and Bandit Request API](#sdk-relay-server)
1. An **SDK relay server**. This is a REST server running at `localhost:4000` responding to the [Asssignment and Bandit Request API](#sdk-relay-server)
Copy link
Collaborator

Choose a reason for hiding this comment

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

🎩 merci

@@ -201,13 +201,11 @@ Any non-empty response

##### SDK Details

`POST /sdk/details`
`GET /sdk/details`
Copy link
Collaborator

Choose a reason for hiding this comment

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

🔧

@@ -102,6 +102,16 @@ else
cp ../scenarios.json test-data/
fi

echo "EPPO_API_HOST $EPPO_API_HOST"
Copy link
Collaborator

Choose a reason for hiding this comment

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

useful var dump! Maybe add a header text and a footer line for delineation?

@typotter
Copy link
Collaborator

Meant to add @leoromanovsky thanks for all the fixes to the sdk-test-runner docs.

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.

2 participants