-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 \ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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'] |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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` |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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?
Meant to add @leoromanovsky thanks for all the fixes to the sdk-test-runner docs. |
support for testing package ruby sdk