diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index c07f148..ee94722 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: - image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:0ffe3bdd6c7159692df5f7744da74e5ef19966288a6bf76023e8e04e0c424d7d + image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest + digest: sha256:6e7328583be8edd3ba8f35311c76a1ecbc823010279ccb6ab46b7a76e25eafcc diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index dc42692..1499c43 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -13,7 +13,7 @@ # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-python:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest deep-remove-regex: - /owl-bot-staging diff --git a/.kokoro/samples/lint/common.cfg b/.kokoro/samples/lint/common.cfg index 5d6e377..1b005a9 100644 --- a/.kokoro/samples/lint/common.cfg +++ b/.kokoro/samples/lint/common.cfg @@ -31,4 +31,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-runtimeconfig/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-runtimeconfig/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.6/common.cfg b/.kokoro/samples/python3.6/common.cfg index 5a58422..281bca1 100644 --- a/.kokoro/samples/python3.6/common.cfg +++ b/.kokoro/samples/python3.6/common.cfg @@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-runtimeconfig/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-runtimeconfig/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.6/periodic.cfg b/.kokoro/samples/python3.6/periodic.cfg index 50fec96..71cd1e5 100644 --- a/.kokoro/samples/python3.6/periodic.cfg +++ b/.kokoro/samples/python3.6/periodic.cfg @@ -3,4 +3,4 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" -} \ No newline at end of file +} diff --git a/.kokoro/samples/python3.7/common.cfg b/.kokoro/samples/python3.7/common.cfg index a5e7aa1..47e5489 100644 --- a/.kokoro/samples/python3.7/common.cfg +++ b/.kokoro/samples/python3.7/common.cfg @@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-runtimeconfig/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-runtimeconfig/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.7/periodic.cfg b/.kokoro/samples/python3.7/periodic.cfg index 50fec96..71cd1e5 100644 --- a/.kokoro/samples/python3.7/periodic.cfg +++ b/.kokoro/samples/python3.7/periodic.cfg @@ -3,4 +3,4 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" -} \ No newline at end of file +} diff --git a/.kokoro/samples/python3.8/common.cfg b/.kokoro/samples/python3.8/common.cfg index 082e2c6..daf3289 100644 --- a/.kokoro/samples/python3.8/common.cfg +++ b/.kokoro/samples/python3.8/common.cfg @@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-runtimeconfig/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-runtimeconfig/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.8/periodic.cfg b/.kokoro/samples/python3.8/periodic.cfg index 50fec96..71cd1e5 100644 --- a/.kokoro/samples/python3.8/periodic.cfg +++ b/.kokoro/samples/python3.8/periodic.cfg @@ -3,4 +3,4 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" -} \ No newline at end of file +} diff --git a/.kokoro/samples/python3.9/common.cfg b/.kokoro/samples/python3.9/common.cfg index a69be15..3b73986 100644 --- a/.kokoro/samples/python3.9/common.cfg +++ b/.kokoro/samples/python3.9/common.cfg @@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-runtimeconfig/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-runtimeconfig/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.9/periodic.cfg b/.kokoro/samples/python3.9/periodic.cfg index 50fec96..71cd1e5 100644 --- a/.kokoro/samples/python3.9/periodic.cfg +++ b/.kokoro/samples/python3.9/periodic.cfg @@ -3,4 +3,4 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" -} \ No newline at end of file +} diff --git a/.kokoro/test-samples-against-head.sh b/.kokoro/test-samples-against-head.sh index 9f99f63..ba3a707 100755 --- a/.kokoro/test-samples-against-head.sh +++ b/.kokoro/test-samples-against-head.sh @@ -23,6 +23,4 @@ set -eo pipefail # Enables `**` to include files nested inside sub-folders shopt -s globstar -cd github/python-runtimeconfig - exec .kokoro/test-samples-impl.sh diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh index 3eedfed..11c042d 100755 --- a/.kokoro/test-samples.sh +++ b/.kokoro/test-samples.sh @@ -24,8 +24,6 @@ set -eo pipefail # Enables `**` to include files nested inside sub-folders shopt -s globstar -cd github/python-runtimeconfig - # Run periodic samples tests at latest release if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then # preserving the test runner implementation. diff --git a/.repo-metadata.json b/.repo-metadata.json index 1d818c3..8802414 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,14 +1,16 @@ { - "name": "runtimeconfig", - "name_pretty": "Google Cloud Runtime Configurator", - "product_documentation": "https://cloud.google.com/deployment-manager/runtime-configurator/", - "client_documentation": "https://googleapis.dev/python/runtimeconfig/latest", - "issue_tracker": "https://issuetracker.google.com/savedsearches/559663", - "release_level": "beta", - "language": "python", - "library_type": "GAPIC_MANUAL", - "repo": "googleapis/python-runtimeconfig", - "distribution_name": "google-cloud-runtimeconfig", - "api_id": "runtimeconfig.googleapis.com", - "requires_billing": true + "name": "runtimeconfig", + "name_pretty": "Google Cloud Runtime Configurator", + "product_documentation": "https://cloud.google.com/deployment-manager/runtime-configurator/", + "client_documentation": "https://googleapis.dev/python/runtimeconfig/latest", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559663", + "release_level": "beta", + "language": "python", + "library_type": "GAPIC_MANUAL", + "repo": "googleapis/python-runtimeconfig", + "distribution_name": "google-cloud-runtimeconfig", + "api_id": "runtimeconfig.googleapis.com", + "requires_billing": true, + "default_version": "", + "codeowner_team": "" } diff --git a/.trampolinerc b/.trampolinerc index 383b6ec..0eee72a 100644 --- a/.trampolinerc +++ b/.trampolinerc @@ -16,15 +16,26 @@ # Add required env vars here. required_envvars+=( - "STAGING_BUCKET" - "V2_STAGING_BUCKET" ) # Add env vars which are passed down into the container here. pass_down_envvars+=( + "NOX_SESSION" + ############### + # Docs builds + ############### "STAGING_BUCKET" "V2_STAGING_BUCKET" - "NOX_SESSION" + ################## + # Samples builds + ################## + "INSTALL_LIBRARY_FROM_SOURCE" + "RUN_TESTS_SESSION" + "BUILD_SPECIFIC_GCLOUD_PROJECT" + # Target directories. + "RUN_TESTS_DIRS" + # The nox session to run. + "RUN_TESTS_SESSION" ) # Prevent unintentional override on the default image. diff --git a/CHANGELOG.md b/CHANGELOG.md index 90a4442..179e88a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-runtimeconfig/#history +### [0.32.6](https://www.github.com/googleapis/python-runtimeconfig/compare/v0.32.5...v0.32.6) (2021-10-05) + + +### Bug Fixes + +* don't offset timestamp via naive datetime ([#112](https://www.github.com/googleapis/python-runtimeconfig/issues/112)) ([8fe62f9](https://www.github.com/googleapis/python-runtimeconfig/commit/8fe62f992e1dc98dfb69a805afb24160de9c3b6b)) + ### [0.32.5](https://www.github.com/googleapis/python-runtimeconfig/compare/v0.32.4...v0.32.5) (2021-09-20) diff --git a/google/cloud/runtimeconfig/variable.py b/google/cloud/runtimeconfig/variable.py index 77afcfc..11f17cc 100644 --- a/google/cloud/runtimeconfig/variable.py +++ b/google/cloud/runtimeconfig/variable.py @@ -210,13 +210,10 @@ def update_time(self): try: value = datetime.datetime.strptime( value, datetime_helpers._RFC3339_MICROS - ) + ).replace(tzinfo=datetime.timezone.utc) except ValueError: DatetimeNS = datetime_helpers.DatetimeWithNanoseconds value = DatetimeNS.from_rfc3339(value) - naive = value.tzinfo is None or value.tzinfo.utcoffset(value) is None - if naive: - value = value.astimezone(tz=datetime.timezone.utc) return value def _require_client(self, client): diff --git a/setup.py b/setup.py index 47afc7c..7eea4d3 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ name = "google-cloud-runtimeconfig" description = "Google Cloud RuntimeConfig API client library" -version = "0.32.5" +version = "0.32.6" # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta'