Skip to content

Commit 5c66118

Browse files
author
Nils Bars
committed
Fix IPAM None handling and add failure log summary to CI
Handle Docker networks where IPAM key exists but has None value by using `or {}` instead of relying on `.get()` default parameter. Add CI step to generate SUMMARY.txt from failure logs before uploading artifacts. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent f902c7a commit 5c66118

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,14 @@ jobs:
148148
path: tests/coverage_reports/
149149
retention-days: 7
150150

151+
- name: Generate failure log summary
152+
if: failure()
153+
working-directory: tests
154+
run: |
155+
if [ -d "failure_logs" ]; then
156+
uv run python summarize_logs.py || true
157+
fi
158+
151159
- name: Upload failure logs
152160
uses: actions/upload-artifact@v4
153161
if: failure()

webapp/ref/core/docker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def _get_used_subnets(self) -> set[ipaddress.IPv4Network]:
407407
used = set()
408408
for network in self.client.networks.list():
409409
try:
410-
ipam_config = network.attrs.get("IPAM", {}).get("Config") or []
410+
ipam_config = (network.attrs.get("IPAM") or {}).get("Config") or []
411411
for config in ipam_config:
412412
subnet_str = config.get("Subnet")
413413
if subnet_str:

0 commit comments

Comments
 (0)