Skip to content

Commit 815f62f

Browse files
authored
Merge branch 'main' into dependabot/github_actions/mikepenz/action-junit-report-6
2 parents c6a9f09 + 80a5912 commit 815f62f

File tree

14 files changed

+707
-620
lines changed

14 files changed

+707
-620
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ concurrency:
55
cancel-in-progress: true
66

77
permissions:
8+
actions: write
89
contents: read
910
checks: write
1011
id-token: write
@@ -65,7 +66,7 @@ jobs:
6566

6667
- name: Install uv
6768
id: setup-uv
68-
uses: astral-sh/setup-uv@v6
69+
uses: astral-sh/setup-uv@v7
6970
with:
7071
version: latest
7172
python-version: ${{ matrix.python-version }}

.github/workflows/dependabotautomerge.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ concurrency:
55
cancel-in-progress: true
66

77
permissions:
8+
actions: write
89
contents: write
910
pull-requests: write
1011

.github/workflows/docker-image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Publish Docker Image
22

33
permissions:
4+
actions: write
45
contents: read
56
checks: write
67
id-token: write
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Rebase Dependabot
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
on:
12+
push:
13+
branches:
14+
- main
15+
workflow_dispatch:
16+
17+
jobs:
18+
rebase-dependabot:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Rebase Dependabot open PRs
22+
uses: actions/github-script@v6
23+
with:
24+
script: |
25+
const owner = context.repo.owner;
26+
const repo = context.repo.repo;
27+
// list open PRs
28+
const { data: prs } = await github.rest.pulls.list({
29+
owner, repo, state: "open", per_page: 100
30+
});
31+
32+
for (const pr of prs) {
33+
if (!pr.head.ref) {
34+
continue;
35+
}
36+
37+
// target dependabot PRs
38+
const isDependabot = pr.user && (
39+
pr.user.login === "dependabot[bot]" ||
40+
(pr.user.login.endsWith("[bot]") && pr.head.ref.startsWith("dependabot/"))
41+
);
42+
if (!isDependabot) continue;
43+
44+
try {
45+
await github.rest.pulls.updateBranch({
46+
owner,
47+
repo,
48+
pull_number: pr.number
49+
});
50+
core.info(`Requested update for PR #${pr.number}`);
51+
} catch (err) {
52+
core.warning(`Failed to update PR #${pr.number}: ${err.message}`);
53+
}
54+
}

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929

3030
# Run the Ruff linter.
3131
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: v0.14.1
32+
rev: v0.14.6
3333
hooks:
3434
# Linter
3535
- id: ruff
@@ -38,7 +38,7 @@ repos:
3838
- id: ruff-format
3939

4040
- repo: https://github.com/kynan/nbstripout
41-
rev: 0.8.1
41+
rev: 0.8.2
4242
hooks:
4343
- id: nbstripout
4444

dask-test/uv.lock

Lines changed: 85 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-health-check/docker_health_check/api/healthcheck.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@
55
from typing import TYPE_CHECKING, Any
66

77
import anyio
8-
import backoff
98
import requests
109
from docker.client import DockerClient
1110
from tabulate import tabulate
11+
from tenacity import (
12+
retry,
13+
retry_if_exception,
14+
stop_after_attempt,
15+
wait_exponential,
16+
)
1217

1318
from docker_health_check import __version__, constants, utils
1419
from docker_health_check.models import ContainerRow
@@ -34,7 +39,11 @@ async def _restart(state: tuple[ContainerRow, NotificationHub]) -> None:
3439
notification_hub.enqueue(message)
3540

3641

37-
@backoff.on_exception(backoff.expo, requests.exceptions.RequestException, max_tries=constants.MAX_RETRY)
42+
@retry(
43+
retry=retry_if_exception(lambda ex: isinstance(ex, requests.exceptions.RequestException)),
44+
wait=wait_exponential(),
45+
stop=stop_after_attempt(constants.MAX_RETRY),
46+
)
3847
def _get_containers(client: DockerClient, filters: dict[str, Any] | None) -> Iterable[ContainerRow]:
3948
containers = client.containers.list(filters=filters)
4049
return map(ContainerRow.from_container, containers)

docker-health-check/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies = [
2727
"tabulate<1.0.0,>=0.9.0",
2828
"pydantic<3.0.0,>=2.9.2",
2929
"pydantic-settings<3.0.0,>=2.6.0",
30-
"backoff<3.0.0,>=2.2.1",
30+
"tenacity>=9.1.2",
3131
]
3232

3333
[dependency-groups]

docker-health-check/uv.lock

Lines changed: 110 additions & 101 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github/httpclient.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@
66
from http import HTTPMethod, HTTPStatus
77
from typing import TYPE_CHECKING, Any, Final, Self, cast
88

9-
import backoff
109
from curl_cffi import requests
10+
from tenacity import (
11+
retry,
12+
retry_if_exception,
13+
stop_after_attempt,
14+
stop_after_delay,
15+
wait_exponential,
16+
)
1117

1218
from github import constants
1319

@@ -68,11 +74,10 @@ async def _execute(
6874
async with self._make_request(method, url, headers, params=params) as response:
6975
assert response.status_code == HTTPStatus.NO_CONTENT
7076

71-
@backoff.on_exception(
72-
backoff.expo,
73-
requests.exceptions.RequestException,
74-
max_tries=constants.MAX_RETRIES,
75-
max_time=constants.MAX_RETRY_TIME,
77+
@retry(
78+
retry=retry_if_exception(lambda ex: isinstance(ex, requests.exceptions.RequestException)),
79+
wait=wait_exponential(),
80+
stop=stop_after_attempt(constants.MAX_RETRIES) | stop_after_delay(constants.MAX_RETRY_TIME),
7681
)
7782
@asynccontextmanager
7883
async def _make_request(

0 commit comments

Comments
 (0)