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

EKS OOM Killer and other small changes #323

Merged
merged 11 commits into from
Feb 1, 2025
8 changes: 1 addition & 7 deletions portal/portal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
__version__ = "0.1.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
],
)

3 changes: 2 additions & 1 deletion portal/portal/academy/views.py
Original file line number Diff line number Diff line change
@@ -140,7 +140,8 @@ class StudentUnitDetailView(StudentViewsMixin, BaseUnitDetailView):

class InstructorUserListView(InstructorViewsMixin, ListView):
model = get_user_model()
queryset = get_user_model().objects.filter(is_student=True, failed_or_dropped=False)
queryset = model.objects.filter(is_student=True, failed_or_dropped=False)

template_name = "academy/instructor/user_list.html"

def get_queryset(self):
3 changes: 2 additions & 1 deletion portal/portal/grading/services.py
Original file line number Diff line number Diff line change
@@ -79,7 +79,8 @@ def get_command(self, image, name, env):
"run",
name,
"--restart=Never",
# "--requests='cpu=100m,memory=512Mi'",
"--requests='cpu=250m,memory=512Mi'",
"--limits='cpu=1,memory=1Gi'",
"--rm",
"-i", # "--tty",
f"--image={image}",
4 changes: 1 addition & 3 deletions portal/portal/templates/academy/instructor/user_list.html
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@ <h1><a href="{% url 'academy:instructor-user-list' %}" class="text-dark" title="
<thead>
<tr>
<th scope="col" rowspan="2">Name</th>
<th scope="col" rowspan="2">Slack</th>
<th scope="col" rowspan="2">Submission Date</th>
<th scope="col" rowspan="2">Total</th>
<th scope="col" rowspan="2">Eligible for graduation</th>
@@ -37,8 +36,7 @@ <h1><a href="{% url 'academy:instructor-user-list' %}" class="text-dark" title="
<tbody>
{% for obj in object_list %}
<tr>
<th><a href="{% add_query_param 'user_id' obj.user.id %}" class="text-dark" title="Filter by student">{{ obj.user.username }}</a></th>
<td><a href="{{ workspace_url }}{{ obj.user.slack_member_id }}" target="_blank" class="text-dark">{{ obj.user.slack_member_id }}</a></td>
<th><a href="{% add_query_param 'user_id' obj.user.id %}" class="text-dark" title="Filter by student">{{ obj.user.first_name }} {{ obj.user.last_name }}</a></th>
<td><a href="{% add_query_param 'submission_date' obj.submission_date %}" class="text-dark"> {{ obj.submission_date }} </a></td>
<td><a href="{% add_query_param 'score__gte' obj.total_score %}" class="text-dark">{{ obj.total_score }}&#47;{{ max_score }}</a></td>
<th><a href="{% add_query_param 'can_graduate' obj.user.can_graduate %}" class="text-dark" title="Filter by graduation status">{% if obj.user.can_graduate %}Yes{% else %}No{% endif %}</a></th>