[CI] Check load average before running Test adapters step#21222
[CI] Check load average before running Test adapters step#21222luszczewskakasia1 wants to merge 1 commit intosyclfrom
Conversation
e97a59f to
0368de5
Compare
| health-check: | ||
| if: github.event_name == 'workflow_call' | ||
| runs-on: ${{inputs.runner_name}} | ||
| steps: | ||
| - name: Check load average | ||
| id: check | ||
| run: | | ||
| DATE=$(date +"%Y-%m-%d_%H-%M-%S") | ||
| echo "DATE=${DATE}" >> $GITHUB_OUTPUT | ||
| mkdir -p artifacts | ||
| echo "Directory created, verifying..." | ||
| ls -la artifacts/ | ||
| uptime | awk -F'load average:' '{ print $2 }' > artifacts/${DATE}_${{ runner.name }}.txt | ||
| echo "File created, verifying contents..." | ||
| cat artifacts/${DATE}_${{ runner.name }}.txt | ||
| echo "File path: artifacts/${DATE}_${{ runner.name }}.txt" | ||
| ls -lh artifacts/${DATE}_${{ runner.name }}.txt | ||
| - name: Upload load average artifact | ||
| uses: actions/upload-artifact@v5 | ||
| with: | ||
| name: ${{ steps.check.outputs.DATE }}_${{ runner.name }}_load-average | ||
| path: artifacts/${{ steps.check.outputs.DATE }}_${{ runner.name }}.txt |
Check warning
Code scanning / zizmor
overly broad permissions Warning
| load=$(cat "$file" | xargs) | ||
|
|
||
| if [ "$first_data" = true ]; then | ||
| echo " \"$filename\": \"$load\"" >> aggregated_${{ steps.date.outputs.YESTERDAY }}.json |
Check notice
Code scanning / zizmor
code injection via template expansion Note
| echo " \"$filename\": \"$load\"" >> aggregated_${{ steps.date.outputs.YESTERDAY }}.json | ||
| first_data=false | ||
| else | ||
| echo ", \"$filename\": \"$load\"" >> aggregated_${{ steps.date.outputs.YESTERDAY }}.json |
Check notice
Code scanning / zizmor
code injection via template expansion Note
| echo " \"$filename\": \"$load\"" >> aggregated_${{ steps.date.outputs.YESTERDAY }}.json | ||
| first_data=false | ||
| else | ||
| echo ", \"$filename\": \"$load\"" >> aggregated_${{ steps.date.outputs.YESTERDAY }}.json |
Check notice
Code scanning / zizmor
code injection via template expansion Note
| echo " \"$filename\": \"$load\"" >> aggregated_${{ steps.date.outputs.YESTERDAY }}.json | ||
| first_data=false | ||
| else | ||
| echo ", \"$filename\": \"$load\"" >> aggregated_${{ steps.date.outputs.YESTERDAY }}.json |
Check notice
Code scanning / zizmor
code injection via template expansion Note
| - name: Check if data exists | ||
| id: check_data | ||
| run: | | ||
| content=$(cat aggregated_${{ steps.date.outputs.YESTERDAY }}.json | tr -d ' \n') |
Check notice
Code scanning / zizmor
code injection via template expansion Note
sarnex
left a comment
There was a problem hiding this comment.
no flags from me except fixing the security issues, will leave to ur team for real review
| @@ -0,0 +1,121 @@ | |||
| name: SYCL Health Monitoring | |||
There was a problem hiding this comment.
If this is truly only for UR adapaters (as the workflow name suggest), pls update the name here.
| name: ${{ steps.check.outputs.DATE }}_${{ runner.name }}_load-average | ||
| path: artifacts/${{ steps.check.outputs.DATE }}_${{ runner.name }}.txt | ||
|
|
||
| sycl-aggregate-data: |
There was a problem hiding this comment.
perhaps rename to aggregate-load-data
| @@ -0,0 +1,121 @@ | |||
| name: SYCL Health Monitoring | |||
There was a problem hiding this comment.
you can add on top of the file a short description what this workflow is for
0368de5 to
31dbf9e
Compare
…r's health Signed-off-by: luszczewskakasia1 <katarzyna.luszczewska@intel.com>
This is enhancement to monitor UR machines' load average before Test adapters job. It gathers info from the runner which runs this job.
The results from every run from the day before are collected into one JSON file which is saved as an artifact.
Also, the results from every run will be added to Grafana monitoring tool and when the load extends set value, the alert via Teams will be send to our team.