-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#22: Added comment on using fixtures from pytest-plugin pytest-exaso…
…l-saas (#24)
- Loading branch information
Showing
4 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,6 +1,16 @@ | ||
# Exasol Python Extension Common | ||
|
||
A package with common functionality, shared by Exasol Python Extensions. | ||
A package with common functionality, shared by Exasol Python Extensions, e.g. | ||
* [transformers-extension](https://github.com/exasol/transformers-extension) | ||
* [sagemaker-extension](https://github.com/exasol/sagemaker-extension) | ||
|
||
See | ||
* [User Guide](doc/user_guide/user-guide.md) | ||
## Features | ||
|
||
A deployer for script language containers (SLC) to be used by UDF-based extensions of Exasol database requiring a special SLC. | ||
|
||
## More documentation | ||
|
||
* User Guide | ||
* [Developer Guide](doc/developer-guide.md) | ||
* [User Defined Functions (UDF)](https://docs.exasol.com/db/latest/database_concepts/udf_scripts.htm) | ||
* [Script Language Containers (SLC)](https://github.com/exasol/script-languages-release/) |
This file contains 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 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,42 @@ | ||
# Python Extension Common (PEC) Developer Guide | ||
|
||
## Pytest Plugins | ||
|
||
PEC declares a dependency to pytest plugin `pytest-exasol-saas` which are maintained in GitHub repository [pytest-plugins/pytest_saas](https://github.com/exasol/pytest-plugins/tree/main/pytest-saas/). | ||
|
||
This plugin makes additional fixtures available that are used in the integration tests of PEC. | ||
See files in folder [test/integration](../tree/main/test/integration): | ||
|
||
* `conftest.py` | ||
* `test_language_container_deployer_saas.py` | ||
* `test_language_container_deployer_saas_cli.py` | ||
|
||
## Running Tests in CI Builds | ||
|
||
The test cases in PEC are separated in two groups. | ||
|
||
| Group | Execution | Name of gating GitHub workflow | | ||
|-----------------------------|-----------------------------------------|--------------------------------| | ||
| G1) Fast and cheap tests | On each push to your development branch | Gate 1 - Regular CI | | ||
| G2) Slow or expensive tests | Only on manual approval, see below | Gate 2 - Allow Merge | | ||
|
||
This enables fast development cycles while still protecting the main branch against build failures. | ||
|
||
For PEC group G2 particularly contains the tests involving Exasol SaaS infrastructure which are creating costs for the database instances temporarily created during test execution. | ||
|
||
Group G2 is guarded by a dedicated [GitHub Enviroment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#required-reviewers) requiring **manual approval** before these tests are executed. | ||
|
||
Each of the groups results in a final gating GitHub workflow job that is added to the branch protection of branch `main`. | ||
|
||
So in order to merge a branch to `main` branch, the tests of both groups need to be executed and to have terminated succesfully. | ||
|
||
### Approving Slow Tests | ||
|
||
To approve executing the tests in group G2 | ||
* Open your pull request in GitHub | ||
* Scroll to section "Checks" | ||
* Locate pending tasks, e.g. "Ask if Slow or Expensive Tests (e.g. SaaS) Should be Run" | ||
* Click the link "Details" on the right-hand side | ||
* Click "Review pending Deplopyments" | ||
* Select the checkbox "slow-tests" | ||
* Click the green button "Approve and deploy" |
This file contains 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,3 @@ | ||
error-tags: | ||
PEC: | ||
highest-index: 0 |