Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Grid Nightly workflow #3274

Merged
merged 28 commits into from
Aug 13, 2024
Merged
Changes from 25 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3717d59
Push workflow
zaelgohary Aug 7, 2024
e6675fd
Update workflow, add issue template
zaelgohary Aug 7, 2024
93f39be
test workflow
zaelgohary Aug 7, 2024
21d59a1
Update search_existing
zaelgohary Aug 7, 2024
f80467d
add update_existing
zaelgohary Aug 7, 2024
0ec163c
Edit workflow
zaelgohary Aug 7, 2024
37fb66d
Edit workflow to get title from env file
zaelgohary Aug 7, 2024
c8252da
Add issue title env
zaelgohary Aug 7, 2024
5877eed
test duplication
zaelgohary Aug 7, 2024
1e0e1fa
Edit nightly, comment issue creation, edit issue template
zaelgohary Aug 7, 2024
f249ea3
Edit checkout version
zaelgohary Aug 7, 2024
087e268
Checkout repo b4 creating an issue
zaelgohary Aug 7, 2024
1a62f0e
Edit body
zaelgohary Aug 7, 2024
b3e72f7
Edit nightly
zaelgohary Aug 7, 2024
7e32c39
test envs in issue template
zaelgohary Aug 7, 2024
dfdeeb7
Search issues before create new one
zaelgohary Aug 8, 2024
a67ea13
add token to find issues
zaelgohary Aug 8, 2024
c4ed7f1
Edit workflow url, remove unused files
zaelgohary Aug 8, 2024
aa60644
Enforce running all jobs, fix run url
zaelgohary Aug 8, 2024
f15f8f4
Edit nightly
zaelgohary Aug 8, 2024
9dd03c4
add all networks
zaelgohary Aug 8, 2024
c150268
Test failed test
zaelgohary Aug 8, 2024
e9c4fe6
Replace continue-on-err w if:always()
zaelgohary Aug 8, 2024
32f0c57
Final test
zaelgohary Aug 8, 2024
251c59b
Run a cron job instead on push
zaelgohary Aug 8, 2024
352b9a9
Edit branches in all actions, remove jq installation
zaelgohary Aug 12, 2024
992fee9
Fail on purpuse
zaelgohary Aug 12, 2024
f609f24
Revert cron job
zaelgohary Aug 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 47 additions & 67 deletions .github/workflows/grid_client_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:

permissions:
contents: read
issues: write

jobs:
deployment-scripts:
runs-on: ubuntu-latest
Expand All @@ -22,17 +27,6 @@ jobs:

steps:
- uses: actions/checkout@v4
if: ${{ env.NETWORK == 'dev' }}
- uses: actions/checkout@v4
if: ${{ env.NETWORK == 'qa' }}
with:
ref: refs/tags/v2.5.2
- uses: actions/checkout@v4
if: ${{ env.NETWORK == 'test' }}
with:
ref: refs/tags/v2.5.2
- uses: actions/checkout@v4
if: ${{ env.NETWORK == 'main' }}
with:
ref: refs/tags/v2.5.2

Expand All @@ -45,56 +39,62 @@ jobs:
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y git libtool tmux redis net-tools
sudo apt-get install -y git libtool tmux redis net-tools gh jq
zaelgohary marked this conversation as resolved.
Show resolved Hide resolved

- name: Install
run: |
yarn
lerna run build --no-private
make build

- name: Run test dynamic single vm
id: dynamicsinglevm
continue-on-error: true
id: single_vm
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/dynamic_single_vm.ts

- name: Run test multiple vms
id: multiplevm
continue-on-error: true
id: multiple_vm
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/multiple_vms.ts

- name: Run test kubernetes
id: kubernetes
continue-on-error: true
id: k8s
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/orchestrators/kubernetes_leader.ts

- name: Run test vm with qsfs
id: vmqsfs
continue-on-error: true
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/vm_with_qsfs.ts

- name: Run test kubernetes with qsfs
id: kubernetesqsfs
continue-on-error: true
id: k8sqsfs
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/orchestrators/kubernetes_with_qsfs.ts

- name: Run test kvstore
id: kvstore
continue-on-error: true
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/kvstore_example.ts

- name: Run test zdb
id: zdb
continue-on-error: true
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/zdb.ts

- name: Cleanup - Delete all contracts
id: deleteall
if: always()
id: delete_all
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/delete_all_contracts.ts

- name: Run check up - List all contracts
id: command_step
run: |
sleep 15
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/list_all_contracts.ts > output.txt
Expand All @@ -111,53 +111,33 @@ jobs:
exit 1
fi

- name: Test Results
- name: Find issues
if: failure()
id: find-issues
env:
GH_TOKEN: ${{ github.token }}
run: |
echo Dynamic Single Vm: ${{ steps.dynamicsinglevm.outcome }}
echo Multiple Vm: ${{ steps.multiplevm.outcome }}
echo Kubernetes: ${{ steps.kubernetes.outcome }}
echo Vmq Qsfs: ${{ steps.vmqsfs.outcome }}
echo Kubernetes Qsfs: ${{ steps.kubernetesqsfs.outcome }}
echo Kvstore: ${{ steps.kvstore.outcome }}
echo Zdb: ${{ steps.zdb.outcome }}
echo Delete all contracts: ${{ steps.deleteall.outcome }}

- name: Check test script status
if: |
steps.dynamicsinglevm.outcome != 'success' ||
steps.multiplevm.outcome != 'success' ||
steps.kubernetes.outcome != 'success' ||
steps.vmqsfs.outcome != 'success' ||
steps.kubernetesqsfs.outcome != 'success' ||
steps.kvstore.outcome != 'success' ||
steps.zdb.outcome != 'success' ||
steps.deleteall.outcome != 'success'
run: exit 1
ISSUE_COUNT=$(gh issue list --search "${{github.workflow}} failed during schedule on ${{ env.NETWORK }}" --json title --jq '. | length')
zaelgohary marked this conversation as resolved.
Show resolved Hide resolved
echo "issue_count=$ISSUE_COUNT" >> $GITHUB_ENV

- name: Create GitHub Issue on Failure
if: failure() && '$(date +%u)' != '5' && '$(date +%u)' != '6'
if: failure() && env.issue_count == '0'
uses: dacbd/create-issue-action@main
with:
token: ${{ github.token }}
title: |
${{ github.workflow }} failed during ${{ github.event_name }} on network ${{ env.NETWORK }}
title: ${{github.workflow}} failed during schedule on ${{ env.NETWORK }}
zaelgohary marked this conversation as resolved.
Show resolved Hide resolved
body: |
## Failure Report:
## Failure Report

> [!IMPORTANT]
> Details on failed run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

- Author: @${{ github.triggering_actor }}
- Branch: `${{ github.ref }}`
- Commit: ${{ github.sha }}
- Network: `${{ env.NETWORK }}`

Dynamic Single Vm: ${{ steps.dynamicsinglevm.outcome }}
Multiple Vm: ${{ steps.multiplevm.outcome }}
Kubernetes: ${{ steps.kubernetes.outcome }}
Vmq Qsfs: ${{ steps.vmqsfs.outcome }}
Kubernetes Qsfs: ${{ steps.kubernetesqsfs.outcome }}
Kvstore: ${{ steps.kvstore.outcome }}
Zdb: ${{ steps.zdb.outcome }}
Delete all contracts: ${{ steps.deleteall.outcome }}
> **Details on failed run**: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

- **Dynamic Single Vm**: ${{ steps.single_vm.outcome }}
- **Multiple Vm**: ${{ steps.multiple_vm.outcome }}
- **Kubernetes**: ${{ steps.k8s.outcome }}
- **Vmq QSFS**: ${{ steps.vmqsfs.outcome }}
- **Kubernetes QSFS**: ${{ steps.k8sqsfs.outcome }}
- **Kvstore**: ${{ steps.kvstore.outcome }}
- **Zdb**: ${{ steps.zdb.outcome }}
- **Delete all contracts**: ${{ steps.delete_all.outcome }}
labels: type_bug, grid_client
Loading