Skip to content

Commit

Permalink
url encode workflows external id
Browse files Browse the repository at this point in the history
  • Loading branch information
ddonukis committed Nov 21, 2023
1 parent 4912644 commit d6c5354
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ Changes are grouped as follows
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [7.3.2] - 2023-11-21
### Fixed
- `workflows.retrieve` and `workflows.versions.retrieve` returned None if the provided workflow external id contained special characters. This is now fixed.

## [7.3.1] - 2023-11-21
### Fixed
- Replaced action `Write` with `Create` in `ProjectsAcl`, as `Write` is not a valid action and `Create` is the correct one.
- Replaced action `Write` with `Create` in `ProjectsAcl`, as `Write` is not a valid action and `Create` is the correct one.

## [7.3.0] - 2023-11-20
### Added
Expand Down Expand Up @@ -127,13 +131,13 @@ with no easy way to add a prefix. Also, it no longer expands metadata by default

### Added
- Added `load` implementation for `VisionResource`s: `ObjectDetection`, `TextRegion`, `AssetLink`, `BoundingBox`,
`CdfRerourceRef`, `Polygon`, `Polyline`, `VisionExtractPredictions`, `FeatureParameters`.
`CdfRerourceRef`, `Polygon`, `Polyline`, `VisionExtractPredictions`, `FeatureParameters`.
- Missing `dump` and `load` methods for `ClientCredentials`.
- Literal annotation for `source_type` and `target_type` in `Relationship`
- In transformations, `NonceCredentials` was missing `load` method.
- In transformations, `TransformationBlockedInfo` was missing `.dump` method
- `capabilities` in `cognite.client.data_classes` with data classes for all CDF capabilities.
- All `CogniteResource` and `CogniteResourcelist` objects have `.dump_yaml` methods, for example, `my_asset_list.dump_yaml()`.
- All `CogniteResource` and `CogniteResourcelist` objects have `.dump_yaml` methods, for example, `my_asset_list.dump_yaml()`.

### Removed
- Deprecated methods `aggregate_metadata_keys` and `aggregate_metadata_values` on AssetsAPI.
Expand Down
5 changes: 3 additions & 2 deletions cognite/client/_api/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from abc import ABC
from typing import TYPE_CHECKING, Any, Literal, MutableSequence, Sequence, Tuple, Union
from urllib.parse import quote

from typing_extensions import TypeAlias

Expand Down Expand Up @@ -373,7 +374,7 @@ def retrieve(self, workflow_external_id: str, version: str) -> WorkflowVersion |
self._warning.warn()
try:
response = self._get(
url_path=f"/workflows/{workflow_external_id}/versions/{version}",
url_path=f"/workflows/{quote(workflow_external_id, '')}/versions/{quote(version, '')}",
)
except CogniteAPIError as e:
if e.code == 404:
Expand Down Expand Up @@ -498,7 +499,7 @@ def retrieve(self, external_id: str) -> Workflow | None:
"""
self._warning.warn()
try:
response = self._get(url_path=self._RESOURCE_PATH + f"/{external_id}")
response = self._get(url_path=f"{self._RESOURCE_PATH}/{quote(external_id, '')}")
except CogniteAPIError as e:
if e.code == 404:
return None
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__ = "7.3.1"
__version__ = "7.3.2"
__api_subversion__ = "V20220125"
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 = "7.3.1"
version = "7.3.2"
description = "Cognite Python SDK"
readme = "README.md"
documentation = "https://cognite-sdk-python.readthedocs-hosted.com"
Expand Down

0 comments on commit d6c5354

Please sign in to comment.