From f70c629813b7a6ddf04f4675700008ba51de8ce0 Mon Sep 17 00:00:00 2001 From: skrdgraph Date: Fri, 16 Sep 2022 18:49:06 +0000 Subject: [PATCH 1/3] add cleanup at start --- .github/workflows/ci-dgraph-load-tests.yml | 6 +++--- .github/workflows/ci-dgraph-tests.yml | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-dgraph-load-tests.yml b/.github/workflows/ci-dgraph-load-tests.yml index 7e535558218..b23cc356857 100644 --- a/.github/workflows/ci-dgraph-load-tests.yml +++ b/.github/workflows/ci-dgraph-load-tests.yml @@ -12,6 +12,9 @@ jobs: dgraph-load-tests: runs-on: self-hosted steps: + #TODO: WE NEED TO REMOVE THIS CLEANUP, and handle it more elegantly, it makes us incompatible with gh-hosted-runners + - name: Cleaning Up $GITHUB_WORKSPACE + run: find /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/. -name . -o -prune -exec rm -rf -- {} + || true - uses: actions/checkout@v3 - name: Set up Go uses: actions/setup-go@v3 @@ -63,6 +66,3 @@ jobs: ./t --suite=load # clean up docker containers after test execution ./t -r - - name: Cleaning Up $GITHUB_WORKSPACE - # Volume auto mounted by gh actions pointing to the current working-directory - run: find /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/. -name . -o -prune -exec rm -rf -- {} + || true diff --git a/.github/workflows/ci-dgraph-tests.yml b/.github/workflows/ci-dgraph-tests.yml index 7d0502b7127..0e6b459728d 100644 --- a/.github/workflows/ci-dgraph-tests.yml +++ b/.github/workflows/ci-dgraph-tests.yml @@ -12,6 +12,9 @@ jobs: dgraph-tests: runs-on: self-hosted steps: + #TODO: WE NEED TO REMOVE THIS CLEANUP, and handle it more elegantly, it makes us incompatible with gh-hosted-runners + - name: Cleaning Up $GITHUB_WORKSPACE + run: find /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/. -name . -o -prune -exec rm -rf -- {} + || true - uses: actions/checkout@v3 - name: Set up Go uses: actions/setup-go@v3 From bb9c18d113c7d55c2604706a55a59a398bd349ec Mon Sep 17 00:00:00 2001 From: skrdgraph Date: Fri, 16 Sep 2022 18:52:21 +0000 Subject: [PATCH 2/3] bring in changes from https://github.com/dgraph-io/dgraph/pull/8301 --- .github/workflows/ci-dgraph-load-tests.yml | 11 ++++++++--- .github/workflows/ci-dgraph-tests.yml | 9 ++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-dgraph-load-tests.yml b/.github/workflows/ci-dgraph-load-tests.yml index b23cc356857..1bd4349f11e 100644 --- a/.github/workflows/ci-dgraph-load-tests.yml +++ b/.github/workflows/ci-dgraph-load-tests.yml @@ -9,12 +9,17 @@ on: schedule: - cron: "*/30 * * * *" jobs: - dgraph-load-tests: + #TODO: WE NEED TO REMOVE THIS CLEANUP, and handle it more elegantly, it makes us incompatible with gh-hosted-runners + cleanup: runs-on: self-hosted + container: + image: ubuntu:latest steps: - #TODO: WE NEED TO REMOVE THIS CLEANUP, and handle it more elegantly, it makes us incompatible with gh-hosted-runners - - name: Cleaning Up $GITHUB_WORKSPACE + - name: Cleaning up the $GITHUB_WORKSPACE as root from a Docker image run: find /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/. -name . -o -prune -exec rm -rf -- {} + || true + dgraph-load-tests: + runs-on: self-hosted + steps: - uses: actions/checkout@v3 - name: Set up Go uses: actions/setup-go@v3 diff --git a/.github/workflows/ci-dgraph-tests.yml b/.github/workflows/ci-dgraph-tests.yml index 0e6b459728d..8bcd107a6e7 100644 --- a/.github/workflows/ci-dgraph-tests.yml +++ b/.github/workflows/ci-dgraph-tests.yml @@ -9,10 +9,17 @@ on: schedule: - cron: "*/30 * * * *" jobs: + #TODO: WE NEED TO REMOVE THIS CLEANUP, and handle it more elegantly, it makes us incompatible with gh-hosted-runners + cleanup: + runs-on: self-hosted + container: + image: ubuntu:latest + steps: + - name: Cleaning up the $GITHUB_WORKSPACE as root from a Docker image + run: find /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/. -name . -o -prune -exec rm -rf -- {} + || true dgraph-tests: runs-on: self-hosted steps: - #TODO: WE NEED TO REMOVE THIS CLEANUP, and handle it more elegantly, it makes us incompatible with gh-hosted-runners - name: Cleaning Up $GITHUB_WORKSPACE run: find /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/. -name . -o -prune -exec rm -rf -- {} + || true - uses: actions/checkout@v3 From ae3b2b0e7f101b4ead494b87cf4a2dc2194c8152 Mon Sep 17 00:00:00 2001 From: skrdgraph Date: Fri, 16 Sep 2022 18:53:21 +0000 Subject: [PATCH 3/3] cleanup --- .github/workflows/ci-dgraph-tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-dgraph-tests.yml b/.github/workflows/ci-dgraph-tests.yml index 8bcd107a6e7..f6827090ace 100644 --- a/.github/workflows/ci-dgraph-tests.yml +++ b/.github/workflows/ci-dgraph-tests.yml @@ -20,8 +20,6 @@ jobs: dgraph-tests: runs-on: self-hosted steps: - - name: Cleaning Up $GITHUB_WORKSPACE - run: find /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/. -name . -o -prune -exec rm -rf -- {} + || true - uses: actions/checkout@v3 - name: Set up Go uses: actions/setup-go@v3