Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
  • Loading branch information
ranchodeluxe committed Jan 30, 2024
1 parent c7b03e9 commit 8f49b28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/job-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ jobs:
kubectl get pod | grep -v taskmanager | grep ${{ needs.run-job.outputs.job_name }} | cut -d' ' -f1 | xargs -I{} kubectl logs pod/{} > /tmp/jobmanager.log
cat /tmp/jobmanager.log
echo "##################### TASK MANAGER ######################"
# depending on the `inputs.parallism` we can more than one taskmanager so only dump logs for the first three
# depending on the `inputs.parallism` we can have more than one taskmanager so only dump logs for the first three
iterations=$(expr "${{ github.event.inputs.parallelism }}" + 0) # cast to integer
for (( i = 0; i < iterations; i++ )); do
kubectl get pod | grep taskmanager | grep ${{ needs.run-job.outputs.job_name }} | cut -d' ' -f1 | head -n1 | xargs -I{} kubectl logs pod/{} -c flink-main-container > /tmp/taskmanager.log
for (( i = 1; i < iterations; i++ )); do
kubectl get pod | grep ${{ needs.run-job.outputs.job_name }} | grep task-manager-$i | cut -d' ' -f1 | head -n1 | xargs -I{} kubectl logs pod/{} -c flink-main-container > /tmp/taskmanager.log
cat /tmp/taskmanager.log
# break the loop if iteration count exceeds 3
if (( i >= 3 )); then
Expand Down

0 comments on commit 8f49b28

Please sign in to comment.