Skip to content

Conversation

@christabone
Copy link
Contributor

Summary

  • Use nohup and disown to prevent tunnel process from being killed when step shell exits
  • Add logging to /tmp/ssm_tunnel.log for debugging tunnel failures
  • Add keepalive process that pings pg_isready every 10 seconds to prevent idle timeout
  • Add proactive tunnel verification (process running, port listening) before database connection

Problem

SSM tunnels were establishing successfully but dying within seconds when the GitHub Actions shell step exits, causing subsequent steps that depend on the tunnel to fail.

Solution

This applies the same fix that was validated in agr_curation_api_client PR #11.

Test plan

  • Trigger a Claude code review on a PR to verify tunnel stays alive
  • Verify keepalive process starts and logs correctly
  • Confirm database connection succeeds in subsequent steps

- Use nohup and disown to prevent tunnel process from being killed when step shell exits
- Add logging to /tmp/ssm_tunnel.log for debugging tunnel failures
- Add keepalive process that pings pg_isready every 10 seconds to prevent idle timeout
- Add proactive tunnel verification (process running, port listening) before database connection

This fix addresses the issue where SSM tunnels would establish successfully but die
within seconds when the shell step exits, causing subsequent steps to fail.
@christabone christabone requested a review from valearna December 2, 2025 14:21
@valearna
Copy link
Contributor

valearna commented Dec 3, 2025

@christabone we approved the PR but there is a 401 error on claude code review. Maybe you need to update the secret for cc in the repo? Thanks

@christabone
Copy link
Contributor Author

This run fails on purpose with claude code. Should work for any future branches going forward.

@christabone christabone merged commit 622f25d into main Dec 3, 2025
8 of 9 checks passed
@christabone christabone deleted the fix/ssm-tunnel-persistence branch December 3, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants