Skip to content

Comments

120 update openapi python client, fix vulnerabilities, update PTB to version 5#139

Merged
ckunki merged 49 commits intomainfrom
refactoring/120-Update_openapi-python-client
Feb 24, 2026
Merged

120 update openapi python client, fix vulnerabilities, update PTB to version 5#139
ckunki merged 49 commits intomainfrom
refactoring/120-Update_openapi-python-client

Conversation

@ckunki
Copy link
Collaborator

@ckunki ckunki commented Feb 16, 2026

This PR closes the following issues

Closes #120
Closes #141
Closes #140

@ckunki ckunki temporarily deployed to manual-approval February 16, 2026 07:30 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval February 16, 2026 07:32 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval February 16, 2026 07:55 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval February 16, 2026 07:59 — with GitHub Actions Inactive
Comment on lines +38 to +42
env:
SAAS_HOST: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_HOST }}
SAAS_ACCOUNT_ID: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_ACCOUNT_ID }}
SAAS_PAT: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_PAT }}
PROJECT_SHORT_TAG: SAPIPY
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually added

@ckunki ckunki changed the title 120 update openapi python client 120 update openapi python client, fix vulnerabilities, update PTB to version 5 Feb 16, 2026
@@ -4,21 +4,24 @@ on:
workflow_call:
Copy link
Collaborator Author

@ckunki ckunki Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflows are mainly generated by PTB, but updated in a few places, which are commented.

Manual updated were required mainly for

  • Add secrets for accessing SaaS instances
  • Re- integrate the slow tests, which were marked with pytest.mark.slow before

Comment on lines +38 to +42
env:
SAAS_HOST: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_HOST }}
SAAS_ACCOUNT_ID: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_ACCOUNT_ID }}
SAAS_PAT: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_PAT }}
PROJECT_SHORT_TAG: SAPIPY
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually added

@@ -1,16 +1,13 @@
from __future__ import annotations

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main changes in this file are for handling results of type ApiError, which are new in version 0.26
of openapi-python-client.

Our updated implementation now raises an exception of type OpenApiError.

wait_fixed,
)

import exasol.saas.client.openapi.models as openapi_models
Copy link
Collaborator Author

@ckunki ckunki Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linter coming with PTB version 5 does no longer accept

from exasol.saas.client import openapi

openapi.models.CreateDatabaseInitialCluster(...)

Copy link
Collaborator

@tkilias tkilias Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, we saw something similar in another project; the linter requires explicit exports if you want to import things. The explicit export can be happen by definition or by __all__

@ckunki ckunki temporarily deployed to manual-approval February 16, 2026 09:12 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval February 16, 2026 09:17 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval February 16, 2026 10:41 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval February 16, 2026 11:15 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval February 19, 2026 14:09 — with GitHub Actions Inactive
TypeError: isinstance() argument 2 cannot be a parameterized generic
@ckunki
Copy link
Collaborator Author

ckunki commented Feb 23, 2026

  • expected: type[T] raises TypeError: isinstance() argument 2 cannot be a parameterized generic
  • expected: type and return response causes mypy error
    Incompatible return value type (got "object", expected "T")



# TODO: Create Unit test
def ensure_type(
Copy link
Collaborator Author

@ckunki ckunki Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expected: type[T]
raises TypeError: isinstance() argument 2 cannot be a parameterized generic

expected: type and return response
causes mypy error Incompatible return value type (got "object", expected "T")

@ckunki ckunki temporarily deployed to manual-approval February 23, 2026 12:58 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval February 23, 2026 13:24 — with GitHub Actions Inactive
tkilias
tkilias previously approved these changes Feb 23, 2026
@ckunki ckunki deployed to manual-approval February 23, 2026 14:46 — with GitHub Actions Active
@sonarqubecloud
Copy link

@ckunki ckunki merged commit a0cec97 into main Feb 24, 2026
27 checks passed
@ckunki ckunki deleted the refactoring/120-Update_openapi-python-client branch February 24, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants