Cannot inspect Egde logs in CI/CD
Bug report
- [X] I confirm this is a bug with Supabase, not with my own application.
- [X] I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
When running supabase start in Github action The edge function starts, but we can't see its logs.
When running test against it and the test fails, we cannot see the reason of the fail in our code
To Reproduce
I made a reproduction repo for this: https://github.com/riderx/supabase_edge_issue
You can see in the GitHub action it fails: https://github.com/riderx/supabase_edge_issue/actions/runs/13354496001/job/37295330902 But we cannot see the logs of the edge functions. We could run directly the Deno code outside the Edge worker, but this defeats the purpose of having the same env as production.
Expected behavior
Having a way to inspect the edge workers logs if the CI/CD failed.
Another example on why it's important: https://github.com/supabase/postgres/issues/1447 In my local test i was not up-to-date with images so i coudn't reproduce and understand the issue, now i replicate in local too but that was painful to understand
@riderx I recommend posting this issue to https://github.com/supabase/cli/issues which covers issues with running the supabase command, and the images that are associated with that. Closing and recommend re-posting there.
@kiwicopple recommended me to post here, as you would redirect it to correct place
https://x.com/kiwicopple/status/1890470770884727131?s=46
@sweatybridge do you know if there is a way to move this issue to https://github.com/supabase/cli/issues assuming you agree that is the correct home for it? Thanks!
I think this is a known studio bug. We can move it to supabase/supabase repo.
The workaround is check the docker logs for edge runtime container.
docker logs -f supabase_edge_runtime_<project>
in local i can see my logs yep, but in CI/CD i have no way to see them, unless i miss something ?
thanks @sweatybridge
@riderx I think that if you place the step with if: failure() set immediately after the step that fails, you will be able to view the logs by calling docker logs there. Did this not work?
@nyannyacha I ended up doing:
- uses: JarvusInnovations/background-action@v1
name: Bootstrap Edge server
with:
run: supabase functions serve &
wait-on: |
http-get://127.0.0.1:54321/functions/v1/ok
tail: stderr,stdout
log-output-resume: stderr,stdout
wait-for: 1m
log-output: stderr,stdout # same as true
log-output-if: true
working-directory: .
And this solve my issue