Skip to content

Commit d8670e2

Browse files
authored
#22: Added comment on using fixtures from pytest-plugin pytest-exasol-saas (#24)
1 parent 6e53107 commit d8670e2

File tree

4 files changed

+63
-3
lines changed

4 files changed

+63
-3
lines changed

README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Exasol Python Extension Common
22

3-
A package with common functionality, shared by Exasol Python Extensions.
3+
A package with common functionality, shared by Exasol Python Extensions, e.g.
4+
* [transformers-extension](https://github.com/exasol/transformers-extension)
5+
* [sagemaker-extension](https://github.com/exasol/sagemaker-extension)
46

5-
See
6-
* [User Guide](doc/user_guide/user-guide.md)
7+
## Features
8+
9+
A deployer for script language containers (SLC) to be used by UDF-based extensions of Exasol database requiring a special SLC.
10+
11+
## More documentation
12+
13+
* User Guide
14+
* [Developer Guide](doc/developer-guide.md)
15+
* [User Defined Functions (UDF)](https://docs.exasol.com/db/latest/database_concepts/udf_scripts.htm)
16+
* [Script Language Containers (SLC)](https://github.com/exasol/script-languages-release/)

doc/changes/unreleased.md

+5
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@
1010
## Refactorings
1111

1212
* #15: Used plugin pytest-saas
13+
14+
15+
## Documentation
16+
17+
* #22: Added comment on using fixtures from pytest-plugin `pytest-exasol-saas`

doc/developer-guide.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Python Extension Common (PEC) Developer Guide
2+
3+
## Pytest Plugins
4+
5+
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/).
6+
7+
This plugin makes additional fixtures available that are used in the integration tests of PEC.
8+
See files in folder [test/integration](../tree/main/test/integration):
9+
10+
* `conftest.py`
11+
* `test_language_container_deployer_saas.py`
12+
* `test_language_container_deployer_saas_cli.py`
13+
14+
## Running Tests in CI Builds
15+
16+
The test cases in PEC are separated in two groups.
17+
18+
| Group | Execution | Name of gating GitHub workflow |
19+
|-----------------------------|-----------------------------------------|--------------------------------|
20+
| G1) Fast and cheap tests | On each push to your development branch | Gate 1 - Regular CI |
21+
| G2) Slow or expensive tests | Only on manual approval, see below | Gate 2 - Allow Merge |
22+
23+
This enables fast development cycles while still protecting the main branch against build failures.
24+
25+
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.
26+
27+
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.
28+
29+
Each of the groups results in a final gating GitHub workflow job that is added to the branch protection of branch `main`.
30+
31+
So in order to merge a branch to `main` branch, the tests of both groups need to be executed and to have terminated succesfully.
32+
33+
### Approving Slow Tests
34+
35+
To approve executing the tests in group G2
36+
* Open your pull request in GitHub
37+
* Scroll to section "Checks"
38+
* Locate pending tasks, e.g. "Ask if Slow or Expensive Tests (e.g. SaaS) Should be Run"
39+
* Click the link "Details" on the right-hand side
40+
* Click "Review pending Deplopyments"
41+
* Select the checkbox "slow-tests"
42+
* Click the green button "Approve and deploy"

error_code_config.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
error-tags:
2+
PEC:
3+
highest-index: 0

0 commit comments

Comments
 (0)