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

Advanced submission evaluation (docker) #149

Merged
merged 88 commits into from
May 23, 2024
Merged
Changes from 4 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
cfb17b3
add simple submission volume mount test script
axellorreyne May 5, 2024
c725904
add evaluation functionality to submission model
axellorreyne May 5, 2024
5e9d10c
add makefile shortcut for submission volume test
axellorreyne May 5, 2024
30beaa8
fix submission id pass to container
axellorreyne May 5, 2024
511b304
add migrations
axellorreyne May 5, 2024
9dd5d2c
fix lint
axellorreyne May 5, 2024
6b9b4c4
remove evaluation container on completion
axellorreyne May 5, 2024
bde5301
print docker api error
axellorreyne May 5, 2024
97795c5
remove container upon fail
axellorreyne May 5, 2024
b4cdbe6
production submission path env variable
robinpdev May 6, 2024
be26062
add submission bind to development (DONT FORGET ENV VAR)
robinpdev May 6, 2024
49a9bee
use submission id path volume
axellorreyne May 13, 2024
a8c2412
use custom dockerfile as evaluation image
axellorreyne May 13, 2024
bec848e
write eval output to variable + fix eval status
axellorreyne May 13, 2024
c0cfec4
fix migrations and makefile
robinpdev May 19, 2024
f807bb2
Merge branch 'develop' into 148-advanced-tests
robinpdev May 19, 2024
ab953f4
fix error messages on submit page
robinpdev May 19, 2024
e35446c
use test_files as entrypoint field
axellorreyne May 19, 2024
701be17
Merge remote-tracking branch 'origin/148-advanced-tests' into 148-adv…
axellorreyne May 19, 2024
1d756b5
fix remove test_files for refactor
axellorreyne May 19, 2024
6231db0
add migrations
axellorreyne May 19, 2024
dcf8d05
uploading dockerfile in ui
robinpdev May 19, 2024
cc42b7e
Merge branch '148-advanced-tests' of github.com:SELab-2/UGent-1 into …
robinpdev May 19, 2024
3781698
registry experiment
robinpdev May 20, 2024
fdf753f
test for traefik config
robinpdev May 20, 2024
06e55d8
correction to port?
robinpdev May 20, 2024
90c9b76
fix duplicate port?
robinpdev May 20, 2024
f83d1cb
host wrong?
robinpdev May 20, 2024
6294472
add address and change position
robinpdev May 20, 2024
2295026
wrong port lmao
robinpdev May 20, 2024
1ad49bf
hosting behind slash prefix
robinpdev May 20, 2024
3b8c5ac
container name
robinpdev May 20, 2024
e3ba7dd
try 2002 last time
robinpdev May 20, 2024
a28e301
comon
robinpdev May 20, 2024
c532b24
is it joever?
robinpdev May 20, 2024
7c3a5cd
huh?
robinpdev May 20, 2024
c3168a0
address fix
robinpdev May 20, 2024
a72cd63
i forgor
robinpdev May 20, 2024
097d708
example advanced test
robinpdev May 20, 2024
02aacef
add docker cli to backend
robinpdev May 20, 2024
6e7089e
registry login in backend entrypoint
robinpdev May 20, 2024
189b548
UI and database changes for registry model
robinpdev May 20, 2024
37e961a
Merge branch 'develop' into 148-advanced-tests
PJDeSmijter May 21, 2024
55f4666
fix lint
axellorreyne May 22, 2024
d0fb8f8
fix lint
axellorreyne May 22, 2024
de2e3b2
fix mount path
axellorreyne May 22, 2024
02a3fd2
Merge branch 'develop' into 148-advanced-tests
robinpdev May 22, 2024
24c8eec
clean up project edit old stuff
robinpdev May 22, 2024
9251271
add switch for forwarded host to env to get debug messages on production
robinpdev May 22, 2024
91375d3
fix bug in docker-py by changing affected requests package
robinpdev May 22, 2024
9e2334b
fix eval method in model
robinpdev May 22, 2024
60d6149
change example to reflect volumes on backend
robinpdev May 22, 2024
4f0faaa
fix distinction between hostside and dockerside paths
robinpdev May 22, 2024
45681d1
lint
axellorreyne May 22, 2024
797aff9
fix production submissions volume bind
robinpdev May 22, 2024
01c727e
typo smh
robinpdev May 22, 2024
1dab329
fix production docker cli install
robinpdev May 22, 2024
298cf03
remove container again
robinpdev May 22, 2024
af8dd23
Merge branch 'develop' into 148-advanced-tests
robinpdev May 22, 2024
246a2fc
Merge branch 'refs/heads/develop' into 148-advanced-tests
axellorreyne May 22, 2024
c2830e0
Merge branch '148-advanced-tests' of github.com:SELab-2/UGent-1 into …
robinpdev May 22, 2024
28d80c9
fix admin panel and saving for evaluation
robinpdev May 22, 2024
4856879
Merge branch 'develop' into 148-advanced-tests
robinpdev May 22, 2024
228b980
lint fix
robinpdev May 22, 2024
1ee2647
Merge branch 'develop' into 148-advanced-tests
robinpdev May 22, 2024
155a065
add local registry for development
robinpdev May 22, 2024
84e631d
add push registry command to makefile
axellorreyne May 22, 2024
9d18c8b
Fix admin submission tests for advanced evaluation
axellorreyne May 22, 2024
985df71
add registry entry for image that always succeeds
axellorreyne May 22, 2024
9a19dd2
fix always succeed image
axellorreyne May 22, 2024
e98c318
fix + clean teacher, amdin and unauth tests
axellorreyne May 22, 2024
791c345
fix + clean student submission view tests
axellorreyne May 22, 2024
0705be6
add fibonacci evaluation example + solution
axellorreyne May 23, 2024
6ff69f0
add submit test script
axellorreyne May 23, 2024
b27c366
fix evaluation result saving on succeed and fail
axellorreyne May 23, 2024
1e04b9c
Merge branch 'refs/heads/develop' into 148-advanced-tests
axellorreyne May 23, 2024
6570721
add artifacts + update example
axellorreyne May 23, 2024
50180c8
add artifacts download view
axellorreyne May 23, 2024
5293c04
fix submission test view
axellorreyne May 23, 2024
d13851d
add production registry push command in makefile
robinpdev May 23, 2024
d4d7653
try to fix production testing env vars
robinpdev May 23, 2024
7ee0059
Merge branch 'develop' into 148-advanced-tests
robinpdev May 23, 2024
8681700
merge migrations
robinpdev May 23, 2024
0d958db
default values for env vars to get github actions working
robinpdev May 23, 2024
643cc88
fix some stuff in submission detail but still broken
robinpdev May 23, 2024
182bfa7
fix advanced testing logic and submission details GUI
robinpdev May 23, 2024
f1b3a9d
more info on failed tests and listview result fix
robinpdev May 23, 2024
51fb8e0
gyatt damn lint fix
robinpdev May 23, 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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ mockdata:
docker exec -it pigeonhole-backend python manage.py runscript mockdata

evaltest:
docker exec -it pigeonhole-backend python manage.py runscript eval_test
docker exec -it pigeonhole-backend python manage.py runscript eval_test

reset:
docker image prune -af
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.2.13 on 2024-05-19 11:35

import backend.pigeonhole.apps.projects.models
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('projects', '0001_initial'),
]

operations = [
migrations.AddField(
model_name='project',
name='test_dockerfile',
field=models.FileField(blank=True, null=True, upload_to=backend.pigeonhole.apps.projects.models.get_upload_to),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.13 on 2024-05-19 11:35

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('submissions', '0005_submissions_eval_result'),
]

operations = [
migrations.AddField(
model_name='submissions',
name='eval_output',
field=models.TextField(null=True),
),
]
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ services:
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./backend/:/usr/src/app/backend/
- submissions:/usr/src/app/backend/uploads/submissions/
#- submissions:/usr/src/app/backend/uploads/submissions/
- /var/run/docker.sock:/var/run/docker.sock
- ${SUBMISSIONS_PATH}:/home/app/web/submissions
ports:
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pull official base image
FROM cypress/base:20.11.0 AS deps
FROM cypress/base:latest AS deps

# set work directory
WORKDIR /usr/src/app
6 changes: 3 additions & 3 deletions frontend/app/[locale]/components/SubmitDetailsPage.tsx
Original file line number Diff line number Diff line change
@@ -169,7 +169,7 @@ const SubmitDetailsPage: React.FC<SubmitDetailsPageProps> = ({

<Tree paths={paths} />

{submitted === 'ok' && (
{submitted['result'] === 'ok' && (
<Box sx={{ display: 'flex', alignItems: 'center', color: baseTheme.palette.success.main, mb: 1 }}>
<CheckCircleIcon sx={{ mr: 1 }} />

@@ -178,15 +178,15 @@ const SubmitDetailsPage: React.FC<SubmitDetailsPageProps> = ({
</Typography>
</Box>
)}
{submitted === 'error' && (
{submitted['result'] === 'error' && (
<Box sx={{ display: 'flex', alignItems: 'center', color: baseTheme.palette.error.main, mb: 1 }}>
<ErrorIcon sx={{ mr: 1 }} />
<Typography variant="h6" sx={{ fontWeight: 'bold', fontSize: '0.875rem' }}>
{t('submission_error')}: {t(submitted['errorcode'])}
</Typography>
</Box>
)}
{submitted !== 'ok' && (
{submitted['result'] !== 'ok' && (
<Button variant="contained" color="primary" startIcon={<PublishIcon />} type="submit">
{t('submit')}
</Button>