dagger itself reports the call as failed, but Github does not
https://dagger.cloud/esafak/traces/2532fd354714c80cea0776a6410d3cb1
#dagger-for-github not failing on dagger.ExecError
1 messages · Page 1 of 1 (latest)
@timid nebula strange.. this means your dagger call is not exiting with a status code != 0 when this error happens. Have you validated that it does so when running it locally?
@nocturne grotto I actually had that issue on one of our CI checks yesterday
Got an failed check from dagger cloud, but not from the corresponding gha job
Mind sharing the GHA link by any chance?
I think in my case it was due to faulty async handling. I had a health check defined as:
def await_container_health(
container: Container,
url: str,
retries: int = 60,
interval: int = 1,
) -> Container:
return container.with_exec(
[
"sh",
"-c",
f'''echo 'Waiting for service at {url} to be healthy...';
for i in $(seq 1 {retries}); do
if curl -s -f '{url}'; then
echo '\n\nService is healthy!';
exit 0;
fi;
sleep {interval};
done;
echo '\nService health check failed after {retries} attempts.';
exit 1;
''',
]
)
I changed it to:
async def await_container_health(
container: Container,
url: str,
retries: int = 60,
interval: int = 1,
) -> Container:
health_check = container.with_exec(
[
"sh",
"-c",
f'''echo 'Waiting for service at {url} to be healthy...';
for i in $(seq 1 {retries}); do
if curl -s -f '{url}'; then
echo '\n\nService is healthy!';
exit 0;
fi;
sleep {interval};
done;
echo '\nService health check failed after {retries} attempts.';
exit 1;
''',
]
)
# Explicitly sync to ensure errors propagate correctly
await health_check.sync()
return health_check
I'll report here if this does not fix it.