Skip to content

Commit c2ccce1

Browse files
committed
merge master into 6948-expose-licensing-endpoints-in-api-server
2 parents 35c930e + 2165fd4 commit c2ccce1

File tree

92 files changed

+1044
-502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1044
-502
lines changed

.github/workflows/ci-arm-build.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI ARM64 Build and Push
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
tags-ignore:
8+
- "*"
9+
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build-and-push-arm64:
18+
timeout-minutes: 60 # intentionally long to allow for slow builds
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
os: [ubuntu-22.04]
23+
python: ["3.11"]
24+
env:
25+
# secrets can be set in settings/secrets on github
26+
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: setup QEMU
30+
uses: docker/setup-qemu-action@v3
31+
- name: setup docker buildx
32+
id: buildx
33+
uses: docker/setup-buildx-action@v3
34+
with:
35+
driver: docker-container
36+
- name: expose github runtime for buildx
37+
uses: crazy-max/ghaction-github-runtime@v3
38+
- name: show system environs
39+
run: ./ci/helpers/show_system_versions.bash
40+
- name: login to Dockerhub
41+
uses: docker/login-action@v2
42+
with:
43+
username: ${{ secrets.DOCKER_USERNAME }}
44+
password: ${{ secrets.DOCKER_PASSWORD }}
45+
- name: Set deployment variables
46+
run: |
47+
if [ "${GITHUB_REF}" == "refs/heads/master" ]; then
48+
echo "TAG_PREFIX=master-github" >> $GITHUB_ENV
49+
elif [[ "${GITHUB_REF}" == refs/heads/hotfix_v* ]]; then
50+
echo "TAG_PREFIX=hotfix-github" >> $GITHUB_ENV
51+
elif [[ "${GITHUB_REF}" == refs/heads/hotfix_staging_* ]]; then
52+
echo "TAG_PREFIX=hotfix-staging-github" >> $GITHUB_ENV
53+
fi
54+
- name: build & push images for latest tag
55+
run: |
56+
export DOCKER_IMAGE_TAG="$TAG_PREFIX-latest-arm64"
57+
export DOCKER_TARGET_PLATFORMS=linux/arm64
58+
make build push=true
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI Multi-Architecture Fusing
2+
3+
on:
4+
workflow_run:
5+
workflows: ["CI ARM64 Build and Push", "CI"]
6+
types:
7+
- completed
8+
branches:
9+
- "master"
10+
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
multi-architecture-fusing:
18+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
19+
timeout-minutes: 60 # intentionally long to allow for slow builds
20+
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
os: [ubuntu-22.04]
24+
python: ["3.11"]
25+
env:
26+
# secrets can be set in settings/secrets on github
27+
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: setup QEMU
31+
uses: docker/setup-qemu-action@v3
32+
- name: setup docker buildx
33+
id: buildx
34+
uses: docker/setup-buildx-action@v3
35+
with:
36+
driver: docker-container
37+
- name: expose github runtime for buildx
38+
uses: crazy-max/ghaction-github-runtime@v3
39+
- name: show system environs
40+
run: ./ci/helpers/show_system_versions.bash
41+
- name: login to Dockerhub
42+
uses: docker/login-action@v2
43+
with:
44+
username: ${{ secrets.DOCKER_USERNAME }}
45+
password: ${{ secrets.DOCKER_PASSWORD }}
46+
- name: Set deployment variables
47+
run: |
48+
if [ "${GITHUB_REF}" == "refs/heads/master" ]; then
49+
echo "TAG_PREFIX=master-github" >> $GITHUB_ENV
50+
elif [[ "${GITHUB_REF}" == refs/heads/hotfix_v* ]]; then
51+
echo "TAG_PREFIX=hotfix-github" >> $GITHUB_ENV
52+
elif [[ "${GITHUB_REF}" == refs/heads/hotfix_staging_* ]]; then
53+
echo "TAG_PREFIX=hotfix-staging-github" >> $GITHUB_ENV
54+
fi
55+
- name: fuse images in the registry for latest tag
56+
run: |
57+
export DOCKER_IMAGE_TAG="$TAG_PREFIX-latest"
58+
make docker-image-fuse SUFFIX=arm64

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repos:
3030
name: upgrade code
3131
exclude: ^scripts/maintenance/computational-clusters/autoscaled_monitor/cli\.py$ # Optional get replaced and typer does not like it
3232
- repo: https://github.com/hadialqattan/pycln
33-
rev: v2.1.4
33+
rev: v2.5.0
3434
hooks:
3535
- id: pycln
3636
args: [--all, --expand-stars]

Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,16 @@ docker buildx bake --allow=fs.read=.. \
172172
,--load\
173173
)\
174174
)\
175+
$(if $(push),\
176+
$(foreach service, $(SERVICES_NAMES_TO_BUILD),\
177+
--set $(service).tags=$(DOCKER_REGISTRY)/$(service):$(DOCKER_IMAGE_TAG) \
178+
) \
179+
$(foreach service, $(SERVICES_NAMES_TO_BUILD),\
180+
--set $(service).output="type=registry$(comma)push=true" \
181+
)\
182+
,) \
175183
$(if $(push),--push,) \
176-
$(if $(push),--file docker-bake.hcl,) --file docker-compose-build.yml $(if $(target),$(target),$(INCLUDED_SERVICES)) \
184+
--file docker-compose-build.yml $(if $(target),$(target),$(INCLUDED_SERVICES)) \
177185
$(if $(findstring -nc,$@),--no-cache,\
178186
$(foreach service, $(SERVICES_NAMES_TO_BUILD),\
179187
--set $(service).cache-to=type=gha$(comma)mode=max$(comma)scope=$(service) \
@@ -859,3 +867,8 @@ release-staging release-prod: .check-on-master-branch ## Helper to create a sta
859867
.PHONY: release-hotfix release-staging-hotfix
860868
release-hotfix release-staging-hotfix: ## Helper to create a hotfix release in Github (usage: make release-hotfix version=1.2.4 git_sha=optional or make release-staging-hotfix name=Sprint version=2)
861869
$(create_github_release_url)
870+
871+
.PHONY: docker-image-fuse
872+
docker-image-fuse:
873+
$(foreach service, $(SERVICES_NAMES_TO_BUILD),\
874+
docker buildx imagetools create --tag $(DOCKER_REGISTRY)/$(service):$(DOCKER_IMAGE_TAG) $(DOCKER_REGISTRY)/$(service):$(DOCKER_IMAGE_TAG)-$(SUFFIX) $(DOCKER_REGISTRY)/$(service):$(DOCKER_IMAGE_TAG);)

packages/aws-library/requirements/_base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ pyyaml==6.0.2
294294
# -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt
295295
# -c requirements/../../../requirements/constraints.txt
296296
# -r requirements/../../../packages/service-library/requirements/_base.in
297-
redis==5.0.4
297+
redis==5.2.1
298298
# via
299299
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
300300
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt

packages/pytest-simcore/src/pytest_simcore/redis_service.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import tenacity
1111
from pytest_mock import MockerFixture
1212
from redis.asyncio import Redis, from_url
13+
from servicelib.redis import _constants as redis_constants
1314
from settings_library.basic_types import PortInt
1415
from settings_library.redis import RedisDatabase, RedisSettings
1516
from tenacity.before_sleep import before_sleep_log
@@ -118,6 +119,4 @@ async def wait_till_redis_responsive(redis_url: URL | str) -> None:
118119
@pytest.fixture
119120
def mock_redis_socket_timeout(mocker: MockerFixture) -> None:
120121
# lowered to allow CI to properly shutdown RedisClientSDK instances
121-
from servicelib import redis
122-
123-
mocker.patch.object(redis, "_DEFAULT_SOCKET_TIMEOUT", timedelta(seconds=1))
122+
mocker.patch.object(redis_constants, "DEFAULT_SOCKET_TIMEOUT", timedelta(seconds=1))

packages/service-library/requirements/_base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ pyyaml==6.0.2
210210
# -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt
211211
# -c requirements/../../../requirements/constraints.txt
212212
# -r requirements/_base.in
213-
redis==5.0.4
213+
redis==5.2.1
214214
# via
215215
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
216216
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt

packages/service-library/src/servicelib/aiohttp/rest_middlewares.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
DEFAULT_API_VERSION = "v0"
3333
_FMSG_INTERNAL_ERROR_USER_FRIENDLY_WITH_OEC = (
3434
"We apologize for the inconvenience."
35-
" Our team has recorded the issue [{error_code}] and is working to resolve it as quickly as possible."
35+
" Our team has recorded the issue [SupportID={error_code}] and is working to resolve it as quickly as possible."
3636
" Thank you for your patience"
3737
)
3838

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from ._client import RedisClientSDK
2+
from ._clients_manager import RedisClientsManager
3+
from ._decorators import exclusive
4+
from ._distributed_locks_utils import start_exclusive_periodic_task
5+
from ._errors import (
6+
CouldNotAcquireLockError,
7+
CouldNotConnectToRedisError,
8+
LockLostError,
9+
)
10+
from ._models import RedisManagerDBConfig
11+
from ._utils import handle_redis_returns_union_types
12+
13+
__all__: tuple[str, ...] = (
14+
"CouldNotAcquireLockError",
15+
"CouldNotConnectToRedisError",
16+
"exclusive",
17+
"handle_redis_returns_union_types",
18+
"LockLostError",
19+
"RedisClientSDK",
20+
"RedisClientsManager",
21+
"RedisManagerDBConfig",
22+
"start_exclusive_periodic_task",
23+
)
24+
25+
# nopycln: file

0 commit comments

Comments
 (0)