Skip to content

Fix failing tests and increase timeouts#168

Draft
tkilias wants to merge 22 commits into
mainfrom
pr1/fix-failing-tests-and-timeouts
Draft

Fix failing tests and increase timeouts#168
tkilias wants to merge 22 commits into
mainfrom
pr1/fix-failing-tests-and-timeouts

Conversation

@tkilias

@tkilias tkilias commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

What changed

This PR collects the stability and robustness fixes needed to make the failing lifecycle checks reviewable on their own.

It includes:

  • database deletion polling fixes and longer delete polling timeouts
  • allowed IP lifecycle polling fixes and longer allowed IP polling timeouts
  • debug logging around API helper responses used to diagnose flaky integration behavior
  • hardened generated ApiError parsing so malformed backend error payloads do not crash error handling

Why it changed

The original branch mixed test-stability work, workflow changes, feature work, and refactoring. This PR isolates the behavioral fixes that address flaky deletion and allowed-IP polling, plus the API error hardening that supports those flows.

Impact

This should make the handwritten access helpers and their related tests more resilient to transitional backend states and malformed error responses.

Validation

  • poetry run pytest -q test/unit/test_api_access.py test/unit/test_ensure_type.py
  • poetry run nox -s format:check
  • poetry run nox -s lint:typing

Integration tests requiring SaaS credentials were not run locally in this publish step.

@tkilias tkilias temporarily deployed to manual-approval June 27, 2026 15:20 — with GitHub Actions Inactive
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
2 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@tkilias tkilias changed the title [codex] Fix failing tests and timeouts [codex] Fix failing tests and increase timeouts Jun 29, 2026
@tkilias tkilias changed the title [codex] Fix failing tests and increase timeouts Fix failing tests and increase timeouts Jun 29, 2026
# actually list[ExasolDatabase]
dbs = ensure_type(list, resp, "Failed to list databases")
return (db.id for db in dbs)
active_database_ids = [

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@@ -0,0 +1,265 @@
from __future__ import annotations

@ckunki ckunki Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
from __future__ import annotations
{#
This file has been copied from
https://github.com/openapi-generators/openapi-python-client/blob/v0.29.0/openapi_python_client/templates/model.py.jinja
See also https://github.com/openapi-generators/openapi-python-client#using-custom-templates.
Custom instructions have been added for processing ApiError,
changes are highlighted by comments below.
``noxfile.py`` passes this file to API generator via CLI option ``--custom-template-path``.
#}
from __future__ import annotations

d = dict(src_dict)
{% for property in model.required_properties + model.optional_properties %}
{% if property.required %}
{% if class_name == "ApiError" %}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
{% if class_name == "ApiError" %}
{# Begin of custom instructions #}
{% if class_name == "ApiError" %}

{% else %}
{% set property_source = 'd.pop("' + property.name + '")' %}
{% endif %}
{% else %}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
{% else %}
{# End of custom instructions #}
{% else %}

def wait_until_deleted(
self,
database_id: str,
timeout: timedelta = timedelta(seconds=1),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See sonar errors.
Proposal:

  • Move result handling from function verify_deleted() to new global function verify_deleted()
  • Rename function verify_deleted() to verify_deleted_with_retry()
  • Call global function verify_deleted() inside

Comment thread noxfile.py
by environment variable ``CI``, see
https://docs.github.com/en/actions/learn-github-actions/variables.
#default-environment-variables.
"""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
CLI option ``--custom-template-path`` is used to pass a custom template.
See the comments in file ``openapi_templates/model.py.jinja`` for details.
"""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants