Job is still in progress, it is not possible to view logs while job is running
Problem: Currently, when a GitHub Actions workflow job is in progress, it's not possible to view the logs in real-time within ghactions-manager. Users must wait until the job completes to see the output, which makes debugging and monitoring long-running jobs difficult. This is frustrating when trying to troubleshoot issues or monitor the progress of workflows that take several minutes or hours to complete.
Solution: I would like the ability to stream and view logs while a job is still running. This can be achieved by polling the GitHub API to fetch logs for in-progress jobs.
The solution would involve:
- Checking the workflow run status periodically
- Fetching job logs for jobs that are "in_progress" or "completed"
- Displaying these logs in real-time to the user
- Continuing to poll until the workflow run status is "completed"
Reference implementation (Solution 3 from GitHub Community Discussion #75518):
import requests
import time
def stream_workflow_logs(owner, repo, run_id, token):
headers = {"Authorization": f"token {token}"}
while True:
# Check run status
run_response = requests.get(
f"https://api.github.com/repos/{owner}/{repo}/actions/runs/{run_id}",
headers=headers
)
if run_response.json()["status"] == "completed":
# Get final logs
logs_response = requests.get(
f"https://api.github.com/repos/{owner}/{repo}/actions/runs/{run_id}/logs",
headers=headers
)
return logs_response.content
# Get job logs during execution
jobs_response = requests.get(
f"https://api.github.com/repos/{owner}/{repo}/actions/runs/{run_id}/jobs",
headers=headers
)
for job in jobs_response.json()["jobs"]:
if job["status"] in ["in_progress", "completed"]:
job_logs = requests.get(
f"https://api.github.com/repos/{owner}/{repo}/actions/jobs/{job['id']}/logs",
headers=headers
)
if job_logs.status_code == 200:
print(f"Job {job['name']} logs available")
time.sleep(10)
Alternatives:
- Opening the workflow directly in GitHub's web interface to view live logs (current workaround, but defeats the purpose of using ghactions-manager)
- Waiting for the job to complete before viewing logs (not ideal for long-running jobs)
- Using GitHub CLI (
gh run watch) as a separate tool (adds friction to the workflow)
Additional context: This feature would significantly improve the user experience when monitoring workflows, especially for:
- Long-running CI/CD pipelines
- Debugging failing jobs in real-time
- Monitoring deployment processes
- Troubleshooting without switching between tools
The GitHub API supports fetching logs for in-progress jobs via the /repos/{owner}/{repo}/actions/jobs/{job_id}/logs endpoint, making this technically feasible.
+1
The GitHub API returns 404 for in_progress jobs - As can be seen in the discussion mentioned as well. It is being requeried every 30s - you can configure it in the plugin settings.
I am working on a feature to show at least the step statuses while the job is in progress - this will be in the paid version feature only.