From 7f618e5eed9d258728d032a20646cfe5081e3a6a Mon Sep 17 00:00:00 2001 From: Yevgeny Pats Date: Mon, 16 Oct 2023 20:50:43 +0300 Subject: [PATCH 1/4] Create config.yml --- .github/ISSUE_TEMPLATE/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..733537c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: CloudQuery Central Issues Tracker + url: https://github.com/cloudquery/cloudquery/issues + about: Please file any issue with regards to any of CloudQuery repo in the main repository with the right labels. + - name: CloudQuery Discord Support + url: https://cloudquery.io/discord + about: Join our discord to get live support from us and the community. From 1fc0cf7535138d5b8c4e00b39d6863ce0f6bf51a Mon Sep 17 00:00:00 2001 From: Tim Armstrong Date: Mon, 23 Oct 2023 15:10:34 +0100 Subject: [PATCH 2/4] feat: Fix for UUID (#70) This corrects the Marshalling for the UUID Scalar. Referenced in: https://github.com/cloudquery/cloudquery/issues/14825 It assumes Network-Order Bytes as per https://www.rfc-editor.org/rfc/rfc4122.html#section-4.1.1 This should work as it does pass the tests, but our testing framework is a little incomplete. I'm not going to alter the test framework in this commit - But we should have a Marshalling test that confirms the expected bytes are created for each custom object type. --- cloudquery/sdk/scalar/uuid.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cloudquery/sdk/scalar/uuid.py b/cloudquery/sdk/scalar/uuid.py index 4e49f9f..052633f 100644 --- a/cloudquery/sdk/scalar/uuid.py +++ b/cloudquery/sdk/scalar/uuid.py @@ -4,6 +4,8 @@ class UUID(Scalar): def __init__(self, valid: bool = False, value: uuid.UUID = None): + if isinstance(value, uuid.UUID): + value = value.bytes super().__init__(valid, value) def __eq__(self, scalar: Scalar) -> bool: @@ -27,11 +29,13 @@ def set(self, value: any): self._value = value.value return - if isinstance(value, uuid.UUID): + if isinstance(value, bytes): self._value = value + elif isinstance(value, uuid.UUID): + self._value = value.bytes elif isinstance(value, str): try: - self._value = uuid.UUID(value) + self._value = uuid.UUID(value).bytes except ValueError as e: raise ScalarInvalidTypeError("Invalid type for UUID scalar") from e else: From 55bed05df36c75dc9972b445e4bb21ef0321329c Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 23 Oct 2023 17:41:01 +0300 Subject: [PATCH 3/4] fix(deps): Update dependency pyarrow to v13 (#53) Co-authored-by: Renovate Bot --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1ccdd8d..7d73a2d 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ "pandas==2.1.1", "pluggy==1.3.0", "protobuf==4.24.3", - "pyarrow==12.0.1", + "pyarrow==13.0.0", "pytest==7.4.2", "python-dateutil==2.8.2", "pytz==2023.3.post1", From 55b8e4eb55a0cf69e6a0e43c9a5447c1b5fecb40 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 23 Oct 2023 17:43:47 +0300 Subject: [PATCH 4/4] chore(main): Release v0.1.7 (#71) :robot: I have created a release *beep* *boop* --- ## [0.1.7](https://github.com/cloudquery/plugin-sdk-python/compare/v0.1.6...v0.1.7) (2023-10-23) ### Bug Fixes * **deps:** Update dependency pyarrow to v13 ([#53](https://github.com/cloudquery/plugin-sdk-python/issues/53)) ([55bed05](https://github.com/cloudquery/plugin-sdk-python/commit/55bed05df36c75dc9972b445e4bb21ef0321329c)) * Properly handle `uuid.UUID` values in scalars ([#70](https://github.com/cloudquery/plugin-sdk-python/issues/70)), closes (https://github.com/cloudquery/cloudquery/issues/14825) ([1fc0cf7](https://github.com/cloudquery/plugin-sdk-python/commit/1fc0cf7535138d5b8c4e00b39d6863ce0f6bf51a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecc56bc..49e2f3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.1.7](https://github.com/cloudquery/plugin-sdk-python/compare/v0.1.6...v0.1.7) (2023-10-23) + + +### Bug Fixes + +* **deps:** Update dependency pyarrow to v13 ([#53](https://github.com/cloudquery/plugin-sdk-python/issues/53)) ([55bed05](https://github.com/cloudquery/plugin-sdk-python/commit/55bed05df36c75dc9972b445e4bb21ef0321329c)) +* Properly handle `uuid.UUID` values in scalars ([#70](https://github.com/cloudquery/plugin-sdk-python/issues/70)), closes (https://github.com/cloudquery/cloudquery/issues/14825) ([1fc0cf7](https://github.com/cloudquery/plugin-sdk-python/commit/1fc0cf7535138d5b8c4e00b39d6863ce0f6bf51a)) + ## [0.1.6](https://github.com/cloudquery/plugin-sdk-python/compare/v0.1.5...v0.1.6) (2023-10-12) diff --git a/setup.py b/setup.py index 7d73a2d..8e4abeb 100644 --- a/setup.py +++ b/setup.py @@ -53,7 +53,7 @@ ] setuptools.setup( name=name, - version="0.1.6", + version="0.1.7", description=description, long_description=long_description, author="CloudQuery LTD",