From 7ceec309c3d0d749c7c95fd2760db581eeb4c2bb Mon Sep 17 00:00:00 2001 From: Evan Sims Date: Mon, 16 Sep 2024 16:19:00 -0500 Subject: [PATCH] release: v0.7.1 --- CHANGELOG.md | 14 ++++++++++++++ example/example1/requirements.txt | 2 +- example/example1/setup.py | 2 +- openfga_sdk/__init__.py | 2 +- openfga_sdk/api_client.py | 2 +- openfga_sdk/configuration.py | 2 +- openfga_sdk/oauth2.py | 2 +- openfga_sdk/sync/api_client.py | 2 +- openfga_sdk/sync/oauth2.py | 2 +- setup.py | 2 +- test/api/open_fga_api_test.py | 4 ++-- test/oauth2_test.py | 2 +- test/sync/oauth2_test.py | 2 +- test/sync/open_fga_api_test.py | 4 ++-- 14 files changed, 29 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 930c885..30cff5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## v0.7.1 + +### [0.7.1](https://github.com/openfga/python-sdk/compare/v0.7.0...v0.7.1) (2024-09-16) + +This release includes fixes for several bugs identified in the previous release related to OpenTelemetry metrics reporting: (#124) + +- fix: attribute values are now correctly exported as their intended types (previously, these were all sent as string values) +- fix: `http_client_request_duration` being reported in seconds rather than the intended milliseconds +- fix: sync client mistakenly passing the entire configuration (rather than just the OpenTelemetry configuration as intended) to `queryDuration()` and `requestDuration()` +- fix: some attributes may not have been exported as expected under some conditions +- fix: `queryDuration()` and `requestDuration()` may not have updated their histograms reliably when `attr_http_client_request_duration` or `attr_http_server_request_duration` (respectively) were not enabled (which is the default) + +Please note that if you use third-party OpenTelemetry tooling to visualize the attributes mentioned above, you may need to update your queries to account for these changes. + ## v0.7.0 ### [0.7.0](https://github.com/openfga/python-sdk/compare/v0.6.1...v0.7.0) (2024-08-30) diff --git a/example/example1/requirements.txt b/example/example1/requirements.txt index b49c3a9..6b9713c 100644 --- a/example/example1/requirements.txt +++ b/example/example1/requirements.txt @@ -4,7 +4,7 @@ attrs >= 23.1.0 frozenlist >= 1.4.1 idna >= 3.6 multidict >= 6.0.4 -openfga-sdk >= 0.7.0 +openfga-sdk >= 0.7.1 python-dateutil >= 2.8.2 urllib3 >= 2.1.0 yarl >= 1.9.4 diff --git a/example/example1/setup.py b/example/example1/setup.py index bc087d6..6c719fa 100644 --- a/example/example1/setup.py +++ b/example/example1/setup.py @@ -14,7 +14,7 @@ NAME = "example1" VERSION = "0.0.1" -REQUIRES = ["openfga-sdk >= 0.7.0"] +REQUIRES = ["openfga-sdk >= 0.7.1"] setup( name=NAME, diff --git a/openfga_sdk/__init__.py b/openfga_sdk/__init__.py index 1413531..b34198c 100644 --- a/openfga_sdk/__init__.py +++ b/openfga_sdk/__init__.py @@ -10,7 +10,7 @@ NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ -__version__ = "0.7.0" +__version__ = "0.7.1" from openfga_sdk.api.open_fga_api import OpenFgaApi from openfga_sdk.api_client import ApiClient diff --git a/openfga_sdk/api_client.py b/openfga_sdk/api_client.py index 6abaa1a..1328b83 100644 --- a/openfga_sdk/api_client.py +++ b/openfga_sdk/api_client.py @@ -36,7 +36,7 @@ from openfga_sdk.telemetry import Telemetry from openfga_sdk.telemetry.attributes import TelemetryAttribute, TelemetryAttributes -DEFAULT_USER_AGENT = "openfga-sdk python/0.7.0" +DEFAULT_USER_AGENT = "openfga-sdk python/0.7.1" def random_time(loop_count, min_wait_in_ms): diff --git a/openfga_sdk/configuration.py b/openfga_sdk/configuration.py index bec7428..cf75e00 100644 --- a/openfga_sdk/configuration.py +++ b/openfga_sdk/configuration.py @@ -478,7 +478,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.x\n" - "SDK Package Version: 0.7.0".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 0.7.1".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self): diff --git a/openfga_sdk/oauth2.py b/openfga_sdk/oauth2.py index 63cfdc3..d7fee9d 100644 --- a/openfga_sdk/oauth2.py +++ b/openfga_sdk/oauth2.py @@ -83,7 +83,7 @@ async def _obtain_token(self, client): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.7.0", + "User-Agent": "openfga-sdk (python) 0.7.1", } ) diff --git a/openfga_sdk/sync/api_client.py b/openfga_sdk/sync/api_client.py index 6dd365b..88e91a0 100644 --- a/openfga_sdk/sync/api_client.py +++ b/openfga_sdk/sync/api_client.py @@ -35,7 +35,7 @@ from openfga_sdk.telemetry import Telemetry from openfga_sdk.telemetry.attributes import TelemetryAttribute, TelemetryAttributes -DEFAULT_USER_AGENT = "openfga-sdk python/0.7.0" +DEFAULT_USER_AGENT = "openfga-sdk python/0.7.1" def random_time(loop_count, min_wait_in_ms): diff --git a/openfga_sdk/sync/oauth2.py b/openfga_sdk/sync/oauth2.py index eb8ed1d..f1cf37c 100644 --- a/openfga_sdk/sync/oauth2.py +++ b/openfga_sdk/sync/oauth2.py @@ -83,7 +83,7 @@ def _obtain_token(self, client): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.7.0", + "User-Agent": "openfga-sdk (python) 0.7.1", } ) diff --git a/setup.py b/setup.py index 344832a..1b824b4 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ from setuptools import find_packages, setup NAME = "openfga-sdk" -VERSION = "0.7.0" +VERSION = "0.7.1" REQUIRES = [] diff --git a/test/api/open_fga_api_test.py b/test/api/open_fga_api_test.py index cc04159..e7fa5f2 100644 --- a/test/api/open_fga_api_test.py +++ b/test/api/open_fga_api_test.py @@ -1520,7 +1520,7 @@ async def test_check_api_token(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.7.0", + "User-Agent": "openfga-sdk python/0.7.1", "Authorization": "Bearer TOKEN1", } ) @@ -1574,7 +1574,7 @@ async def test_check_custom_header(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.7.0", + "User-Agent": "openfga-sdk python/0.7.1", "Custom Header": "custom value", } ) diff --git a/test/oauth2_test.py b/test/oauth2_test.py index 6fdf719..4d3dec7 100644 --- a/test/oauth2_test.py +++ b/test/oauth2_test.py @@ -84,7 +84,7 @@ async def test_get_authentication_obtain_client_credentials(self, mock_request): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.7.0", + "User-Agent": "openfga-sdk (python) 0.7.1", } ) mock_request.assert_called_once_with( diff --git a/test/sync/oauth2_test.py b/test/sync/oauth2_test.py index 01d98c5..8cda5cc 100644 --- a/test/sync/oauth2_test.py +++ b/test/sync/oauth2_test.py @@ -84,7 +84,7 @@ def test_get_authentication_obtain_client_credentials(self, mock_request): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.7.0", + "User-Agent": "openfga-sdk (python) 0.7.1", } ) mock_request.assert_called_once_with( diff --git a/test/sync/open_fga_api_test.py b/test/sync/open_fga_api_test.py index 01ada07..ea4f56f 100644 --- a/test/sync/open_fga_api_test.py +++ b/test/sync/open_fga_api_test.py @@ -1520,7 +1520,7 @@ async def test_check_api_token(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.7.0", + "User-Agent": "openfga-sdk python/0.7.1", "Authorization": "Bearer TOKEN1", } ) @@ -1574,7 +1574,7 @@ async def test_check_custom_header(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.7.0", + "User-Agent": "openfga-sdk python/0.7.1", "Custom Header": "custom value", } )