Skip to content
Permalink
master
Switch branches/tags

Commits on Dec 20, 2021

  1. Use distutils from Python standard library

    setuptools 60.0 switched from standard library distutils to its own
    local distutils by default [1]. setuptools' own distutils version
    doesn't support building with 2to3 translation anymore [2].
    
    However, the current pycryptodomex version (3.6) relies on distutils
    2to3 translation support for correct Python 3 builds. Building with the
    setuptools distutils version results in run-time errors such as
    
      . . .
        File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/cms-1.5.dev0-py3.8.egg/cmscommon/crypto.py", line 31, in <module>
          from Cryptodome.Cipher import AES
        File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/Cryptodome/Cipher/__init__.py", line 31, in <module>
          from Cryptodome.Cipher._mode_ctr import _create_ctr_cipher
        File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/Cryptodome/Cipher/_mode_ctr.py", line 37, in <module>
          from Cryptodome.Util.number import long_to_bytes
        File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/Cryptodome/Util/number.py", line 399
          s = pack('>I', n & 0xffffffffL) + s
                                       ^
      SyntaxError: invalid syntax
    
    We set the SETUPTOOLS_USE_DISTUTILS environment variable to continue
    using the system distutils version with 2to3 translation support for
    now. The variable can be removed later when we update to a newer
    pycryptodomex version.
    
    In the documentation, we also pass the environment variable to the
    "setup.py install" command for consistency.
    
    [1] pypa/setuptools@f7a55da
    [2] pypa/setuptools@d989cdb
    andreyv committed Dec 20, 2021
  2. Update cms.pot

    andreyv committed Dec 20, 2021
  3. Join contest with current account (#1191)

    * Update user interface to support joining to contests
    
    There are 2 tabs, one for creating new user and one for register
    with an existing account. Note that the register page sould be
    scrollable because of the long form inside it. So it can not use
    login_box class.
    
    * Implement logic of join contest without user creation
    
    * Add contributor's name and copyright
    
    * Check participations only when joining a contest
    
    * Disable and hide register fields when joining to contest
    
    The previous method had 2 different forms but the new method has a single
    form and just disables extra fields if they're unused
    
    * Clear field errors after each tab switch
    
    * Small updates
    
    Co-authored-by: Andrey Vihrov <andrey.vihrov@gmail.com>
    MaGaroo and andreyv committed Dec 20, 2021

Commits on Dec 17, 2021

  1. Ignore wrong contest submissions in ProxyService (#1142)

    * Ignore wrong contest submissions in ProxyService
    
    When you are running cms with more than a contest (ie multicontest)
    ProxyService can be notified by ScoringService of new submissions of any
    contest, ignoring the `-c X` flag of PS. This will lead to `Inconsistent Data`
    errors in RWS due to submissions of the wrong contest (bad user, bad
    task, ...). This is especially bad because the wrong submission can be sent
    with other valid submissions, and RWS drop them all.
    
    The proposed fix just ignores those submissions from ProxyService since
    ScoringService has no way to know which contest PS is bound to.
    
    * Move the contest_id checks in submission_scored/tokened
    
    * Move PS contest checks before submission validation
    
    Filter out the submissions from the wrong contest before rejecting them
    if they are hidden/unofficial. Add also some debug logging when it
    happens.
    
    This also adds the check in dataset_updated() since AWS may trigger the
    same kind of wrong RWS notifications.
    
    * Fix line lengths and message format
    edomora97 committed Dec 17, 2021
  2. Fix support for services connected via IPv6 (#1141)

    * Fix support for services connected via IPv6
    
    Use the correct address family when connecting to the various RPC services.
    
    The solution is basically the same suggested here:
    #157 (comment)
    
    This work is the result of the work of @edomora97, @mark03 and @dariost.
    
    * Mock getaddrinfo in test_background_connect
    
    Calling getaddrinfo somehow breaks the mocking interface of socket,
    replacing the MagicMock with the original function. This would break the
    assert and the test in general.
    To prevent so getaddrinfo is mocked as well, making it return just an
    address without side effects.
    
    * Try all the resolved addresses
    
    - Try to resolve only with the SOCK_STREAM type
    - Try to connect to all the resolved IP addresses, sometimes the first
      in the list is not the correct one (e.g. IPv4/v6)
    - Remove redundant getaddrinfo in _connection_handler
    
    * Stop after the first connection
    
    * Pass family, type and proto to socket.socket()
    
    As suggested in https://docs.python.org/3/library/socket.html#socket.getaddrinfo
    
    * Fix tests
    edomora97 committed Dec 17, 2021

Commits on Dec 15, 2021

  1. Import Codecov PGP key from multiple keyservers

    The import may sometimes fail if the keyserver is unavailable. We try
    multiple keyservers in order until the import succeeds.
    
    Fixes: c9d7e02
    andreyv committed Dec 15, 2021

Commits on Dec 14, 2021

  1. Fix CI (#1199)

    * Fix CI
    
    * Use apt-get instead of apt
    
    > WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
    edomora97 committed Dec 14, 2021

Commits on Dec 12, 2021

  1. Remove support for Python 3.6

    Ubuntu 20.04 with Python 3.8 has been supported for a while. Meanwhile,
    Python 3.6 was released about five years ago, and is nearing the end of
    official support.
    andreyv committed Dec 12, 2021
  2. Add myself to AUTHORS

    andreyv committed Dec 12, 2021

Commits on Nov 24, 2021

  1. Use the new Codecov uploader

    Codecov recently introduced a new Node-based uploader to replace the
    old Bash uploader [1]. The old Bash uploader is deprecated and will be
    removed later.
    
    The new uploader's integrity is checked according to Codecov
    recommendations. This was highlighted after a recent Codecov security
    breach [2].
    
    The new uploader is significantly larger, so it is cached between runs.
    
    See also: GitHub Codecov action [3].
    
    [1] https://about.codecov.io/blog/introducing-codecovs-new-uploader/
    [2] https://about.codecov.io/security-update/
    [3] https://github.com/marketplace/actions/codecov
    andreyv committed Nov 24, 2021

Commits on Nov 17, 2021

  1. Add no-users option to DumpImporter and DumpExporter (#1165)

    * feat: Allow DumpExporter to only export tasks
    
    * fix: Dump exporter tests
    
    * fix: Add DumpExporterTest for skip_users, fix bug
    
    * feat: Add no-users option to DumpImporter
    
    * fixup
    
    Co-authored-by: Andrey Vihrov <andrey.vihrov@gmail.com>
    ranaldmiao and andreyv committed Nov 17, 2021

Commits on Oct 22, 2021

  1. BugFix: Italian contest exporter and communication tasks (#1196)

    * BugFix: Italian contest exporter and communication tasks
    
    When the task is a communication task and it has no stubs,
    exporter assumes "alone" and "std_io".
    It only changes its mind to "stub" and "fifo_io" when a stub of
    any language is found.
    
    * Yaml format extended with user_io option
    
    This option overrides the default asumption of User I/O option in
    communication tasks (stdin/stdout in tasks without stubs and
    fifos in tasks with stubs).
    
    * Formatting (maximum line length)
    MarcoUCM committed Oct 22, 2021

Commits on Sep 30, 2021

  1. Italian contest loader is able to load contests with no participants (#…

    …1193)
    
    * BugFix: Italian contest loader is able to load contest without participants
    
    * Unnecesary semicolon removed
    
    Co-authored-by: Andrey Vihrov <andrey.vihrov@gmail.com>
    MarcoUCM and andreyv committed Sep 30, 2021
  2. Update Czech translation (#1190)

    * Update Czech translation
    
    * Fix Last-Translator field in Czech translation
    
    * Fix forgotten translation and change different translation
    SvizelPritula committed Sep 30, 2021

Commits on Sep 8, 2021

  1. Added German translation

    LennartF22 authored and andreyv committed Sep 8, 2021

Commits on Aug 26, 2021

  1. Better default Nginx configuration

    Use hash  instead if ip_hash because the latter only considers the first three octets of the IP address, and in usual settings those octects have a low variability
    wil93 authored and andreyv committed Aug 26, 2021

Commits on Aug 6, 2021

  1. Update to jQuery 3.6.0

    This covers the following GitHub security advisories:
    - GHSA-gxr4-xjj5-5px2
    - GHSA-jpcq-cgw6-v4j6
    - CVE-2019-11358
    - CVE-2015-9251
    
    The jQuery Migrate library is also added to maintain compatibility
    with the current Bootstrap version (2.0.4). Without the compatibility
    library, the following error occurs when dismissing an alert:
    
      Uncaught Error: Syntax error, unrecognized expression: #
          jQuery (7)
          close http://localhost:8888/static/js/bootstrap.js:7
          jQuery (8)
          <anonymous> http://localhost:8888/static/js/bootstrap.js:7
          jQuery (13)
      jquery-3.6.0.min.js:2:13639
    andreyv committed Aug 6, 2021

Commits on Jul 8, 2021

  1. Add Language.executable_extension property

    Language executable file names can now have extensions. This allows to
    simplify language compilation commands in multiple cases.
    
    Task type plugins and tests are updated accordingly.
    andreyv committed Jul 8, 2021

Commits on Jun 8, 2021

  1. Use a lock file for precaching

    Ensure that no two workers on the same machine simultaneously
    try to precache files. All workers except one skip precaching.
    fagu authored and andreyv committed Jun 8, 2021
  2. Let ES ask for a contest id.

    This has several effects:
     - Workers precache files for the selected contest.
     - ES only looks for missing operations for the selected contest.
     - invalidate_submission() only invalidates submissions for the selected
       contest if no contest_id, submission_id, dataset_id, participation_id,
       or task_id passed to it.
    fagu authored and andreyv committed Jun 8, 2021

Commits on Jun 3, 2021

  1. Let all services share the file cache directory (#1183)

    * Let all services share the file cache directory
    
    * Disallow destroying/purging a shared cache
    
    * After downloading a file, open the temporary file before moving
    
    Even if someone keeps deleting all cached files, a file can always
    be used after downloading it just once. (Previously, this could have
    become an infinite loop if the file gets deleted sufficiently quickly
    every time.)
    
    * Small changes
    fagu committed Jun 3, 2021

Commits on Jun 2, 2021

Commits on May 18, 2021

  1. fix: wrong link to source file

    ranaldmiao authored and andreyv committed May 18, 2021

Commits on May 13, 2021

  1. Fix typo in the AddSubmission script

    Edit help message of the `--contest-id` argument
    MaGaroo authored and andreyv committed May 13, 2021

Commits on May 5, 2021

  1. Migrate CI to GitHub Actions

    fushar authored and andreyv committed May 5, 2021
  2. Use CMS user's actual primary group for permissions setup

    It can happen that the CMS user's primary group name doesn't match the
    user name (in case of a pre-existing user), so we should use the actual
    group name for setting file permissions.
    
    We don't try to always create and use a "cmsuser" group instead, because
    this wouldn't work within a single CI session.
    andreyv committed May 5, 2021
Older