Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Merge in changes from Beta SDK (Eppo-exp#43)
Browse files Browse the repository at this point in the history
* update gitignore for modern IntelliJ

* change artificat ID for beta

* Bandit random action placeholder (#1)

* ability to pass in assignment options and attributes

* simple test case

* placeholder bandit algorithm in place

* small changes from self-review

* more helpful RAC read failure message

* WIP wiring up logging

* log bandit info as well

* preserve bandit test data

* feedback from PR and adjust indention to match rest of project

* use Math.abs() as its more readable

* trailing newlines

* Bandit as a dynamic variant (#2)

* use dynamic variations

* separate bandit logger

* ability to log non-bandit selected control

* log variation not bandit boolean

* remove now unused class

* feedback from PR

* Deserialize and store bandit parameters (#3)

* deserialize bandit parameters

* cleaned up

* updated to break out subject and action attributes

* genericize configuration requestor

* changes from self-reivew of PR

* Falcon model for bandit parameter evaluation (#4)

* work in progress

* math in place

* working on tests still

* tests passing

* new test cases

* wip manually verifying math

* tests passing

* remove logging

* clean up score computation

* changes from self-reivew of PR

* consolidate test bandit rac setup code

* clean up test file

* update comments

* more comment improvements

* feedback from PR; mainly cleanup and adding some tuning parameters

* Have bandit logger separate out context (#5)

* work in progress

* math in place

* working on tests still

* tests passing

* new test cases

* wip manually verifying math

* tests passing

* remove logging

* clean up score computation

* changes from self-reivew of PR

* consolidate test bandit rac setup code

* clean up test file

* update comments

* more comment improvements

* failing tests in place

* break out attributes by type

* changes from self-review of PR

* return type as provided

* make EppoValue constructor private

* feedback from PR

* more fault tolerant reading of properties file (#6)

* catch all exceptions; unit test (#7)

* Rename BANDIT algorithm type to CONTEXTUAL_BANDIT to match Eppo (#8)

* catch all exceptions; unit test

* conform bandit algorithm type

* Add test for cold start (#9)

* explicit test for cold start

* upgrade gcloud to appease linter

* update deserializer test

* Convenience methods to serialize attributes to JSON string and other cleanup (#10)

* add back in isXXX checks

* helper function for JSON string serialization

* rename variation to banditKey for bandit logging

* remove accidentally added junit

* Prepare beta SDK for merge into Main one (#11)

* add graceful mode by default that does not throw exceptions (FF-949) (Eppo-exp#29)

* add graceful mode by default that does not throw exceptions (FF-949)

* test graceful mode on and off

* test all functions

* remove from javadoc

* Bump com.github.tomakehurst:wiremock-jre8 from 2.33.2 to 2.35.1 (Eppo-exp#28)

Bumps [com.github.tomakehurst:wiremock-jre8](https://github.com/wiremock/wiremock) from 2.33.2 to 2.35.1.
- [Release notes](https://github.com/wiremock/wiremock/releases)
- [Commits](wiremock/wiremock@2.33.2...2.35.1)

---
updated-dependencies:
- dependency-name: com.github.tomakehurst:wiremock-jre8
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add compatibility for java 8 (Eppo-exp#35)

* java8 compatibility using apache httpclient

* cleanup

* added timeouts

* add maven-gpg-plugin

* test across java 8, 11, 17

* pom

* remove List.of

* fix test

* eppo value

* fix plugin

* profile

---------

Co-authored-by: Gaurav Arora <[email protected]>

* Bump org.apache.httpcomponents:httpclient from 4.5.10 to 4.5.13 (Eppo-exp#36)

Bumps org.apache.httpcomponents:httpclient from 4.5.10 to 4.5.13.

---
updated-dependencies:
- dependency-name: org.apache.httpcomponents:httpclient
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [EN-17858] FetchConfigurationsTask is more fault tolerant (#5) (Eppo-exp#32)

* [EN-17858] FetchConfigurationsTask is more fault tolerant

* revert change to pom.xml, thereby having a single, clean commit that can be merged back to the Eppo main repo

* bump to version 2.2.0 (Eppo-exp#38)

* add support for semver rule evaluation (FF-1569) (Eppo-exp#39)

* add support for semver rule evaluation (FF-1569)

* azul builds

* adjust unit tests for semver comparison

* numeric first

* add back in isXXX checks

* helper function for JSON string serialization

* rename variation to banditKey for bandit logging

* remove accidentally added junit

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Leo Romanovsky <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gaurav Arora <[email protected]>
Co-authored-by: Simon Dale <[email protected]>

* remove duplicate test dependency

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Leo Romanovsky <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gaurav Arora <[email protected]>
Co-authored-by: Simon Dale <[email protected]>
  • Loading branch information
5 people committed May 13, 2024
1 parent feea494 commit c1a5823
Show file tree
Hide file tree
Showing 51 changed files with 2,156 additions and 312 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/lint-test-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
java-version: ['8', '11', '17'] # Define the Java versions to test against
steps:
- uses: actions/checkout@v3

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: 'adopt'

- name: 'Set up GCP SDK'
uses: 'google-github-actions/setup-gcloud@v0'
uses: 'google-github-actions/setup-gcloud@v2'

- name: Run tests
run: make test
4 changes: 2 additions & 2 deletions .github/workflows/publish-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
gpg-passphrase: GPG_PASSPHRASE

- name: 'Set up GCP SDK for downloading test data'
uses: 'google-github-actions/setup-gcloud@v0'
uses: 'google-github-actions/setup-gcloud@v2'

- name: Download test data
run: make test-data
Expand All @@ -31,7 +31,7 @@ jobs:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Publish package
run: mvn nexus-staging:release
env:
Expand Down
38 changes: 34 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
# Shared test files
src/test/resources/assignment-v2
src/test/resources/rac-experiments-v3.json

### IntelliJ IDEA ###
*.iml
.idea/
target/
out/
src/test/resources/assignment-v2
src/test/resources/rac-experiments-v*.json
.DS_Store
target/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
18 changes: 10 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,20 @@ build: test-data
mvn --batch-mode --update-snapshots package

## test-data
testDataDir := src/test/resources/
tempDir := ${testDataDir}temp/
gitDataDir := ${tempDir}sdk-test-data/
testDataDir := src/test/resources
banditsDataDir := ${testDataDir}/bandits
tempDir := ${testDataDir}/temp
tempBanditsDir := ${tempDir}/bandits
gitDataDir := ${tempDir}/sdk-test-data
branchName := main
githubRepoLink := https://github.com/Eppo-exp/sdk-test-data.git
.PHONY: test-data
test-data:
rm -rf $(testDataDir)
mkdir -p $(tempDir)
test-data:
find ${testDataDir} -mindepth 1 ! -regex '^${banditsDataDir}.*' -delete
mkdir -p ${tempDir}
git clone -b ${branchName} --depth 1 --single-branch ${githubRepoLink} ${gitDataDir}
cp ${gitDataDir}rac-experiments-v3.json ${testDataDir}
cp -r ${gitDataDir}assignment-v2 ${testDataDir}
cp ${gitDataDir}/rac-experiments-v3.json ${testDataDir}
cp -r ${gitDataDir}/assignment-v2 ${testDataDir}
rm -rf ${tempDir}

.PHONY: test
Expand Down
21 changes: 19 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>cloud.eppo</groupId>
<artifactId>eppo-server-sdk</artifactId>
<version>2.3.0</version>
<version>2.4.0</version>

<name>${project.groupId}:${project.artifactId}</name>
<description>Eppo Server-Side SDK for Java</description>
Expand Down Expand Up @@ -107,6 +107,11 @@
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.12</version>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
Expand All @@ -125,6 +130,18 @@
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>1.5.1</version>
<scope>test</scope>
</dependency>
</dependencies>

<distributionManagement>
Expand Down Expand Up @@ -206,4 +223,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
Loading

0 comments on commit c1a5823

Please sign in to comment.