Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/python-redis
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0
Choose a base ref
...
head repository: googleapis/python-redis
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.1.0
Choose a head ref
  • 7 commits
  • 39 files changed
  • 4 contributors

Commits on Sep 22, 2020

  1. Copy the full SHA
    bfd1eb3 View commit details

Commits on Nov 24, 2020

  1. Copy the full SHA
    66eecbb View commit details

Commits on Dec 22, 2020

  1. Copy the full SHA
    add0735 View commit details

Commits on Dec 23, 2020

  1. Copy the full SHA
    f3f1a86 View commit details
  2. Copy the full SHA
    6393451 View commit details

Commits on Jan 29, 2021

  1. Copy the full SHA
    682cc0d View commit details

Commits on Mar 1, 2021

  1. chore: release 2.1.0 (#40)

    Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
    release-please[bot] authored Mar 1, 2021
    Copy the full SHA
    ca435d8 View commit details
Showing with 1,291 additions and 550 deletions.
  1. +1 −0 .flake8
  2. +11 −0 .github/CODEOWNERS
  3. +1 −1 .kokoro/docs/common.cfg
  4. +43 −0 .kokoro/populate-secrets.sh
  5. +13 −37 .kokoro/release/common.cfg
  6. +6 −0 .kokoro/samples/python3.6/common.cfg
  7. +6 −0 .kokoro/samples/python3.7/common.cfg
  8. +6 −0 .kokoro/samples/python3.8/common.cfg
  9. +11 −5 .kokoro/test-samples.sh
  10. +10 −5 .kokoro/trampoline.sh
  11. +1 −1 .kokoro/trampoline_v2.sh
  12. +17 −0 .pre-commit-config.yaml
  13. +7 −0 CHANGELOG.md
  14. +87 −36 CODE_OF_CONDUCT.md
  15. +15 −25 CONTRIBUTING.rst
  16. +5 −3 docs/conf.py
  17. +1 −0 docs/redis_v1/types.rst
  18. +1 −0 docs/redis_v1beta1/types.rst
  19. +52 −11 google/cloud/redis_v1/services/cloud_redis/async_client.py
  20. +83 −15 google/cloud/redis_v1/services/cloud_redis/client.py
  21. +0 −1 google/cloud/redis_v1/services/cloud_redis/transports/__init__.py
  22. +22 −15 google/cloud/redis_v1/services/cloud_redis/transports/grpc.py
  23. +16 −3 google/cloud/redis_v1/services/cloud_redis/transports/grpc_asyncio.py
  24. +0 −1 google/cloud/redis_v1/types/__init__.py
  25. +7 −7 google/cloud/redis_v1/types/cloud_redis.py
  26. +60 −19 google/cloud/redis_v1beta1/services/cloud_redis/async_client.py
  27. +91 −23 google/cloud/redis_v1beta1/services/cloud_redis/client.py
  28. +0 −1 google/cloud/redis_v1beta1/services/cloud_redis/transports/__init__.py
  29. +22 −15 google/cloud/redis_v1beta1/services/cloud_redis/transports/grpc.py
  30. +16 −3 google/cloud/redis_v1beta1/services/cloud_redis/transports/grpc_asyncio.py
  31. +0 −1 google/cloud/redis_v1beta1/types/__init__.py
  32. +7 −7 google/cloud/redis_v1beta1/types/cloud_redis.py
  33. +6 −5 noxfile.py
  34. +1 −0 scripts/fixup_redis_v1_keywords.py
  35. +1 −0 scripts/fixup_redis_v1beta1_keywords.py
  36. +1 −1 setup.py
  37. +119 −2 synth.metadata
  38. +272 −153 tests/unit/gapic/redis_v1/test_cloud_redis.py
  39. +273 −154 tests/unit/gapic/redis_v1beta1/test_cloud_redis.py
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ exclude =
*_pb2.py

# Standard linting exemptions.
**/.nox/**
__pycache__,
.git,
*.pyc,
11 changes: 11 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Code owners file.
# This file controls who is tagged for review for any given pull request.
#
# For syntax help see:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax

# The @googleapis/yoshi-python is the default owner for changes in this repo
* @googleapis/yoshi-python

# The python-samples-reviewers team is the default owner for samples changes
/samples/ @googleapis/python-samples-owners
2 changes: 1 addition & 1 deletion .kokoro/docs/common.cfg
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ env_vars: {

env_vars: {
key: "V2_STAGING_BUCKET"
value: "docs-staging-v2-staging"
value: "docs-staging-v2"
}

# It will upload the docker image after successful builds.
43 changes: 43 additions & 0 deletions .kokoro/populate-secrets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash
# Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eo pipefail

function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;}
function msg { println "$*" >&2 ;}
function println { printf '%s\n' "$(now) $*" ;}


# Populates requested secrets set in SECRET_MANAGER_KEYS from service account:
# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
msg "Creating folder on disk for secrets: ${SECRET_LOCATION}"
mkdir -p ${SECRET_LOCATION}
for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g")
do
msg "Retrieving secret ${key}"
docker run --entrypoint=gcloud \
--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \
gcr.io/google.com/cloudsdktool/cloud-sdk \
secrets versions access latest \
--project cloud-devrel-kokoro-resources \
--secret ${key} > \
"${SECRET_LOCATION}/${key}"
if [[ $? == 0 ]]; then
msg "Secret written to ${SECRET_LOCATION}/${key}"
else
msg "Error retrieving secret ${key}"
fi
done
50 changes: 13 additions & 37 deletions .kokoro/release/common.cfg
Original file line number Diff line number Diff line change
@@ -23,42 +23,18 @@ env_vars: {
value: "github/python-redis/.kokoro/release.sh"
}

# Fetch the token needed for reporting release status to GitHub
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "yoshi-automation-github-key"
}
}
}

# Fetch PyPI password
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google_cloud_pypi_password"
}
}
}

# Fetch magictoken to use with Magic Github Proxy
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "releasetool-magictoken"
}
}
# Fetch PyPI password
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google_cloud_pypi_password"
}
}
}

# Fetch api key to use with Magic Github Proxy
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "magic-github-proxy-api-key"
}
}
}
# Tokens needed to report release status back to GitHub
env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.6/common.cfg
Original file line number Diff line number Diff line change
@@ -13,6 +13,12 @@ env_vars: {
value: "py-3.6"
}

# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "python-docs-samples-tests-py36"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-redis/.kokoro/test-samples.sh"
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.7/common.cfg
Original file line number Diff line number Diff line change
@@ -13,6 +13,12 @@ env_vars: {
value: "py-3.7"
}

# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "python-docs-samples-tests-py37"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-redis/.kokoro/test-samples.sh"
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.8/common.cfg
Original file line number Diff line number Diff line change
@@ -13,6 +13,12 @@ env_vars: {
value: "py-3.8"
}

# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "python-docs-samples-tests-py38"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-redis/.kokoro/test-samples.sh"
16 changes: 11 additions & 5 deletions .kokoro/test-samples.sh
Original file line number Diff line number Diff line change
@@ -28,6 +28,12 @@ if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
git checkout $LATEST_RELEASE
fi

# Exit early if samples directory doesn't exist
if [ ! -d "./samples" ]; then
echo "No tests run. `./samples` not found"
exit 0
fi

# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1

@@ -81,11 +87,11 @@ for file in samples/**/requirements.txt; do
python3.6 -m nox -s "$RUN_TESTS_SESSION"
EXIT=$?

# If this is a periodic build, send the test log to the Build Cop Bot.
# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/buildcop.
# If this is a periodic build, send the test log to the FlakyBot.
# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot.
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop
$KOKORO_GFILE_DIR/linux_amd64/buildcop
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
$KOKORO_GFILE_DIR/linux_amd64/flakybot
fi

if [[ $EXIT -ne 0 ]]; then
@@ -101,4 +107,4 @@ cd "$ROOT"
# Workaround for Kokoro permissions issue: delete secrets
rm testing/{test-env.sh,client-secrets.json,service-account.json}

exit "$RTN"
exit "$RTN"
15 changes: 10 additions & 5 deletions .kokoro/trampoline.sh
Original file line number Diff line number Diff line change
@@ -15,9 +15,14 @@

set -eo pipefail

python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" || ret_code=$?
# Always run the cleanup script, regardless of the success of bouncing into
# the container.
function cleanup() {
chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
echo "cleanup";
}
trap cleanup EXIT

chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
${KOKORO_GFILE_DIR}/trampoline_cleanup.sh || true

exit ${ret_code}
$(dirname $0)/populate-secrets.sh # Secret Manager secrets.
python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py"
2 changes: 1 addition & 1 deletion .kokoro/trampoline_v2.sh
Original file line number Diff line number Diff line change
@@ -159,7 +159,7 @@ if [[ -n "${KOKORO_BUILD_ID:-}" ]]; then
"KOKORO_GITHUB_COMMIT"
"KOKORO_GITHUB_PULL_REQUEST_NUMBER"
"KOKORO_GITHUB_PULL_REQUEST_COMMIT"
# For Build Cop Bot
# For FlakyBot
"KOKORO_GITHUB_COMMIT_URL"
"KOKORO_GITHUB_PULL_REQUEST_URL"
)
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,13 @@

[1]: https://pypi.org/project/google-cloud-redis/#history

## [2.1.0](https://www.github.com/googleapis/python-redis/compare/v2.0.0...v2.1.0) (2021-01-29)


### Features

* add common resource helpers; expose client transport; remove send/recv gRPC limits ([#38](https://www.github.com/googleapis/python-redis/issues/38)) ([f3f1a86](https://www.github.com/googleapis/python-redis/commit/f3f1a86a2f14ceeaf22362387b397d9b3f880684))

## [2.0.0](https://www.github.com/googleapis/python-redis/compare/v1.0.0...v2.0.0) (2020-09-14)


Loading