From 44b9524691e7af882f8a76e7ace3ce3cf48c3e7b Mon Sep 17 00:00:00 2001 From: Martin Polanka Date: Wed, 23 Nov 2016 12:51:27 +0100 Subject: [PATCH 1/7] prepare some data --- Database.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/Database.md b/Database.md index 9d1f1c6..296dc3c 100644 --- a/Database.md +++ b/Database.md @@ -66,18 +66,82 @@ Assignment table represents exercise assignment in a group. It holds keys of the ## SolutionRuntimeConfig +- _name_ -- +- _runtimeEnvironment_ -- +- _jobConfigFilePath_ -- +- _createdAt_ -- +- _solutionRuntimeConfig_ -- + ## Submission +- _submittedAt_ -- +- _note_ -- +- _resultsUrl_ -- +- _assignment_ -- +- _user_ -- +- _submittedBy_ -- +- _solution_ -- +- _asynchronous_ -- +- _evaluation_ -- + ## SubmissionFailure +- _type_ -- +- _description_ -- +- _submission_ -- +- _createdAt_ -- +- _resolvedAt_ -- +- _resolutionNote_ -- + ## TestResult +- _testName_ -- +- _status_ -- +- _solutionEvaluation_ -- +- _score_ -- +- _memoryExceeded_ -- +- _usedMemoryRatio_ -- +- _timeExceeded_ -- +- _usedTimeRatio_ -- +- _exitCode_ -- +- _message_ -- +- _stats_ -- +- _judgeOutput_ -- + ## UploadedFile +- _name_ -- +- _localFilePath_ -- +- _uploadedAt_ -- +- _fileSize_ -- +- _user_ -- + ## User +- _degreesBeforeName_ -- +- _firstName_ -- +- _lastName_ -- +- _degreesAfterName_ -- +- _email_ -- +- _avatarUrl_ -- +- _isVerified_ -- +- _isAllowed_ -- +- _createdAt_ -- +- _instance_ -- +- _settings_ -- +- _memberships_ -- +- _exercises_ -- +- _role_ -- + ## UserAction +- _user_ -- +- _loggedAt_ -- +- _action_ -- +- _params_ -- +- _code_ -- +- _data_ -- + ## UserSettings User settings belong to some particular user and contains settings mostly for web application. From d9cc4d9ea699416c753074d0a27e359e99a4622f Mon Sep 17 00:00:00 2001 From: Martin Polanka Date: Wed, 23 Nov 2016 14:56:32 +0100 Subject: [PATCH 2/7] user action --- Database.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Database.md b/Database.md index 296dc3c..ec968b2 100644 --- a/Database.md +++ b/Database.md @@ -135,12 +135,14 @@ Assignment table represents exercise assignment in a group. It holds keys of the ## UserAction -- _user_ -- -- _loggedAt_ -- -- _action_ -- -- _params_ -- -- _code_ -- -- _data_ -- +Stores information about what routes on api user visited and some additional information about it. + +- _user_ -- which user performed api request +- _loggedAt_ -- time when action was performed +- _action_ -- action which was requested on api +- _params_ -- GET or POST parameters given by user +- _code_ -- return code which was sent back by api +- _data_ -- if call ended up with an exception, description of thrown exception should be there ## UserSettings From 3d0c1d600798af49b870e70eb3a4d88aa01f4cfd Mon Sep 17 00:00:00 2001 From: Martin Polanka Date: Wed, 23 Nov 2016 14:57:29 +0100 Subject: [PATCH 3/7] add only on logged users --- Database.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Database.md b/Database.md index ec968b2..3fc0d21 100644 --- a/Database.md +++ b/Database.md @@ -135,7 +135,7 @@ Assignment table represents exercise assignment in a group. It holds keys of the ## UserAction -Stores information about what routes on api user visited and some additional information about it. +Stores information about what routes on api user visited and some additional information about it. This procedure is applied only on logged users. - _user_ -- which user performed api request - _loggedAt_ -- time when action was performed From 5717f8558ab9f1d454eb6fb737c2d0fdf5b92ce3 Mon Sep 17 00:00:00 2001 From: Martin Polanka Date: Wed, 23 Nov 2016 15:54:15 +0100 Subject: [PATCH 4/7] test result and below --- Database.md | 68 ++++++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/Database.md b/Database.md index 3fc0d21..af8f694 100644 --- a/Database.md +++ b/Database.md @@ -95,47 +95,51 @@ Assignment table represents exercise assignment in a group. It holds keys of the ## TestResult -- _testName_ -- -- _status_ -- -- _solutionEvaluation_ -- -- _score_ -- -- _memoryExceeded_ -- -- _usedMemoryRatio_ -- -- _timeExceeded_ -- -- _usedTimeRatio_ -- -- _exitCode_ -- -- _message_ -- -- _stats_ -- -- _judgeOutput_ -- +Represents result of one logical test from job configuration. + +- _testName_ -- name of test which was stated in job configuration +- _status_ -- overall status of test +- _solutionEvaluation_ -- evaluation to which test result belongs +- _score_ -- score which was assigned to test evaluation by judge +- _memoryExceeded_ -- true if memory limit was exceeded +- _usedMemoryRatio_ -- float number from 0.0 to 1.0 which represents percentage of user solution memory usage against memory limit from configuration +- _timeExceeded_ -- true if time limit was exceeded +- _usedTimeRatio_ -- float number from 0.0 to 1.0 which represents percentage of user solution time usage against time limit from configuration +- _exitCode_ -- exit code which whole test returns +- _message_ -- provided only on non-zero exit code +- _stats_ -- textual representation of whole information about evaluation of test which arrived from worker +- _judgeOutput_ -- output textual message from judge ## UploadedFile -- _name_ -- -- _localFilePath_ -- -- _uploadedAt_ -- -- _fileSize_ -- -- _user_ -- +- _name_ -- original name of file uploaded to api +- _localFilePath_ -- destination where file is stored on api server +- _uploadedAt_ -- datetime of file upload +- _fileSize_ -- size of uploaded file in bytes +- _user_ -- user which uploaded particular file ## User -- _degreesBeforeName_ -- -- _firstName_ -- -- _lastName_ -- -- _degreesAfterName_ -- -- _email_ -- -- _avatarUrl_ -- -- _isVerified_ -- -- _isAllowed_ -- -- _createdAt_ -- -- _instance_ -- -- _settings_ -- -- _memberships_ -- -- _exercises_ -- -- _role_ -- +Keeps information about all users which are registered in ReCodEx. + +- _degreesBeforeName_ -- degrees before name which user acquired +- _firstName_ -- first name +- _lastName_ -- surname +- _degreesAfterName_ -- degrees after name +- _email_ -- email address which is used for sending email notifications +- _avatarUrl_ -- url of profile picture +- _isVerified_ -- user verified his/hers email address (not used at the moment) +- _isAllowed_ -- if this field is set to false user cannot sign in to application +- _createdAt_ -- datetime of user registration +- _instance_ -- instance to which user belongs to +- _settings_ -- settings which are connected to this user +- _memberships_ -- array of groups in which is user assigned +- _exercises_ -- exercises which user created and is their author +- _role_ -- role of the user which is used to determine privileges ## UserAction -Stores information about what routes on api user visited and some additional information about it. This procedure is applied only on logged users. +Stores information about what routes on api user visited and some additional information about it. This datas should be collected only from logged users. - _user_ -- which user performed api request - _loggedAt_ -- time when action was performed From 9c50fb311913d77b5a658815132609b794ed2362 Mon Sep 17 00:00:00 2001 From: Martin Polanka Date: Wed, 23 Nov 2016 16:13:19 +0100 Subject: [PATCH 5/7] more work --- Database.md | 72 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 20 deletions(-) diff --git a/Database.md b/Database.md index af8f694..9f64850 100644 --- a/Database.md +++ b/Database.md @@ -54,44 +54,76 @@ Assignment table represents exercise assignment in a group. It holds keys of the ## Resource +- _id_ -- +- _permissions_ -- + ## Role +- _id_ -- +- _parentRole_ -- +- _childRoles_ -- +- _permissions_ -- + ## RuntimeEnvironment +- _name_ -- +- _language_ -- +- _extensions_ -- +- _platform_ -- +- _description_ -- + ## Solution +- _user_ -- +- _files_ -- +- _solutionRuntimeConfig_ -- +- _evaluated_ -- + + ## SolutionEvaluation +- _evaluatedAt_ -- +- _initFailed_ -- +- _score_ -- +- _points_ -- +- _bonusPoints_ -- +- _isValid_ -- +- _evaluationFailed_ -- +- _resultYml_ -- +- _testResults_ -- + ## SolutionFile +- _solution_ -- + ## SolutionRuntimeConfig -- _name_ -- -- _runtimeEnvironment_ -- -- _jobConfigFilePath_ -- -- _createdAt_ -- -- _solutionRuntimeConfig_ -- +- _name_ -- human readable identificator of runtime configuration +- _runtimeEnvironment_ -- corresponding runtime environment +- _jobConfigFilePath_ -- path to job configuration which is stored at api server +- _createdAt_ -- datetime of entity creation +- _createdFrom_ -- parent solution runtime configuration from which this one was created ## Submission -- _submittedAt_ -- -- _note_ -- -- _resultsUrl_ -- -- _assignment_ -- -- _user_ -- -- _submittedBy_ -- -- _solution_ -- -- _asynchronous_ -- -- _evaluation_ -- +- _submittedAt_ -- datetime of submission creation +- _note_ -- user can provide note to his/hers exercise solution +- _resultsUrl_ -- URL pointed to fileserver from which results of submission can be internally downloaded +- _assignment_ -- corresponding assignment to which submission belongs to +- _user_ -- user to whom submission belongs to +- _submittedBy_ -- user who submitted solution of exercise, can be supervisor for instance +- _solution_ -- corresponding solution +- _asynchronous_ -- exercise solution was submitted asynchronously, this happens when supervisor or superadmin submit solution for particular user +- _evaluation_ -- evaluation of this submission ## SubmissionFailure -- _type_ -- -- _description_ -- -- _submission_ -- -- _createdAt_ -- -- _resolvedAt_ -- -- _resolutionNote_ -- +- _type_ -- type of failure, can be for example _broker_reject_ or _evaluation_failure_ +- _description_ -- description of failure which was provided by backend +- _submission_ -- associated submission which failed +- _createdAt_ -- datetime of entity creation +- _resolvedAt_ -- datetime when failure was resolved +- _resolutionNote_ -- user can provide description when failure is resolved ## TestResult From abb9b997ada0a55a4a5e5b8c5ee6ec9ea8e5797c Mon Sep 17 00:00:00 2001 From: Martin Polanka Date: Wed, 23 Nov 2016 16:42:13 +0100 Subject: [PATCH 6/7] desc --- Database.md | 61 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/Database.md b/Database.md index 9f64850..2cba7d0 100644 --- a/Database.md +++ b/Database.md @@ -50,51 +50,62 @@ Assignment table represents exercise assignment in a group. It holds keys of the ## ReferenceSolutionEvaluation +- _referenceSolution_ -- solution to which this evaluation belongs to +- _hwGroup_ -- hardware group which was used during execution on worker +- _resultsUrl_ -- filserver address from which results of reference evaluation can be internally accessed +- _evaluation_ -- associated general evaluation + ## ReportedErrors +- _type_ -- textual description of error type +- _recipients_ -- list of email addresses to which error was sent +- _subject_ -- subject as it was sent in email +- _sentAt_ -- datetime when email with error report was sent +- _description_ -- message as it was sent in email + ## Resource -- _id_ -- -- _permissions_ -- +- _id_ -- textual identification of resource +- _permissions_ -- permissions associated with this resource ## Role -- _id_ -- -- _parentRole_ -- -- _childRoles_ -- -- _permissions_ -- +- _id_ -- role textual identification +- _parentRole_ -- reference to parent role +- _childRoles_ -- array of roles which have this one as parent +- _permissions_ -- permissions which are connected to this role ## RuntimeEnvironment -- _name_ -- -- _language_ -- -- _extensions_ -- -- _platform_ -- -- _description_ -- +- _name_ -- human readable name of runtime environment +- _language_ -- language which can be used in this environment +- _extensions_ -- list of extensions in yaml format +- _platform_ -- textual description of platform +- _description_ -- some further description concerning this environment ## Solution -- _user_ -- -- _files_ -- -- _solutionRuntimeConfig_ -- -- _evaluated_ -- +- _user_ -- user to whom this solution belongs to +- _files_ -- exercise solution files which user uploaded and are associated with solution +- _solutionRuntimeConfig_ -- runtime configuration which was used during execution on worker +- _evaluated_ -- true if solution was evaluated and results were processed ## SolutionEvaluation -- _evaluatedAt_ -- -- _initFailed_ -- -- _score_ -- -- _points_ -- -- _bonusPoints_ -- -- _isValid_ -- -- _evaluationFailed_ -- -- _resultYml_ -- -- _testResults_ -- +- _evaluatedAt_ -- datetime of evaluation creation +- _initFailed_ -- if true then one of the initiation tasks failed thus solution cannot be even compiled +- _score_ -- overall score of user solution +- _points_ -- points which were assigned to user for this solution +- _bonusPoints_ -- bonus points assigned by some of the supervisors +- _isValid_ -- can be used to ban user solution of exercise due to various reasons +- _evaluationFailed_ -- true if whole evaluation failed on worker +- _resultYml_ -- whole YAML file with evaluation results acquired indirectly from worker +- _testResults_ -- results of all tests associated with user solution ## SolutionFile -- _solution_ -- +- _solution_ -- associated solution to which file belongs to ## SolutionRuntimeConfig From 07f28e0dd833de2450828e39b2bda6546f5fad51 Mon Sep 17 00:00:00 2001 From: Martin Polanka Date: Wed, 23 Nov 2016 17:01:17 +0100 Subject: [PATCH 7/7] description --- Database.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Database.md b/Database.md index 2cba7d0..5691e0c 100644 --- a/Database.md +++ b/Database.md @@ -57,6 +57,8 @@ Assignment table represents exercise assignment in a group. It holds keys of the ## ReportedErrors +All errors which were reported to api from backend are sent to administrator of system and also stored in this table. + - _type_ -- textual description of error type - _recipients_ -- list of email addresses to which error was sent - _subject_ -- subject as it was sent in email @@ -70,6 +72,8 @@ Assignment table represents exercise assignment in a group. It holds keys of the ## Role +Roles serves for distinction of what user can do or cannot do. Thus every user has to have assigned some particular role from which decisions about access rights are made. + - _id_ -- role textual identification - _parentRole_ -- reference to parent role - _childRoles_ -- array of roles which have this one as parent @@ -77,6 +81,8 @@ Assignment table represents exercise assignment in a group. It holds keys of the ## RuntimeEnvironment +Stores information about supported environments which can be used for evaluation on workers. + - _name_ -- human readable name of runtime environment - _language_ -- language which can be used in this environment - _extensions_ -- list of extensions in yaml format @@ -105,6 +111,8 @@ Assignment table represents exercise assignment in a group. It holds keys of the ## SolutionFile +Parent of this entity is `UploadedFile`, only added field is solution to which this file is associated. + - _solution_ -- associated solution to which file belongs to ## SolutionRuntimeConfig @@ -129,6 +137,8 @@ Assignment table represents exercise assignment in a group. It holds keys of the ## SubmissionFailure +Logically queue of failed submissions which deserves further attention from administrator. Administrator can then resolve this issue and information about that will be stored too. + - _type_ -- type of failure, can be for example _broker_reject_ or _evaluation_failure_ - _description_ -- description of failure which was provided by backend - _submission_ -- associated submission which failed @@ -155,6 +165,8 @@ Represents result of one logical test from job configuration. ## UploadedFile +Entity which represents one file which was uploaded to api server. This entity uses _Single Table Inheritance_ and its children are `ExerciseFile` and `SolutionFile` entities. + - _name_ -- original name of file uploaded to api - _localFilePath_ -- destination where file is stored on api server - _uploadedAt_ -- datetime of file upload