The SIO2 project
  1. The SIO2 project
  2. SIO-2350

API: no problem_id after package_upload

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Current Version, For the OI Team
    • Fix Version/s: None
    • Component/s: OIOIOI
    • Labels:

      Description

      Names from: https://sio2.mimuw.edu.pl/api/docs/

      There is no way to check problem_id after package_upload, within API.
      It makes impossible automatic reuploading package inside CI, without checking id by hand.

      Because of that, API is much less useful than it could be.

      Possible solution:
      - package_upload returns package_id,
      - package_id allows to check upload status (and problem_id if upload was successful).


      Other solutions are also possible:
      - Possibility to use package_id instead of problem_id.
      - Reserving problem_id at the beginning. On fail, it is still reserved and waiting for package reupload.

        Issue Links

          Activity

          Hide
          Wojciech Dubiel added a comment -
          An alternative/additional solution would be to add an API endpoint to query problem ID based on contest_id and short_name. That'd make it much easier for the CI usecase.
          Show
          Wojciech Dubiel added a comment - An alternative/additional solution would be to add an API endpoint to query problem ID based on contest_id and short_name. That'd make it much easier for the CI usecase.
          Hide
          Dominik Klemba added a comment -
          Totally agree, we should think about it earlier.

          Possibility to check status by id would be also great (so, CI would be able to communicate if upload was successful).
          Show
          Dominik Klemba added a comment - Totally agree, we should think about it earlier. Possibility to check status by id would be also great (so, CI would be able to communicate if upload was successful).
          Hide
          Gerrit Gerrit added a comment -
          Change oioioi~master~I5257b7cd5cde1d82a3c17ce1e448722ed94405e0, patchset 1
          https://gerrit.sio2project.mimuw.edu.pl/3571

          SIO-2350 Ease use of package-related API functions

          Change-Id: I5257b7cd5cde1d82a3c17ce1e448722ed94405e0
          Show
          Gerrit Gerrit added a comment - Change oioioi~master~I5257b7cd5cde1d82a3c17ce1e448722ed94405e0, patchset 1 https://gerrit.sio2project.mimuw.edu.pl/3571 SIO-2350 Ease use of package-related API functions Change-Id: I5257b7cd5cde1d82a3c17ce1e448722ed94405e0
          Hide
          Gerrit Gerrit added a comment -
          Change oioioi~master~I5257b7cd5cde1d82a3c17ce1e448722ed94405e0, patchset 2
          https://gerrit.sio2project.mimuw.edu.pl/3571

          SIO-2350 Ease use of package-related API functions

          Change-Id: I5257b7cd5cde1d82a3c17ce1e448722ed94405e0
          Show
          Gerrit Gerrit added a comment - Change oioioi~master~I5257b7cd5cde1d82a3c17ce1e448722ed94405e0, patchset 2 https://gerrit.sio2project.mimuw.edu.pl/3571 SIO-2350 Ease use of package-related API functions Change-Id: I5257b7cd5cde1d82a3c17ce1e448722ed94405e0
          Hide
          Gerrit Gerrit added a comment -
          Change oioioi~master~I5257b7cd5cde1d82a3c17ce1e448722ed94405e0, patchset 3
          https://gerrit.sio2project.mimuw.edu.pl/3571

          SIO-2350 Add API endpoint to check package upload status

          Change-Id: I5257b7cd5cde1d82a3c17ce1e448722ed94405e0
          Show
          Gerrit Gerrit added a comment - Change oioioi~master~I5257b7cd5cde1d82a3c17ce1e448722ed94405e0, patchset 3 https://gerrit.sio2project.mimuw.edu.pl/3571 SIO-2350 Add API endpoint to check package upload status Change-Id: I5257b7cd5cde1d82a3c17ce1e448722ed94405e0
          Hide
          Jakub Wasilewski added a comment -
          Change is merged: https://gerrit.sio2project.mimuw.edu.pl/#/c/3571/

          package upload/reupload API's return package_id that can be used to query new API endpoint for package upload status
          When new API endpoint returns OK as package status (which means package got successfully uploaded) it also returns
          problem_id that can later be used to reupload the package
          Show
          Jakub Wasilewski added a comment - Change is merged: https://gerrit.sio2project.mimuw.edu.pl/#/c/3571/ package upload/reupload API's return package_id that can be used to query new API endpoint for package upload status When new API endpoint returns OK as package status (which means package got successfully uploaded) it also returns problem_id that can later be used to reupload the package
          Hide
          Wojciech Dubiel added a comment -
          I added a meta-ticket for other API improvements that'd help with problem package CI https://jira.sio2project.mimuw.edu.pl/browse/SIO-2394
          Show
          Wojciech Dubiel added a comment - I added a meta-ticket for other API improvements that'd help with problem package CI https://jira.sio2project.mimuw.edu.pl/browse/SIO-2394

            People

            • Assignee:
              Wojciech Dubiel
              Reporter:
              Dominik Klemba
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: