fix: reset duplicate detection state between compose generation runs
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful

Reset _seen_services and _service_sources arrays at the start of
_generate_compose_impl to prevent state bleeding between multiple
invocations. This fixes the test-duplicate-service-detection.sh test
which fails when run due to global associative array state persisting
between test cases.

Fixes: #850
This commit is contained in:
Agent 2026-04-19 19:53:29 +00:00
parent 1170ecb2f0
commit 0f91efc478

View file

@ -313,6 +313,10 @@ _generate_compose_impl() {
return 0
fi
# Reset duplicate detection state for fresh run
_seen_services=()
_service_sources=()
# Initialize duplicate detection with base services defined in the template
_record_service "forgejo" "base compose template" || return 1
_record_service "woodpecker" "base compose template" || return 1