Skip to content

Commit e6fa09b

Browse files
committed
wip: update project setup
1 parent e47e30e commit e6fa09b

15 files changed

Lines changed: 1346 additions & 399 deletions

CHANGELOG.md

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# ChangeLog
2+
3+
<!--
4+
All enhancements and changes will be documented in this file. It adheres to
5+
the structure of http://keepachangelog.com/ ,
6+
7+
This project adheres to Semantic Versioning (http://semver.org/).
8+
-->
9+
10+
## Unreleased
11+
12+
See the fragment files in the [changelog.d/ directory](./changelog.d).
13+
14+
<!-- scriv-insert-here -->
15+
16+
<a id='changelog-21.0.0'></a>
17+
## 21.0.0 - 2025-11-04
18+
19+
- feat!: add support for the Ulmo release
20+
21+
This changes also include support for openedx/codejail-service as an
22+
alternative implementation of the safe_exec REST API.
23+
24+
## 20.1.0 - 2025-11-25
25+
26+
- feat!: remove autoscaling configuration and apply miscellaneous fixes (#73)
27+
28+
The autoscaling configuration has long been unmaintained and should be
29+
instead handled by https://github.com/eduNEXT/tutor-contrib-pod-autoscaling.
30+
31+
The variable used to install extra packages in the sandbox virtual
32+
environment was not properly configured as a default variable.
33+
34+
The apparmor-loader deamon set was not using the same image as the
35+
docker deployment, and the generated config-maps where missing
36+
appropriate labels.
37+
38+
- feat: use an "init service" to load the apparmor profile (#63)
39+
40+
This follows the same logic as the "permissions" service used by tutor
41+
core. The `codejail-apparmor-loader` service runs the command used
42+
previously by the init job.
43+
44+
It makes more sense to handling loading of the apparmor profile with an
45+
init service:
46+
47+
- The profile is ephemeral, rebooting the host will require to load it
48+
again.
49+
- The profile is a dependency for the container to start. Things like
50+
database migrations, which are the main use case for init jobs, don't
51+
block the start of the main service container.
52+
53+
## 20.0.0 - 2025-06-27
54+
55+
- feat: teak support
56+
57+
## 19.1.1 - 2025-04-07
58+
59+
- fix: set FLASK_APP_SETTINGS env for k8s-deployment (#65)
60+
61+
## 19.1.0 - 2025-02-21
62+
63+
- feat: update to sumac.2
64+
65+
## 19.0.0 - 2024-12-17
66+
67+
- feat: sumac upgrade
68+
69+
Adjust the globing and abi rules in the apparmor profile:
70+
71+
Newer versions of ubuntu (>24.04) do not pin the AppArmor Policy feature
72+
ABI which causes certain rules to not be enforced. We include an abi
73+
rule to use the relatively common 3.0 policy whenever it's available in
74+
the system, if it's not available we rely on the default fallback
75+
behaviour. The 3.0 policy should be present on any system using
76+
AppArmor>3.x (e.g. Ubuntu 22.04 or newer).
77+
78+
The globbing rules in the profile were adjusted to cover a larger range
79+
of python versions and avoid creating new profiles for different
80+
versions of python used by the sandbox environment.
81+
82+
To load the profile we need at least AppArmor 3.0, to avoid confusion in
83+
the future we pin the alpine base image and define a proper tag for the
84+
apparmorloader image.
85+
86+
87+
## 18.0.0 - 2024-06-26
88+
89+
- feat: redwood support
90+
91+
Add two new variables to enable the use of custom versions/forks of
92+
[edunext/codejailservice]{.title-ref}.
93+
94+
BREAKING CHANGE: the default Python version of the sandbox environment
95+
has been bumped to 3.11. This change alongside the upgrade of the
96+
SciPy and NumPy dependencies may cause some instructor code to fail.
97+
98+
## 17.0.2 - 2024-05-24
99+
100+
- fix: use tutor config on codejail service and add patches to edit it
101+
DS-894 (#55)
102+
103+
## 17.0.1 - 2023-11-20
104+
105+
- fix: remove deprecated is_buildkit_enabled which now always evaluates
106+
to 'true' (#47)
107+
108+
## 17.0.0 - 2023-11-20
109+
110+
### Added
111+
112+
- Allows you to add extra pip requirements to your codejail sandbox
113+
(#42)
114+
- Add support form quince release (#43)
115+
116+
## 16.0.0 - 2023-08-18
117+
118+
### Added
119+
120+
- Add support for palm release (#39)
121+
122+
## 15.2.0 - 2023-07-14
123+
124+
### Added
125+
126+
- Add hpa and resources limits (#37)
127+
128+
## 15.1.0 - 2023-05-25
129+
130+
### Added
131+
132+
- Update readme following latest changes (#34)
133+
- Allow to use tmp in python executions.
134+
135+
## 15.0.0 - 2023-01-12
136+
137+
### Added
138+
139+
- Add support for Olive release (#28).
140+
- Adds mantainer group.
141+
142+
## 14.1.0 - 2022-09-26
143+
144+
### Added
145+
146+
- Include k8s templates.
147+
- Add a setting to run the service without codejail.
148+
- Add a setting to skip the initialization job.
149+
- Add a section in the readme with the available configuration values
150+
and their defaults.
151+
152+
## 14.0.0 - 2022-05-30
153+
154+
### Added
155+
156+
- Bump version according tutor practices for Nutmeg release.
157+
158+
## 13.0.0 - 2022-05-02
159+
160+
### Added
161+
162+
- Add repo documentation.
163+
- Bump version according tutor practices for Maple release.
164+
165+
## 12.0.2 - 2022-04-29
166+
167+
### Added
168+
169+
- First git tagged release
170+
- Add quality tests to maintain the repo
171+
- Add requirements files.
172+
- Add Add required maintenance files.

CHANGELOG.rst

Lines changed: 0 additions & 118 deletions
This file was deleted.

MANIFEST.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

Makefile

Lines changed: 18 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,25 @@
1-
.PHONY: quality help requirements\
2-
piptools selfcheck upgrade test clean
1+
.PHONY: quality help
32

43
.DEFAULT_GOAL := help
54

6-
piptools: ## install pinned version of pip-compile and pip-sync
7-
pip install -r requirements/pip-tools.txt
5+
quality: ## Run linters
6+
uv run ruff check
7+
uv run ruff format --diff
8+
uv run ty check
89

9-
help: ## display this help message
10-
@echo "Please use \`make <target>' where <target> is one of"
11-
@awk -F ':.*?## ' '/^[a-zA-Z]/ && NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
10+
quality-fix: ## Run automatic linter fixes
11+
uv run ruff format
12+
uv run ruff check --fix
13+
uv run ty check --fix
1214

13-
# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
14-
PIP_COMPILE = pip-compile --upgrade $(PIP_COMPILE_OPTS)
15+
changelog-entry: ## Run scriv to create a changelog entry
16+
uv run scriv create
1517

16-
clean: ## remove generated byte code, coverage reports, and build artifacts
17-
find tutorcodejail -name '__pycache__' -exec rm -rf {} +
18-
find tutorcodejail -name '*.pyc' -exec rm -f {} +
19-
find tutorcodejail -name '*.pyo' -exec rm -f {} +
20-
find tutorcodejail -name '*~' -exec rm -f {} +
21-
coverage erase
22-
rm -fr build/
23-
rm -fr dist/
24-
rm -fr *.egg-info
18+
changelog-collect: ## Collect all the changelog entries and rebuild CHANGELOG.md
19+
uv run scriv collect
2520

26-
27-
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
28-
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
29-
make piptools
30-
# Make sure to compile files after any other files they include!
31-
$(PIP_COMPILE) --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
32-
$(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in
33-
make piptools
34-
$(PIP_COMPILE) -o requirements/base.txt requirements/base.in
35-
$(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in
36-
37-
quality: ## check coding style with pycodestyle and pylint
38-
pylint tutorcodejail *.py
39-
isort --check-only --diff --recursive tutorcodejail *.py
40-
python setup.py bdist_wheel
41-
twine check dist/*
42-
make selfcheck
43-
44-
requirements: ## install development environment requirements
45-
pip install -r requirements/pip.txt
46-
pip install -r requirements/pip-tools.txt
47-
pip-sync requirements/dev.txt
48-
pip install -e .
49-
50-
test: ## run unitary tests and meassure coverage
51-
coverage run -m pytest
52-
coverage report -m --fail-under=62
53-
@echo "Testing module buiding..."
54-
55-
selfcheck: ## check that the Makefile is well-formed
56-
@echo "The Makefile is well-formed."
21+
ESCAPE = 
22+
help: ## Print this help
23+
@grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \
24+
| sed 's/######* \(.*\)/@ $(ESCAPE)[1;31m\1$(ESCAPE)[0m/g' | tr '@' '\n' \
25+
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'

0 commit comments

Comments
 (0)