Skip to content

random effect of box 'disable all submissions' #3142

Open

Description

@acletournel

This issue comes after the PR #3135 has been merged on develop and set on pre-prod and prod servers:
After applying migrations and launching new dockers, the box can is seen by a platform admin and can be ticked.
But the behavior is not stable: on pre-prod server as well as on py3 production server, submissions are sometimes blocked, sometimes not.
Nothing obvious can explain the difference.

Activity

  1. Didayolo commented on Apr 7, 2022

    @Didayolo
    Member

    Some news from Tyler:

    There's a bug I did not catch when I tested this, but the behavior is not consistent. It seems to always work on the first try, but subsequent tries do not.

    The value (settings.DISABLE_ALL_SUBMISSIONS) is set per worker in-memory instead of being retrieved from the DB or set via a config file. The reference to what is being checked can probably be changed to fix the issue as it is also tied into the DB by a model. Tristan was mainly following the pattern Eric had done for this, but in this case it seems there may be an unintended bug.

    >>> Configuration.objects.first().disable_all_submissions
    True
    >>> settings.DISABLE_ALL_SUBMISSIONS
    Traceback (most recent call last):
    File "<console>", line 1, in <module>
    File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 57, in __getattr__
    val = getattr(self._wrapped, name)
    AttributeError: 'Settings' object has no attribute 'DISABLE_ALL_SUBMISSIONS'
    >>> settings.DISABLE_SUBMISSIONS
    False
  2. Didayolo commented on Apr 7, 2022

    @Didayolo
    Member

    Even if the box is unchecked, an user reported a submission blocked: #3146

  3. added
    P1
    on Apr 7, 2022
  4. removed
    P1
    on Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions