Repository navigation
Spark + Databricks support #905
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
Closed
Closed
Changes from all commits
Commits
Show all changes
488 commits
Select commit
Hold shift + click to select a range
f4c29e7
Merge branch 'master' into databricks_job_manager
ben-voz 0f6ea16
Merge branch 'databricks_job_manager' of github.com:farfetch-external…
ben-voz e37c10b
update proto package paths
ben-voz e308495
resolve pom.xml merge conflict
ben-voz 4a89207
.
algattik 52b2642
Merge branch 'master' into algattik/databricks-emulator
algattik 8cf23bc
Moved spark.version to root POM
algattik 6bd89d9
Merge branch 'algattik/databricks-emulator' into algattik/spark-inges…
algattik eb29fd0
dataflowjobmanager cleanup
ben-voz 27292b6
Update SparkIngestion.scala
algattik 938512c
Increased memory for unit tests
algattik a4862b9
Merge branch 'algattik/databricks-emulator' into algattik/spark-inges…
algattik f866c66
.
algattik c647d05
Added Databricks test configuration
algattik e15b3c2
Merge branch 'algattik/databricks-emulator' into algattik/spark-inges…
algattik dd0840c
Update SparkIngestion.scala
algattik b8fbe48
Fixed logging
algattik 4939ebc
Fixed port
algattik 2869b40
Added support for application parameters
algattik d2f7833
Added Kafka jars
algattik 55378bb
Update Dockerfile
algattik 63dbdb4
Merge branch 'algattik/databricks-emulator' into algattik/spark-inges…
algattik e076cd2
Enabled UT in build
algattik 8f2bf8a
Merge branch 'algattik/databricks-emulator' into algattik/spark-inges…
algattik 74a3f5c
DatabricksJobManager: refactor to use create + run-now APIs
ben-voz 05a4262
DatabricksJobManager - build run now request
ben-voz a9cee31
DatabricksJobManager: cleanup
ben-voz a1419a1
fix test for starting databricks job
ben-voz 32b26ac
Changed Lombok to AutoValue
algattik 7740ae0
add new proto for databricks runner
ff-mriko-morandi f1cc709
Increase Jaeger Tracing coverage (#719)
terryyylim 6aeb6d6
Add S3 staging support to python client SDK (#706)
jmelinav 9f6aa74
KE-643 Use create and run-now API
algattik 6c707e5
Merge branch 'algattik/databricks-emulator' into algattik/spark-inges…
algattik 0c47684
fix DatabricksJobManager tests
ben-voz 88e43a8
Created databricks-emulator (#13)
algattik 877a2d1
Merge branch 'master' into algattik/spark-ingestion
algattik 0b56e63
remove spark dir to resolve conflicts
ben-voz 9cbfa04
resolve conflicts
ben-voz 8bf52f2
update databricks job manager - use new databricks types
ben-voz dd63b45
Merge branch 'feature-s3-staging' of https://github.com/jmelinav/feas…
jmelinav 8c07d40
Data Science test scenarios (#18)
algattik 3167b29
added pydocs
jmelinav edd6096
.
algattik 30c7a1b
.
algattik 8eff41c
Merge branch 'master' into algattik/spark-ingestion
algattik e2e357c
Update test-docker-compose-databricks.sh
algattik 8c97e59
Update Dockerfile
algattik 6ec3a75
pass kafka topics/brokers for databricks job
ben-voz 2d7493b
use list instead of sparksubmitparams value object
ben-voz 84a33ed
remove coverage dependency
ben-voz c9bccaa
Store delta into columns
algattik 1ab0b6e
Update SparkIngestionTest.java
algattik 2b2ca3e
some extra comments on the application.yml structure and fields
ff-mriko-morandi cdc5641
Skip tests under Java 11
algattik 6f17c63
remove databricksJobConfig
ben-voz c608779
Add Databricks types to get request
ff-mriko-morandi f58dac3
Add support for Optional result_state as that's only provided when th…
ff-mriko-morandi 11f52ec
Merge branch 'databricks_job_manager' of github.com:farfetch-external…
ff-mriko-morandi 2762395
Merge branch 'feature-s3-staging' into algattik/python-sdk-wasb
algattik 3680f4d
Added Azure storage support
algattik 20a73f0
some improvements from the PR
ff-mriko-morandi cf54678
Added abort job implementation to job manager class
Basma-Elsaify 2df386c
Merge branch 'databricks_job_manager' of github.com:farfetch-external…
Basma-Elsaify 64c654d
Linting & UT fixes
algattik ef0cf32
Linting fix
algattik 0ed3911
Update core/pom.xml
ben-voz 9d1e111
Update core/pom.xml
ben-voz 66ee9a1
Merge branch 'master' into databricks_job_manager
algattik 454b08f
fixed issue with bytes conversion
ff-mriko-morandi ee75a08
Merge branch 'databricks_job_manager' of github.com:farfetch-external…
ff-mriko-morandi 2183d5c
Fixed serialization of Optional types
algattik 64447f9
Fixes for integration with SparkIngestion spark job
algattik d2eba9b
Merge branch 'databricks_job_manager' of github.com:farfetch-external…
ff-mriko-morandi 1ab32e3
Add number in job property
ff-mriko-morandi e967636
Add support for missing items in json response
ff-mriko-morandi d223257
removed settings from proto and minor improvements on job manager
ff-mriko-morandi d6a3b0a
Move array list creation to singletonList
ff-mriko-morandi 392fc4d
Fixed FeatureSetSpecs passed to Spark jobs
algattik aefeeae
fix databricks job manager tests
ben-voz 708cc93
Relocate vendored dependencies
algattik baa9c05
Naming fixes
algattik 8ef3080
Fixed UT for numberInJob attribute
algattik b8cc234
Merge branch 'databricks_job_manager' of https://github.com/farfetch-…
algattik d3b88b8
Syntax fixes from PR review
algattik 5013b5f
Added UT for FeatureRowToSparkRow
algattik de5e3cd
Refactored to distinct classes for Redis and Delta sinks
algattik a237c18
Merge pull request #21 from farfetch-external/algattik/python-sdk-wasb
algattik c9b9dc6
Update SparkDeltaSink.java
algattik 7222ba6
Update core/src/main/java/feast/core/job/databricks/DatabricksJobStat…
ben-voz 2f87d68
clean databricks job manager
ben-voz 59d0007
Merge branch 'databricks_job_manager' of github.com:farfetch-external…
ben-voz 982ac6a
Improved UTs for complex values
algattik 1828efd
Linting fixes
algattik b4d7583
add private constructor for static util class
ben-voz d48823b
Fixed Runs cancel endpoint to be POST, not GET
algattik 82c24dd
Linting fixes
algattik 540a85d
Fixed API data type
algattik 4842320
Improved logging
algattik 823ed81
fix DatabricksJobStateMapper + tidy tests
ben-voz 3e51cf8
resolve conflicts
ben-voz cf822b4
Databricks Job Manager - clean status code checks
ben-voz d1f8a9e
Merge branch 'master' into algattik/spark-ingestion
algattik 97e73f9
Added javadoc
algattik c2cf399
Linting fixes
algattik 802b24a
Update SparkIngestion.java
algattik c139798
Refactor waitForJobStatus to support different situations and add con…
ff-mriko-morandi 1845040
removed metrics properties
ff-mriko-morandi 5714739
fix lint
ff-mriko-morandi 40c57af
chain setting values with new builder
ben-voz ccafddc
remove terminal control from waitForJobStatus to caller
ff-mriko-morandi a9407d5
Merge remote-tracking branch 'origin/databricks_job_manager' into dat…
ff-mriko-morandi 10adfd3
linting fix
ff-mriko-morandi cbb116c
adjust databricks runner name to proper standard
ff-mriko-morandi 60428ad
[skip-ci] Example notebook for versioning.
Yanson 3e49cb4
Merge remote-tracking branch 'farfetch/master' into master-ff
Yanson 24c0486
Merge pull request #16 from farfetch-external/algattik/spark-ingestion
algattik 76deb09
Algattik/654 fraud scenario (#22)
algattik 43bd7fa
Update application.yml
algattik 8eeeffb
Merge branch 'master' into databricks_job_manager
algattik 22ddaff
Made runs cancel more robust
algattik baa9b98
Enable redis tests
algattik 20dd9af
cleaned error messages and logging
ff-mriko-morandi 65537f3
Params maxRetries and sparkConf
algattik bf11e3b
fix job manager test
ben-voz e4a0229
refactor uri for get request
ff-mriko-morandi ef433d8
refactor all uri creations
ff-mriko-morandi a383336
Added timeout option (for e2e tests)
algattik 12b241b
Added UT for job state mapper
algattik b999861
Merge pull request #19 from farfetch-external/databricks_job_manager
ff-mriko-morandi 36e7fa4
Dockerize jupyter e2e test image (#29)
algattik 4d09bc2
KE-740: increase DatabricksJobManager test coverage (#31)
ben-voz dad9ffe
Terraform CI/CD env (#25)
algattik 211828e
CI/CD pipeline on SparkRunner (#36)
algattik 9d3c768
script to start long running tests
polatengin ea84f63
script that stops a long running test
polatengin 156fdbc
project name and initial id fields added
polatengin 5a2c056
project name and initial id fields used in the tests
polatengin e005ae1
add exception handling when reading readme file
ff-mriko-morandi 74b2475
remove previous change and add only exception handling
ff-mriko-morandi b456ec7
Merge remote-tracking branch 'origin/handle_missing_readme' into hand…
ff-mriko-morandi 0319262
re-add wrongly added changes
ff-mriko-morandi 7eda606
Merge pull request #45 from farfetch-external/handle_missing_readme
ff-mriko-morandi 64a3a99
Update tests/start.sh
polatengin 08c9bbd
Update tests/start.sh
polatengin 68f1bf1
Update tests/start.sh
polatengin d8d7adf
script files renamed
polatengin b96aea0
stop script name fixed
polatengin 1ed3a27
disable compile-protos-go build step (#46)
ben-voz 559bf4a
Use Databricks API Runs Submit (#41)
algattik 4985884
initial_entity_id converted to int before returning
polatengin 548c120
add timeouts for gRPC connections
ff-mriko-morandi 8125b7f
Add some constants
ff-mriko-morandi 208696b
Update tests/create-kubernetes-cron-job.sh
polatengin 2b7e047
Merge pull request #48 from farfetch-external/KE-799_fix_databricks_i…
PaulDFoster 57a3667
Merge branch 'master' into enpolat/KE-754
polatengin 3c00ead
Spark checkpoint (#38)
algattik 3dd7e22
Add upload to pypi repo step
ff-mriko-morandi 59fe3e9
disabled upload to pypi to avoid conflict with github
ff-mriko-morandi 6f32909
add support for Databricks artifact upload
ff-mriko-morandi 8b2955b
add auth for databricks
ff-mriko-morandi c5cca62
Add python protos compilation
ff-mriko-morandi c338d50
move upload before e2e test
ff-mriko-morandi 2f770e9
add support for pypi init script in terraform
ff-mriko-morandi 2a478e9
force python 3 for artifact publishing
ff-mriko-morandi c0af338
undo latest change
ff-mriko-morandi c787df8
force use of python 3 (fixed)
ff-mriko-morandi b8ca1ec
reset last change
ff-mriko-morandi 93e9115
add extra step for uploading artifacts
ff-mriko-morandi f5608df
fix yaml
ff-mriko-morandi e557779
remove python constraint
ff-mriko-morandi d51be18
restore working ci workflow
ff-mriko-morandi 5b547d3
create temporary file in TF
ff-mriko-morandi 5b697f6
Databricks terraform module bugfix: removed workaround (#39)
algattik 14708b8
Storage staging to ABFSS (#52)
algattik a4effaa
cron job id parameter issue fixed
polatengin 5980a6b
set password in redis
isabelcabezasm 89d9f64
host and password as enviroment variables
isabelcabezasm d08261d
attempt at using python3 for databricks artifact generation
ff-mriko-morandi add3f5e
attempt at using python3 for databricks artifact generation #2
ff-mriko-morandi f67f76b
attempt at using python3 for databricks artifact generation #3
ff-mriko-morandi ed9902c
disabled local init script
ff-mriko-morandi a81d80f
fix version to 3.7
ff-mriko-morandi c4cb30d
attempt at using a global python 3.7 version
ff-mriko-morandi 402a8b1
attempt at using a global python 3.6 version
ff-mriko-morandi 668df42
fix databricks cli to configure via echoed input
ff-mriko-morandi 2dce646
restore 2.x because of databricks bug and disable databricks artifact…
ff-mriko-morandi 0652fc2
re-enable local file and temporarily stop infra desctruction
ff-mriko-morandi b77f34b
core and online serving urls fixed
polatengin 2cd6e3b
add support for automated creation of secrets for pypi
ff-mriko-morandi 0b7af0c
some cleanup
ff-mriko-morandi 23e9e7f
add dbfs file for init script
ff-mriko-morandi d0d77be
add init pypi file to scripts folder and add it to TF
ff-mriko-morandi 06b0b44
fixed path
ff-mriko-morandi a279afa
NOT PR - DO NOT MERGE - test
isabelcabezasm 1bf2eca
NOT PR - DO NOT MERGE
isabelcabezasm a26c9df
NOT PR - DO NOT MERGE
isabelcabezasm 66339bb
NOT PR - DO NOT MERGE
isabelcabezasm dc2b8da
NOT PR - DO NOT MERGE
isabelcabezasm 5096fa0
add initial cluster setup
ff-mriko-morandi df77bbc
NOT PR - DO NOT MERGE
isabelcabezasm 79ccc01
refactor cluster creation
ff-mriko-morandi 5cd6346
NOT PR - DO NOT MERGE
isabelcabezasm da9ca8c
add dbfs prefix
ff-mriko-morandi 0e92b49
Merge pull request #42 from farfetch-external/enpolat/KE-754
PaulDFoster 4f75b68
KE-772 - Add authentication (password) to Redis
isabelcabezasm e862b2e
Spark historical job + runner (#37)
eadgbear 28a19e2
test cluster creation without init script
ff-mriko-morandi 8fd5264
minor fixes for init script and its location
ff-mriko-morandi f9b6879
Merge remote-tracking branch 'origin/master' into isacabe/KE-772_redi…
isabelcabezasm 9e33efa
moved artifact upload after tests and implement some comments from PR
ff-mriko-morandi bf6ffa6
Merge branch 'master' of github.com:farfetch-external/data-ds-feast i…
ff-mriko-morandi e453cc2
unneeded PROJECT_NAMEe variable removed
polatengin 4a3d557
fix wrongly moved kubectl setup
ff-mriko-morandi 3a17cbc
make the init script global
ff-mriko-morandi 8683279
add a password for the redis container forthe dev enviroment.
isabelcabezasm 511ba3a
add a password for the redis container for the dev environment.
isabelcabezasm 045e1ca
"put your password here" should be a valid password
isabelcabezasm 7f5a42e
Merge pull request #62 from farfetch-external/isacabe/KE-772_redis_pa…
2e4d6f1
fixed the recreation of the project on every test run and fixed the u…
mariekekortsmit f73629a
Ingestion tests & Delta MERGE rows deduplication (#56)
algattik f0a4254
Enable data types in Redis tests (#58)
algattik 6d7950a
remove deprecated init script configuration as it is now global and w…
ff-mriko-morandi 4ea5a12
Merge pull request #63 from farfetch-external/enpolat-makortsm/KE-971
polatengin 0e7bfc1
Merge pull request #54 from farfetch-external/add_artifact_upload
ff-mriko-morandi 86e8a6b
KE-805: Add validation logic to spark. (#47)
ben-voz 29071f1
KE-908 Store dead-letter messages (#68)
algattik c84b103
redis password on databricks.yml
isabelcabezasm 432bfc0
allow empty redis password
isabelcabezasm e832aa2
allow empty redis password
isabelcabezasm 0b7915a
allow empty redis password
isabelcabezasm 4e97edc
allow empty redis password
isabelcabezasm d568a7a
accepting Alexandre's PR suggestions (pass=> password & trimToNull)
isabelcabezasm 8cc92a8
Fix deadletter storage for docker-compose tests (#74)
algattik e57411e
Merge tag 'v0.6.0' into algattik/rebase-0.6
algattik f775643
added Vitor's suggestion (setPass on ImportJobTest)
isabelcabezasm 8ac0733
Merge pull request #72 from farfetch-external/isacabe/KE-998_redis_em…
60fbec4
adding FEAST_BATCH_JOB_STAGING_LOCATION variable to env.sample file
isabelcabezasm 7ab0aa6
Merge pull request #78 from farfetch-external/isacabe/KE-998_redis_em…
5ecc7c3
Rebase to Feast 0.6.0 - custom code adaptation (#80)
algattik 8ebcf58
Merge branch 'master' into algattik/rebase-0.6
algattik abd4605
Update TestUtil.java
algattik 15d9950
Rebase to Feast 0.6.0 - Merge pull request #75 from farfetch-external…
algattik 25f589f
Feast 0.6.0 - Run single Spark job to ingest to both Redis and Delta …
algattik 4f3cc25
Feast 0.6 - simplify Spark ingestion classes (#86)
algattik 353e198
introduce fix to process pool leak from https://github.com/feast-dev/…
ff-mriko-morandi f9c8de8
Merge pull request #92 from farfetch-external/fix_process_pool_leak
ff-mriko-morandi ef687d3
Merge OSS Feast 0.6.1 (#91)
algattik b298b99
Merge remote-tracking branch 'farfetch/master' into ff-ms-spark
Yanson b04edfb
Remove unused farfetch files and minor alignment with 0.6 branch.
Yanson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,312 @@ | ||
| name: ci | ||
|
|
||
| on: | ||
| # Trigger the workflow on push or pull request, | ||
| # but only for the master branch | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| branches: | ||
| - master | ||
|
|
||
| env: | ||
| # - change per env | ||
| TF_VAR_project_name: fffeastcd | ||
|
|
||
| # - account used to access the internal pypi repository | ||
| TF_VAR_pypi_user: ci | ||
|
|
||
| # - optionally change per env | ||
| TERRAFORM_BACKEND_STORAGE_ACCOUNT_RESOURCE_GROUP_NAME: fffeasttf | ||
| # - change per env | ||
| # - manually crate this storage account in the | ||
| # resource group TERRAFORM_BACKEND_STORAGE_ACCOUNT_RESOURCE_GROUP_NAME | ||
| TERRAFORM_BACKEND_STORAGE_ACCOUNT_NAME: fffeastcdtf | ||
| # - manually create this container in the created storage account | ||
| TERRAFORM_BACKEND_CONTAINER_NAME: terraform | ||
|
|
||
| # no need to change those | ||
|
|
||
| # Base name for images published into ACR (with -core, -serving suffix) | ||
| CONTAINERREGISTRY_IMAGENAMEBASE: fffeast | ||
|
|
||
| # Blob names used to store state in Terraform backend | ||
| TERRAFORM_BACKEND_BLOB_PATH_INFRA: infra | ||
| TERRAFORM_BACKEND_BLOB_PATH_APP: app | ||
|
|
||
| # Name of end-to-end test pod | ||
| E2E_TEST_POD: e2e-test | ||
|
|
||
| DOCKER_COMPOSE: docker-compose -f infra/docker-compose/docker-compose.yml -f infra/docker-compose/docker-compose.online.yml -f infra/docker-compose/docker-compose.databricks.yml | ||
|
|
||
| jobs: | ||
|
|
||
| build-and-test: | ||
|
|
||
| # Run the job on a self-hosted agent VM. The VM will cache Docker layers, which considerably speeds up the build. | ||
| runs-on: self-hosted | ||
| steps: | ||
|
|
||
| # Delete any files left from the previous build, including files owned by root created by Docker in mounted volumes. | ||
| - name: Clean current directory | ||
| run: shopt -s dotglob; sudo rm -rf * | ||
|
|
||
| # Checkout sources from Git | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup Terraform | ||
| uses: hashicorp/setup-terraform@v1 | ||
| with: | ||
| terraform_version: 0.12.24 | ||
| terraform_wrapper: false | ||
|
|
||
| - name: Set Terraform variables infra | ||
| run: | | ||
| echo ::set-env name=ARM_CLIENT_ID::${{ secrets.ARM_CLIENT_ID }} | ||
| echo ::set-env name=ARM_CLIENT_SECRET::${{ secrets.ARM_CLIENT_SECRET }} | ||
| echo ::set-env name=ARM_SUBSCRIPTION_ID::${{ secrets.ARM_SUBSCRIPTION_ID }} | ||
| echo ::set-env name=ARM_TENANT_ID::${{ secrets.ARM_TENANT_ID }} | ||
|
|
||
| - name: Terraform init infra | ||
| # cache plugin locally to avoid re-downloading it at every run | ||
| run: TF_PLUGIN_CACHE_DIR=$HOME/.terraform.d/plugin-cache terraform init -input=false -backend-config=container_name="$TERRAFORM_BACKEND_CONTAINER_NAME" -backend-config=key="$TERRAFORM_BACKEND_BLOB_PATH_INFRA" -backend-config=storage_account_name="$TERRAFORM_BACKEND_STORAGE_ACCOUNT_NAME" -backend-config=resource_group_name="$TERRAFORM_BACKEND_STORAGE_ACCOUNT_RESOURCE_GROUP_NAME" | ||
| working-directory: infra/terraform/infra | ||
|
|
||
| - name: Terraform plan infra | ||
| run: terraform plan -out=tfplan -input=false | ||
| working-directory: infra/terraform/infra | ||
|
|
||
| - name: Terraform apply infra | ||
| run: terraform apply -input=false -auto-approve tfplan | ||
| working-directory: infra/terraform/infra | ||
|
|
||
| - name: Terraform outputs infra | ||
| run: | | ||
| # Set a TF_VAR_ environment variable for each terraform output. | ||
| # Mask any secret terraform output. | ||
| terraform output -json | jq -r ' | ||
| . as $in | ||
| | keys[] | ||
| | ($in[.].value | tostring | gsub("\\\\"; "\\\\") | gsub("\n"; "\\n")) as $value | ||
| | ($in[.].sensitive | tostring) as $sensitive | ||
| | [ | ||
| if $in[.].sensitive then "::add-mask::" + $value else "" end, # mask value in console output | ||
| "::set-env name=TF_VAR_" + . + "::" + $value # set value as environment variable | ||
| ] | ||
| | .[]' | ||
| working-directory: infra/terraform/infra | ||
|
|
||
| # Cache the Maven repository across runs. | ||
| - name: Cache Maven repository | ||
| id: cache-maven | ||
| uses: actions/cache@v1 | ||
| with: | ||
| path: .m2 | ||
| key: ${{ runner.os }}-mavenr-${{ hashFiles('**/pom.xml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-mavenr- | ||
|
|
||
| # Generate the Maven cache if needed by running a throwaway build of Feast. | ||
| # --user: run as the host user, to avoid writing .m2 files to the host as root. | ||
| # -e MAVEN_CONFIG: See https://github.com/carlossg/docker-maven#running-as-non-root | ||
| # -v $PWD:/build: mount the current directory to write .m2 files onto the host. | ||
| - name: Generate Maven cache | ||
| if: steps.cache-maven.outputs.cache-hit != 'true' | ||
| run: docker run --rm --user $(id -u):$(id -g) -e MAVEN_CONFIG=/build/.m2 -v $PWD:/build maven:3.6-jdk-11 bash -c "cp -R /build /tmp && mvn -f /tmp/build -Dmaven.repo.local=/build/.m2/repository -Dgpg.skip=true -B clean verify -DskipTests" | ||
|
|
||
| - name: Set image name and version settings for docker-compose | ||
| run: | | ||
| echo "::set-env name=COMPOSE_PROJECT_NAME::feast" | ||
| echo "::set-env name=FEAST_VERSION::v${{ github.sha }}" | ||
| echo "::set-env name=FEAST_CORE_IMAGE::$TF_VAR_acr_login_server/$CONTAINERREGISTRY_IMAGENAMEBASE-core" | ||
| echo "::set-env name=FEAST_SERVING_IMAGE::$TF_VAR_acr_login_server/$CONTAINERREGISTRY_IMAGENAMEBASE-serving" | ||
| echo "::set-env name=FEAST_JUPYTER_IMAGE::$TF_VAR_acr_login_server/$CONTAINERREGISTRY_IMAGENAMEBASE-jupyter" | ||
| echo "::set-env name=FEAST_DATABRICKS_EMULATOR_IMAGE::databricks-emulator-dev" | ||
|
|
||
| # Build images in parallel. | ||
| - name: Build Feast runtime images | ||
| run: $DOCKER_COMPOSE build --parallel core online-serving jupyter databricks-emulator | ||
|
|
||
| # Login to Azure Container Registry. | ||
| - name: Login to Azure Container Registry | ||
| uses: azure/docker-login@v1 | ||
| with: | ||
| login-server: ${{ env.TF_VAR_acr_login_server }} | ||
| username: ${{ env.TF_VAR_acr_admin_username }} | ||
| password: ${{ env.TF_VAR_acr_admin_password }} | ||
|
|
||
| # Promote successfully tested container to Azure Container Registry. | ||
| - name: Push image to ACR | ||
| run: $DOCKER_COMPOSE push core online-serving jupyter | ||
|
|
||
| # Install python to enable Databricks CLI install (for workaround for | ||
| # databricks provider DBFS bug) | ||
| - uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: '2.x' | ||
|
|
||
| - name: Upload Spark JARs | ||
| run: | | ||
| set -ex | ||
| docker rm spark-jobs || true | ||
| docker create --name spark-jobs ${FEAST_DATABRICKS_EMULATOR_IMAGE}:${FEAST_VERSION} | ||
| mkdir -p sparkjars | ||
| docker cp spark-jobs:/opt/sparkjars sparkjars | ||
| docker rm spark-jobs | ||
| echo "::set-env name=TF_VAR_spark_job_jars::$PWD/sparkjars" | ||
|
|
||
| - name: Set kubeconfig | ||
| run: | | ||
| base64 -d <<<"$TF_VAR_kube_config" > kube_config | ||
| echo "::set-env name=KUBECONFIG::$PWD/kube_config" | ||
|
|
||
| - name: Install Terraform databricks provider | ||
| run: curl https://raw.githubusercontent.com/databrickslabs/databricks-terraform/master/godownloader-databricks-provider.sh | bash -xs -- -b $HOME/.terraform.d/plugins | ||
|
|
||
| - name: Set Terraform variables app | ||
| run: | | ||
| echo "::set-env name=TF_VAR_feast_core_image_repository::$FEAST_CORE_IMAGE" | ||
| echo "::set-env name=TF_VAR_feast_serving_image_repository::$FEAST_SERVING_IMAGE" | ||
| echo "::set-env name=TF_VAR_feast_version::$FEAST_VERSION" | ||
| echo "::set-env name=TF_VAR_run_number::$GITHUB_RUN_NUMBER" | ||
| echo "::set-env name=TF_VAR_pypi_repo:::${{ secrets.PYPI_REPO }}" | ||
| echo "::set-env name=TF_VAR_pypi_password:::${{ secrets.PYPI_PWD }}" | ||
|
|
||
| - name: Terraform init app | ||
| # cache plugin locally to avoid re-downloading it at every run | ||
| run: TF_PLUGIN_CACHE_DIR=$HOME/.terraform.d/plugin-cache terraform init -input=false -backend-config=container_name="$TERRAFORM_BACKEND_CONTAINER_NAME" -backend-config=key="$TERRAFORM_BACKEND_BLOB_PATH_APP" -backend-config=storage_account_name="$TERRAFORM_BACKEND_STORAGE_ACCOUNT_NAME" -backend-config=resource_group_name="$TERRAFORM_BACKEND_STORAGE_ACCOUNT_RESOURCE_GROUP_NAME" | ||
| working-directory: infra/terraform/app | ||
|
|
||
| - name: Terraform destroy app | ||
| run: terraform destroy -input=false -auto-approve | ||
| working-directory: infra/terraform/app | ||
|
|
||
| - name: Terraform plan app | ||
| run: terraform plan -out=tfplan -input=false | ||
| working-directory: infra/terraform/app | ||
|
|
||
| - name: Terraform apply app | ||
| run: terraform apply -input=false -auto-approve tfplan | ||
| working-directory: infra/terraform/app | ||
|
|
||
| - name: Cancel any active Databricks runs | ||
| run: | | ||
| set -euo pipefail | ||
| export DATABRICKS_HOST="$TF_VAR_databricks_workspace_url" | ||
| export DATABRICKS_TOKEN=$(terraform output databricks_token) | ||
| set -x | ||
| pip install databricks-cli | ||
| databricks runs list --active-only | cut -f1 -d ' ' | xargs -tr -n1 databricks runs cancel --run-id | ||
| working-directory: infra/terraform/app | ||
|
|
||
| - name: Compile Python protos | ||
| run: set -e make compile-protos-python | ||
|
|
||
| - uses: azure/setup-kubectl@v1 | ||
|
|
||
| - name: Prepare e2e test pod and clear Redis data | ||
| run: | | ||
| set -ex | ||
|
|
||
| kubectl delete secret azure-e2e-test || true | ||
| kubectl create secret generic azure-e2e-test --from-literal=AZURE_CLIENT_SECRET="$ARM_CLIENT_SECRET" | ||
|
|
||
| # Start e2e test pod | ||
| kubectl delete pod "$E2E_TEST_POD" || true | ||
| kubectl run "$E2E_TEST_POD" --restart=Never --image "$FEAST_JUPYTER_IMAGE:$FEAST_VERSION" --overrides=' | ||
| { | ||
| "spec": { | ||
| "containers": [ | ||
| { | ||
| "name": "'$E2E_TEST_POD'", | ||
| "image": "'$FEAST_JUPYTER_IMAGE':'$FEAST_VERSION'", | ||
| "resources": { | ||
| "limits": { | ||
| "memory": "4Gi" | ||
| } | ||
| }, | ||
| "env": [ | ||
| { | ||
| "name": "AZURE_TENANT_ID", | ||
| "value": "'$ARM_TENANT_ID'" | ||
| }, | ||
| { | ||
| "name": "AZURE_CLIENT_ID", | ||
| "value": "'$ARM_CLIENT_ID'" | ||
| }, | ||
| { | ||
| "name": "AZURE_CLIENT_SECRET", | ||
| "valueFrom": { | ||
| "secretKeyRef": { | ||
| "name": "azure-e2e-test", | ||
| "key": "AZURE_CLIENT_SECRET" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| }' | ||
|
|
||
| # While the test pod is starting, clear all data from Redis | ||
| kubectl run -it --rm --restart=Never --image=redis redisflush$GITHUB_RUN_NUMBER --command -- redis-cli -h $TF_VAR_redis_hostname FLUSHALL | ||
|
|
||
| kubectl wait --timeout 15m --for=condition=ContainersReady pod "$E2E_TEST_POD" | ||
|
|
||
| - name: Run e2e tests with Databricks | ||
| run: | | ||
| set -ex | ||
| kubectl exec "$E2E_TEST_POD" -- bash -c " | ||
| cd /feast/tests/e2e | ||
| pytest -x -rA -s databricks-tests.py --core_url feast-core:6565 --serving_url=feast-serving-feast-online-serving:6566 --batch_serving_url=feast-serving-feast-batch-serving:6566 | ||
| " | ||
|
|
||
| - name: Run ingestion tests for FF Data Science scenarios | ||
| run: | | ||
| set -ex | ||
| kubectl exec "$E2E_TEST_POD" -- bash -c " | ||
| cd /feast/tests/ds_scenarios | ||
| pytest -x -rA -s test-ingest.py --core_url feast-core:6565 --serving_url=feast-serving-feast-online-serving:6566 | ||
| " | ||
|
|
||
| - name: Upload package to Pypi | ||
| run: | | ||
| set -ex | ||
| git fetch --unshallow | ||
| git stash | ||
| python setup.py sdist | ||
| pip install twine | ||
| twine upload dist/*.tar.gz --repository-url https://${{ secrets.PYPI_REPO }} -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PWD }} | ||
| working-directory: sdk/python | ||
|
|
||
| - name: Prepare e2e test pod and clear Redis data | ||
| run: | | ||
| set -ex | ||
| # Start e2e test pod | ||
| kubectl delete pod "$E2E_TEST_POD" || true | ||
| kubectl run "$E2E_TEST_POD" --restart=Never --image="$FEAST_JUPYTER_IMAGE:$FEAST_VERSION" --limits 'memory=4Gi' | ||
|
|
||
| # While the test pod is starting, clear all data from Redis | ||
| kubectl run -it --rm --restart=Never --image=redis redisflush$GITHUB_RUN_NUMBER --command -- redis-cli -h $TF_VAR_redis_hostname FLUSHALL | ||
|
|
||
| kubectl wait --timeout 45m --for=condition=ContainersReady pod "$E2E_TEST_POD" | ||
| - name: Delete e2e test pod | ||
| run: kubectl delete pod "$E2E_TEST_POD" | ||
|
|
||
|
|
||
| - name: Output logs | ||
| if: ${{ always() }} | ||
| run: | | ||
| set +e | ||
| set -x | ||
| kubectl get event | ||
| kubectl logs svc/feast-core | ||
| kubectl logs svc/feast-serving-feast-online-serving | ||
| # Get number of Redis keys | ||
| kubectl run -it --rm --restart=Never --image=redis redisflush$GITHUB_RUN_NUMBER --command -- redis-cli -h $TF_VAR_redis_hostname DBSIZE | ||
| # Get consumer group offsets | ||
| kubectl exec -it svc/feast-services-kafka -- bash -c 'KCG="kafka-consumer-groups --bootstrap-server localhost:9092"; $KCG --list | xargs -rt -n1 $KCG --describe --group' | ||
| # Get Kafka offsets | ||
| kubectl exec -it svc/feast-services-kafka -- bash -c 'kafka-run-class kafka.tools.GetOffsetShell --broker-list localhost:9092 --topic feast-features' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why introduce terraform given the other myriad of tools already used?
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.
Sorry for any confusion about what's included in this PR. Terraform, Docker GitHub Actions, etc code as been left in to demonstrate our internal build + test process and help understand what needs to be integrated into the main Feast testing strategy. We don't really intend on including that in final PRs.