This is an automated email from the ASF dual-hosted git repository. espino pushed a commit to branch main-debugging in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit f2697daef2895afebd4cf2cc704e15416013081d Author: Ed Espino <[email protected]> AuthorDate: Fri Oct 3 00:44:46 2025 -0700 Fix: Install tmate from EPEL repository Use --enablerepo=epel flag to install tmate from EPEL repository since it's not available in default Rocky Linux 9 repos. Also improved session management: - Use socket-based tmate session for better control - Poll session status to detect when user exits - Use GitHub Actions log grouping for cleaner output --- .github/workflows/build-cloudberry.yml | 48 +++++++++++++++------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-cloudberry.yml b/.github/workflows/build-cloudberry.yml index 397cec837c8..c0f010afa58 100644 --- a/.github/workflows/build-cloudberry.yml +++ b/.github/workflows/build-cloudberry.yml @@ -1261,45 +1261,39 @@ jobs: run: | set -eux - echo "=== Installing tmate for Rocky Linux 9 ===" - dnf install -y tmate + echo "=== Installing tmate from EPEL ===" + dnf install --enablerepo=epel -y -d0 tmate echo "=== Starting tmate session ===" echo "Session will timeout after ${{ github.event.inputs.debug_timeout_minutes || '30' }} minutes" - echo "WARNING: tmate session will be publicly accessible via the connection string below" - echo "Only share the connection details with trusted users" echo "" - # Generate SSH key if not exists - mkdir -p ~/.ssh - if [ ! -f ~/.ssh/id_rsa ]; then - ssh-keygen -t rsa -f ~/.ssh/id_rsa -N "" - fi - - # Start tmate and display connection info - echo "=== Tmate Connection Details ===" - tmate -F & - TMATE_PID=$! - - # Wait for tmate to initialize and get connection string - sleep 5 - - # Display connection strings - tmate display -p '#{tmate_ssh}' || true - tmate display -p '#{tmate_web}' || true + # Start tmate + tmate -S /tmp/tmate.sock new-session -d + tmate -S /tmp/tmate.sock wait tmate-ready + # Display connection information + echo "::group::Debug Session Information" + echo "SSH: $(tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}')" + echo "Web URL: $(tmate -S /tmp/tmate.sock display -p '#{tmate_web}')" echo "" - echo "=== Ready for Connection ===" - echo "Once connected, run the following commands:" + echo "Once connected, run:" echo " su - gpadmin" echo " cd \${SRC_DIR}" echo " source /usr/local/cloudberry-db/greenplum_path.sh" echo " source gpAux/gpdemo/gpdemo-env.sh" echo "" - echo "Press Ctrl+C in this session or 'exit' in tmate to continue the workflow" - - # Keep session alive - wait $TMATE_PID + echo "To exit debug session and continue workflow: type 'exit' in the session" + echo "::endgroup::" + + # Keep session alive until exit + while true; do + sleep 5 + if ! tmate -S /tmp/tmate.sock has-session; then + echo "Debug session ended, continuing workflow..." + exit 0 + fi + done - name: "Run Tests: ${{ matrix.test }}" if: success() && needs.check-skip.outputs.should_skip != 'true' --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
