-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️Maintenance: Refactoring of redis client structure (#7015)
- Loading branch information
Showing
61 changed files
with
504 additions
and
361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: CI Multi-Architecture Fusing | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["CI ARM64 Build and Push", "CI"] | ||
types: | ||
- completed | ||
branches: | ||
- "master" | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
multi-architecture-fusing: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
timeout-minutes: 60 # intentionally long to allow for slow builds | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04] | ||
python: ["3.11"] | ||
env: | ||
# secrets can be set in settings/secrets on github | ||
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: setup QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: setup docker buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
driver: docker-container | ||
- name: expose github runtime for buildx | ||
uses: crazy-max/ghaction-github-runtime@v3 | ||
- name: show system environs | ||
run: ./ci/helpers/show_system_versions.bash | ||
- name: login to Dockerhub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Set deployment variables | ||
run: | | ||
if [ "${GITHUB_REF}" == "refs/heads/master" ]; then | ||
echo "TAG_PREFIX=master-github" >> $GITHUB_ENV | ||
elif [[ "${GITHUB_REF}" == refs/heads/hotfix_v* ]]; then | ||
echo "TAG_PREFIX=hotfix-github" >> $GITHUB_ENV | ||
elif [[ "${GITHUB_REF}" == refs/heads/hotfix_staging_* ]]; then | ||
echo "TAG_PREFIX=hotfix-staging-github" >> $GITHUB_ENV | ||
fi | ||
- name: fuse images in the registry for latest tag | ||
run: | | ||
export DOCKER_IMAGE_TAG="$TAG_PREFIX-latest" | ||
make docker-image-fuse SUFFIX=arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from ._client import RedisClientSDK | ||
from ._clients_manager import RedisClientsManager | ||
from ._decorators import exclusive | ||
from ._distributed_locks_utils import start_exclusive_periodic_task | ||
from ._errors import ( | ||
CouldNotAcquireLockError, | ||
CouldNotConnectToRedisError, | ||
LockLostError, | ||
) | ||
from ._models import RedisManagerDBConfig | ||
from ._utils import handle_redis_returns_union_types | ||
|
||
__all__: tuple[str, ...] = ( | ||
"CouldNotAcquireLockError", | ||
"CouldNotConnectToRedisError", | ||
"exclusive", | ||
"handle_redis_returns_union_types", | ||
"LockLostError", | ||
"RedisClientSDK", | ||
"RedisClientsManager", | ||
"RedisManagerDBConfig", | ||
"start_exclusive_periodic_task", | ||
) | ||
|
||
# nopycln: file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.