Skip to content

[CI] Check load average before running Test adapters step#21222

Open
luszczewskakasia1 wants to merge 1 commit intosyclfrom
luszczewskakasia1_monitoring
Open

[CI] Check load average before running Test adapters step#21222
luszczewskakasia1 wants to merge 1 commit intosyclfrom
luszczewskakasia1_monitoring

Conversation

@luszczewskakasia1
Copy link
Contributor

@luszczewskakasia1 luszczewskakasia1 commented Feb 5, 2026

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.

Comment on lines 13 to 34
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

overly broad permissions
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

code injection via template expansion
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

code injection via template expansion
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

code injection via template expansion
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

code injection via template expansion
- 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

code injection via template expansion
Copy link
Contributor

@sarnex sarnex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps rename to aggregate-load-data

@@ -0,0 +1,121 @@
name: SYCL Health Monitoring
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can add on top of the file a short description what this workflow is for

Comment on lines +43 to +44
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

Check warning

Code scanning / zizmor

credential persistence through GitHub Actions artifacts Warning

credential persistence through GitHub Actions artifacts
…r's health

Signed-off-by: luszczewskakasia1 <katarzyna.luszczewska@intel.com>
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