Skip to content

Commit 297c5c5

Browse files
authored
Merge branch 'main' into tl-add-security-md
2 parents f9f6cb9 + 88d396c commit 297c5c5

34 files changed

+1498
-139
lines changed

.github/workflows/check-api-outdated.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ on:
1010
types: [opened, reopened]
1111
workflow_dispatch:
1212
schedule:
13-
# "At 2 am UTC on every day." (https://crontab.guru)
14-
- cron: "0 2 * * *"
13+
# "At 2 am UTC on Monday." (https://crontab.guru)
14+
- cron: "0 2 * * 1"
1515

1616
jobs:
1717

@@ -31,8 +31,8 @@ jobs:
3131
poetry-version: 2.0.1
3232
python-version: "3.10"
3333

34-
- name: Run Nox Task check-api-outdated
35-
run: poetry run nox -s check-api-outdated
34+
- name: Run Nox Task api:check-outdated
35+
run: poetry run nox -s api:check-outdated
3636

3737
- name: Report Failure Status to Slack Channel
3838
if: ${{ failure() && github.event_name == 'schedule' }}

.github/workflows/run-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
PYTEST_ADDOPTS: '-o log_cli=true -o log_cli_level=INFO ${{ steps.pytest-markers.outputs.slow-tests }}'
3939
run: |
4040
echo "PYTEST_ADDOPTS = $PYTEST_ADDOPTS"
41-
export PROJECT_SHORT_TAG=$(poetry run nox -s get-project-short-tag)
41+
export PROJECT_SHORT_TAG=$(poetry run nox -s project:get-short-tag)
4242
poetry run nox -s test:coverage -- --
4343
4444
- name: Upload Artifacts

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
types: [ python ]
3737
pass_filenames: false
3838
language: system
39-
entry: poetry run nox -s generate-api
39+
entry: poetry run nox -s api:generate
4040

4141
- repo: https://github.com/pre-commit/pre-commit-hooks
4242
rev: v4.4.0

doc/changes/changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changes
22

33
* [unreleased](unreleased.md)
4+
* [1.1.0](changes_1.1.0.md)
5+
* [1.0.0](changes_1.0.0.md)
46
* [0.10.0](changes_0.10.0.md)
57
* [0.9.0](changes_0.9.0.md)
68
* [0.8.0](changes_0.8.0.md)
@@ -18,6 +20,8 @@
1820
hidden:
1921
---
2022
unreleased
23+
changes_1.1.0
24+
changes_1.0.0
2125
changes_0.10.0
2226
changes_0.9.0
2327
changes_0.8.0

doc/changes/changes_1.0.0.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# 1.0.0 - 2025-02-27
2+
3+
## Summary
4+
5+
This release contains a potentially breaking change as class `database.Database` has been replaced with `exasol_database.ExasolDatabase`.
6+
7+
This release updates the Python API generated from file `openapi.json` multiple times:
8+
9+
In the scope of ticket #80 the updated API contains 3 additional fields for object `Schedule`:
10+
* `createdbyID`
11+
* `createdbyFirstName`
12+
* `createdbyLastName`
13+
14+
In the scope of ticket #84 the updated API contains multiple additions and one removed field.
15+
16+
A `class_override` has been added to file `openapi_config.yml` to solve a conflict caused by `openapi.json` containing model class `Database` with attribute `settings`, from which Openapi Python Client` generates a module `database_settings` containing class `DatabaseSettings`.
17+
18+
The `class_override` replaces class `database.Database` with `exasol_database.ExasolDatabase` which potentially is a breaking change to the API.
19+
20+
Changes to `openapi.json` in detail:
21+
22+
In `paths` added
23+
* `/api/v1/accounts/{accountId}/databases/{databaseId}/database_settings`
24+
* `/api/v1/accounts/{accountId}/databases/{databaseId}/upgrade`
25+
26+
And
27+
* In `components` / `schemas`: added `SetAutoUpdatesDatabase`
28+
* In `components` / `schemas` / `Schedule` / `required` removed `payload`
29+
30+
And below `components` / `schemas`
31+
32+
| In | Added |
33+
|----|-------|
34+
| `CreateDatabase` / `properties` | `numNodes` |
35+
| `Database` / `properties` / `settings` | `required`, `properties`, `additionalProperties` |
36+
| `DatabaseSettings` / `required` | `autoUpdatesEnabled`, `autoUpdatesHardDisabled`, `numNodes` |
37+
| `DatabaseSettings` / `properties` | `autoUpdatesEnabled`, `autoUpdatesHardDisabled`, `numNodes` |
38+
| `Schedule` / `properties` / `action` / `oneOf` / `enum` | `ActionDatabaseUpgrade` |
39+
40+
## Refactorings
41+
42+
* #80: Updated `openapi.json`
43+
* #84: Updated `openapi.json` again
44+
45+
## Security
46+
* #82: Dependencies updated, especially vitualenv (20.26.4 -> 20.29.2), jinja2 (3.1.4 -> 3.1.5)

doc/changes/changes_1.1.0.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# 1.1.0 - 2025-04-07
2+
3+
## Summary
4+
5+
This release updates the Python API generated from file `openapi.json`.
6+
7+
Changes to `open-api.json` in detail:
8+
9+
Endpoint was renamed
10+
* from `/api/v1/accounts/{accountId}/databases/{databaseId}/database_settings`
11+
* to `/api/v1/accounts/{accountId}/databases/{databaseId}/settings`
12+
13+
Method `GET` was added for endpoint
14+
* `/api/v1/accounts/{accountId}/databases/{databaseId}/upgrade`
15+
16+
Changes to models below `components` / `schemas`:
17+
18+
Attribute `streamType` was added to
19+
* `CreateDatabase` / `properties`
20+
* `Database` / `properties` / `settings` / `required`
21+
* `Database` / `properties` / `settings` / `properties`
22+
* `DatabaseSettings` / `required`
23+
* `DatabaseSettings` / `properties`
24+
25+
Model `DatabaseUpgradeInfo` was added.
26+
27+
* Refactorings
28+
29+
* #88: Updated `openapi.json`

doc/changes/unreleased.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
This release updates the Python API generated from file `openapi.json`.
66

7-
The updated API contains 3 additional fields for object `Schedule`:
8-
* `createdbyID`
9-
* `createdbyFirstName`
10-
* `createdbyLastName`
7+
Changes to `open-api.json` in detail:
118

12-
## Refactorings
9+
Added `streamDescription` to the models below `components` / `schemas`:
10+
11+
* `Database` / `properties` / `settings` / `required`
12+
* `Database` / `properties` / `settings` / `properties`
13+
* `DatabaseSettings` / `required`
14+
* `DatabaseSettings` / `properties`
1315

14-
* #80: Updated `openapi.json`
16+
## Refactorings
1517

16-
## Security
17-
* #82: Dependencies updated, especially vitualenv (20.26.4 -> 20.29.2), jinja2 (3.1.4 -> 3.1.5)
18+
* #90: Updated open API client 2025-04-15

doc/developer_guide/developer_guide.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ See also [API Documentation](https://docs.exasol.com/saas/administration/rest_ap
2222
In order to regenerate the model layer please use the following command line:
2323

2424
```shell
25-
poetry run nox generate-api
25+
poetry run nox -s api:generate
2626
```
2727

2828
### Check API Outdated
2929

30-
The CI checks include a check "Check API Outdated" (file check-api-outdated.yml, uses nox task check-api-outdated),
30+
The CI checks include a check "Check API Outdated" (file check-api-outdated.yml, uses nox task `api:check-outdated`),
3131
which regenerates the api, and checks it against the api version commited to GitHub.
32+
3233
If this check fails, it is likely for one of the following causes:
3334

3435
* SaaS API could have changed in the meantime (should be detected automatically)
@@ -39,11 +40,11 @@ If this check fails, it is likely for one of the following causes:
3940
In any of those cases, generating the api might give different results than in previous commits. These changes in the
4041
generated api need to be commited to your GitHub branch for the check to pass in the CI.
4142
This should be done automatically by the Pre-Commit Hooks (check if they are installed correctly),
42-
but can also be done manually by calling the generate-api nox task, and commiting the results.
43-
Before commiting, you might want to run the check-api-outdated nox task locally to see if it passed or if there are further problems:
43+
but can also be done manually by calling the nox task `api:generate`, and commiting the results.
44+
Before commiting, you might want to run the nox task `api:check-outdated` locally to see if it passed or if there are further problems:
4445

4546
```shell
46-
poetry run nox check-api-outdated
47+
poetry run nox -s api:check-outdated
4748
```
4849

4950
another cause for the check failing might be a python-toolbox update changing the linting/code formating. This can result in formatting tools
@@ -151,7 +152,7 @@ poetry run nox -s release:prepare -- -- <version> --no-pr
151152
In case you currently are already working on a branch other than `main`, please ensure to have all changes commited and add command line option `--no-branch`:
152153

153154
```shell
154-
poetry run nox -s release:preparee -- -- <version> --no-pr --no-branch
155+
poetry run nox -s release:prepare -- -- <version> --no-pr --no-branch
155156
```
156157

157158
### Finalize and Publish the Release

exasol/saas/client/api_access.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def create_database(
185185
cluster_size: str = "XS",
186186
region: str = "eu-central-1",
187187
idle_time: timedelta | None = None
188-
) -> Optional[openapi.models.Database]:
188+
) -> Optional[openapi.models.exasol_database.ExasolDatabase]:
189189
def minutes(x: timedelta) -> int:
190190
return x.seconds // 60
191191

@@ -273,7 +273,7 @@ def database(
273273
def get_database(
274274
self,
275275
database_id: str,
276-
) -> Optional[openapi.models.database.Database]:
276+
) -> Optional[openapi.models.exasol_database.ExasolDatabase]:
277277
return get_database.sync(
278278
self._account_id,
279279
database_id,

exasol/saas/client/openapi/api/databases/create_database.py

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)