From bbc999d5ecd838a4d07e029358e3e5cc02c1a644 Mon Sep 17 00:00:00 2001 From: Samuel Maldonado Date: Thu, 25 Jan 2024 16:00:30 -0500 Subject: [PATCH 1/3] unset sticky bit when clearing working directory (#483) --- Changelog.md | 3 +++ server/autotest_server/__init__.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index d2ea60ac..8afd82a2 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,9 @@ # CHANGELOG All notable changes to this project will be documented here. +## [unreleased] +- Fix bug that prevented copies of instructor directories from being deleted (#483) + ## [v2.4.0] - Fix bug that prevented test results from being returned when a feedback file could not be found (#458) - Add support for Python 3.11 and 3.12 (#467) diff --git a/server/autotest_server/__init__.py b/server/autotest_server/__init__.py index c3706fa5..6f2ee12d 100644 --- a/server/autotest_server/__init__.py +++ b/server/autotest_server/__init__.py @@ -254,9 +254,9 @@ def _clear_working_directory(tests_path: str, test_username: str) -> None: Run commands that clear the tests_path working directory """ if test_username != getpass.getuser(): - chmod_cmd = f"sudo -u {test_username} -- bash -c 'chmod -Rf ugo+rwX {tests_path}'" + chmod_cmd = f"sudo -u {test_username} -- bash -c 'chmod -Rf -t ugo+rwX {tests_path}'" else: - chmod_cmd = f"chmod -Rf ugo+rwX {tests_path}" + chmod_cmd = f"chmod -Rf -t ugo+rwX {tests_path}" subprocess.run(chmod_cmd, shell=True) From ce3c724648ab3ef68ea6f16cd119af3807d15a9d Mon Sep 17 00:00:00 2001 From: Samuel Maldonado Date: Tue, 6 Feb 2024 21:12:17 -0500 Subject: [PATCH 2/3] haskell tester: document STACK_ROOT and add to docker dev environment (#484) --- Changelog.md | 1 + README.md | 5 +++++ docker-compose.yml | 1 + 3 files changed, 7 insertions(+) diff --git a/Changelog.md b/Changelog.md index 8afd82a2..7dd8874e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented here. ## [unreleased] - Fix bug that prevented copies of instructor directories from being deleted (#483) +- Add STACK_ROOT to containers as well as notes in readme (#484) ## [v2.4.0] - Fix bug that prevented test results from being returned when a feedback file could not be found (#458) diff --git a/README.md b/README.md index 2486b0a7..f159fe9d 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,7 @@ Installing each tester will also install the following additional packages (syst - `haskell` - ghc - cabal-install + - haskell-stack - tasty-stats (cabal package) - tasty-discover (cabal package) - tasty-quickcheck (cabal package) @@ -259,6 +260,10 @@ ERROR_LOG= # file to write error log informatoin to (default is stderr) SETTINGS_JOB_TIMEOUT= # the maximum runtime (in seconds) of a job that updates settings before it is interrupted (default is 60) ``` +## Stack configuration +The Haskell autotester uses [stack](https://docs.haskellstack.org/en/stable/) to install and manage Haskell packages. By default, stack will install to `${HOME}/.stack`, where `${HOME}` is the home directory of the user running the autotester. +The installation location can be configured by setting a `$STACK_ROOT`, such as the root of the workspace directory. + ## MarkUs configuration options After installing the autotester and the API, the next step is to [register the MarkUs instance with the autotester](https://github.com/MarkUsProject/Markus/wiki/Installation#autotester-installation-steps). diff --git a/docker-compose.yml b/docker-compose.yml index 49ffa6b2..fbc3fc49 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,7 @@ services: - WORKSPACE=/home/docker/.autotesting - SUPERVISOR_URL=127.0.0.1:9001 - AUTOTESTER_CONFIG=/app/.dockerfiles/docker-config.yml + - STACK_ROOT=/home/docker/.autotesting/.stack depends_on: - postgres - redis From 43a49f6d2e93d421277c525caebcfcee1d1694e9 Mon Sep 17 00:00:00 2001 From: Donny Wong Date: Wed, 7 Feb 2024 10:53:56 -0500 Subject: [PATCH 3/3] v2.4.1 --- Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 7dd8874e..7b1efc4c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,7 +1,7 @@ # CHANGELOG All notable changes to this project will be documented here. -## [unreleased] +## [v2.4.1] - Fix bug that prevented copies of instructor directories from being deleted (#483) - Add STACK_ROOT to containers as well as notes in readme (#484)