Skip to content

Commit

Permalink
vdk-plugins: run tests on release of vdk-core
Browse files Browse the repository at this point in the history
Changes in vdk-core can break some plugins. We need some functionality
that enables us to catch such regression quicker.

The proposoed change is to introduce in .plugin-common.yml new generic
"job" template `.build-plugin-on-vdk-core-release` which can be used by
plugins CI.

As it should not be necessary to run all plugin tests, we can select
some more important

Testing Done: CI

Signed-off-by: Antoni Ivanov <[email protected]>
  • Loading branch information
antoniivanov committed Oct 4, 2022
1 parent 79ff8ae commit d9ca92e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion projects/vdk-core/src/vdk/api/job_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class IProperties:
* Keep state of application (for example last ingested row timestamp so you can continue form there on next run)
* Keeping API keys and passwords necessary to connect to different systems
* Keeping custom configuration of a data job.
* Keeping custom configuration of a data job.asdfasdf
Data Job properties are also used for parameter substitution in queries, see execute_query docstring.
"""
Expand Down
12 changes: 12 additions & 0 deletions projects/vdk-plugins/.plugin-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- cd projects/vdk-plugins/
- pip install -U pip
- pip install ./vdk-test-utils # TODO: REMOVE THIS AT SOME POINT
- if [ -n "${USE_VDKCORE_DEV_VERSION}" ] ; then pip install -e ../vdk-core; fi
script:
- echo "Build plugin $PLUGIN_NAME"
- cd ./$PLUGIN_NAME || exit 1
Expand All @@ -28,6 +29,17 @@
reports:
junit: tests.xml

.build-plugin-on-vdk-core-release:
stage: pre_release_test
variables:
USE_VDKCORE_DEV_VERSION: "yes"
extends: .build-plugin
rules:
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes:
- "projects/vdk-core/*"
- "projects/vdk-core/src/**/*"

.build-plugin-dind:
image: docker:19.03.8
services:
Expand Down
15 changes: 8 additions & 7 deletions projects/vdk-plugins/vdk-impala/.plugin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@
image: "python:3.7"

.build-vdk-impala:
image: docker:19.03.8
services:
- docker:19.03.8-dind
variables:
DOCKER_HOST: tcp://localhost:2375
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
PLUGIN_NAME: vdk-impala
extends: .build-plugin
extends: .build-plugin-dind

build-py37-vdk-impala:
extends: .build-vdk-impala
Expand All @@ -33,6 +27,13 @@ build-py310-vdk-impala:
image: "python:3.10"


build-vdk-impala-on-vdk-core-release:
variables:
PLUGIN_NAME: quickstart-vdk
extends: .build-plugin-on-vdk-core-release
image: "python:3.9"


release-vdk-impala:
variables:
PLUGIN_NAME: vdk-impala
Expand Down

0 comments on commit d9ca92e

Please sign in to comment.