Skip to content

Commit 48d0dd2

Browse files
author
Obada Haddad
committed
further fixes in workflow
1 parent e36b316 commit 48d0dd2

File tree

4 files changed

+28
-46
lines changed

4 files changed

+28
-46
lines changed

.github/workflows/build_cw_image-branch.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,18 @@ on:
1010
- Dockerfile.compute_worker
1111
- compute_worker/**
1212
jobs:
13-
build:
14-
name: Build Docker Images
13+
build_push_image:
14+
name: Build Docker Image then Push it to Docker.io
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Check out repository code
1818
uses: actions/checkout@v5
1919
- name: Build Image
2020
run: docker build -t codalab/competitions-v2-compute-worker:${{ github.ref_name }} -f Dockerfile.compute_worker .
21-
22-
push:
23-
name: Push image to Dockerhub
24-
runs-on: ubuntu-latest
25-
needs: [build]
26-
steps:
27-
- name: Login to Docker Hub
28-
uses: docker/login-action@v3
29-
with:
30-
username: ${{ vars.DOCKERHUB_USERNAME }}
31-
password: ${{ secrets.DOCKERHUB_TOKEN }}
32-
- name: Push image with branch name as tag
33-
run: docker push codalab/competitions-v2-compute-worker:${{ github.ref_name }}
21+
- name: Login to Docker Hub
22+
uses: docker/login-action@v3
23+
with:
24+
username: ${{ vars.DOCKERHUB_USERNAME }}
25+
password: ${{ secrets.DOCKERHUB_TOKEN }}
26+
- name: Push image with branch name as tag
27+
run: docker push codalab/competitions-v2-compute-worker:${{ github.ref_name }}

.github/workflows/build_cw_image-dev.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,10 @@ jobs:
1515
uses: actions/checkout@v5
1616
- name: Build Image
1717
run: docker build -t codalab/competitions-v2-compute-worker:test -f Dockerfile.compute_worker .
18-
19-
push:
20-
name: Push image to Dockerhub
21-
runs-on: ubuntu-latest
22-
needs: [build]
23-
steps:
24-
- name: Login to Docker Hub
25-
uses: docker/login-action@v3
26-
with:
27-
username: ${{ vars.DOCKERHUB_USERNAME }}
28-
password: ${{ secrets.DOCKERHUB_TOKEN }}
29-
- name: Push image with test tag
30-
run: docker push codalab/competitions-v2-compute-worker:test
18+
- name: Login to Docker Hub
19+
uses: docker/login-action@v3
20+
with:
21+
username: ${{ vars.DOCKERHUB_USERNAME }}
22+
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
- name: Push image with test tag
24+
run: docker push codalab/competitions-v2-compute-worker:test

.github/workflows/build_cw_image-prod.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,14 @@ jobs:
1515
uses: actions/checkout@v5
1616
- name: Build Image
1717
run: docker build -t codalab/competitions-v2-compute-worker:${{ github.ref_name }} -f Dockerfile.compute_worker .
18-
19-
push:
20-
name: Push image to Dockerhub
21-
runs-on: ubuntu-latest
22-
needs: [build]
23-
steps:
24-
- name: Login to Docker Hub
25-
uses: docker/login-action@v3
26-
with:
27-
username: ${{ vars.DOCKERHUB_USERNAME }}
28-
password: ${{ secrets.DOCKERHUB_TOKEN }}
29-
- name: Push image with prod release tag
30-
run: docker push codalab/competitions-v2-compute-worker:${{ github.ref_name }}
31-
- name: Change tag to latest
32-
run: |
33-
docker tag codalab/competitions-v2-compute-worker:${{ github.ref_name }} codalab/competitions-v2-compute-worker:latest
34-
docker push codalab/competitions-v2-compute-worker:latest
35-
18+
- name: Login to Docker Hub
19+
uses: docker/login-action@v3
20+
with:
21+
username: ${{ vars.DOCKERHUB_USERNAME }}
22+
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
- name: Push image with prod release tag
24+
run: docker push codalab/competitions-v2-compute-worker:${{ github.ref_name }}
25+
- name: Change tag to latest
26+
run: |
27+
docker tag codalab/competitions-v2-compute-worker:${{ github.ref_name }} codalab/competitions-v2-compute-worker:latest
28+
docker push codalab/competitions-v2-compute-worker:latest

compute_worker/compute_worker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ async def send_detailed_results(self, file_path):
436436
)
437437
websocket_url = f"{self.websocket_url}?kind=detailed_results"
438438
logger.info(f"Connecting to {websocket_url} for detailed results")
439+
# Wrap this with a Try ... Except otherwise a failure here will make the submission get stuck on Running
439440
try:
440441
websocket = await asyncio.wait_for(
441442
websockets.connect(websocket_url), timeout=5.0

0 commit comments

Comments
 (0)