Skip to content

Commit

Permalink
Bugfix: onFailure missing in workflows response raising keyError (#1462)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddonukis authored Nov 1, 2023
1 parent d1f22ea commit 32db026
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Changes are grouped as follows
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [6.38.1] - 2023-10-31
### Fixed
- `onFailure` property in Workflows was expected as mandatory and was raising KeyError if it was not returnd by the API. The sdk now assumes the field to be optional loads it as None instead of raising an error.

## [6.38.0] - 2023-10-30
### Added
- Support `onFailure` property in Workflows, allowing marking Tasks as optional in a Workflow.
Expand All @@ -37,9 +41,9 @@ Changes are grouped as follows

## [6.34.2] - 2023-10-23
### Fixed
- Loading a `ContainerApply` from source failed with `KeyError` if `nullable`, `autoIncrement`, or `cursorable` were not set
in the `ContainerProperty` and `BTreeIndex` classes even though they are optional. This is now fixed.
- Loading a `ContainerApply` from source failed with `KeyError` if `nullable`, `autoIncrement`, or `cursorable` were not set
in the `ContainerProperty` and `BTreeIndex` classes even though they are optional. This is now fixed.

## [6.34.1] - 2023-10-23
### Added
- Support for setting `data_set_id` and `metadata` in `ThreeDModelsAPI.create`.
Expand Down
2 changes: 1 addition & 1 deletion cognite/client/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations

__version__ = "6.38.0"
__version__ = "6.38.1"
__api_subversion__ = "V20220125"
2 changes: 1 addition & 1 deletion cognite/client/data_classes/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def _load(cls, resource: dict | str, cognite_client: CogniteClient | None = None
# Allow default to come from the API.
retries=resource.get("retries"), # type: ignore[arg-type]
timeout=resource.get("timeout"), # type: ignore[arg-type]
on_failure=resource["onFailure"],
on_failure=resource.get("onFailure"), # type: ignore[arg-type]
depends_on=[dep["externalId"] for dep in resource.get("dependsOn", [])] or None,
)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "cognite-sdk"

version = "6.38.0"
version = "6.38.1"
description = "Cognite Python SDK"
readme = "README.md"
documentation = "https://cognite-sdk-python.readthedocs-hosted.com"
Expand Down

0 comments on commit 32db026

Please sign in to comment.