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

Set _env_status earlier when updating settings #499

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

david-yz-liu
Copy link
Contributor

After receiving a request to create/update test settings, the autotester uses the _env_status key as a lock to prevent tests from being run while the environment is still being set up. (See #468)

However, because _env_status was being set in the server method as part of a job run, there is time between when the create/update settings request is received and the job is executed where new tests could still be run.

In the case of creating a new set of test settings, this could result in a KeyError: _files in the run_tests server method.

I've changed this so the client is responsible for setting _env_status, which should prevent test runs from being executed after the initial settings request is processed, regardless of when the job that sets up the test environment is created.

@donny-wong donny-wong added this to the v2.4.1 milestone Mar 26, 2024
@donny-wong donny-wong merged commit 77ecd57 into MarkUsProject:master Apr 2, 2024
13 checks passed
@pretendWhale pretendWhale modified the milestones: v2.4.1, v2.4.2 Apr 3, 2024
pretendWhale pushed a commit to pretendWhale/markus-autotesting that referenced this pull request Apr 3, 2024
* Set _env_status earlier when updating settings

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@david-yz-liu david-yz-liu deleted the fix-env-status-setup branch August 9, 2024 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants