-
Notifications
You must be signed in to change notification settings - Fork 260
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
add Paste code to submit feature #2712
Conversation
We now track the autoload_runtime file and create it as the normal user and because it exists we don't recreate it in the install-domserver step as root (assuming it runs with `sudo`). It will still create it if it doesn't exist, because domserver is a dependency for install-domserver (and in that case `composer` would run as root again, so prompting the user to accept this risk). This also works for the inplace targets as those depend on `build` which runs the `domserver` part. (cherry picked from commit b404383)
This triggered an error and broke the webstandard test. (cherry picked from commit 6862840)
The authentication fails so needs to be rewritten with the new github action.
Signed-off-by: Dup4 <[email protected]>
It seems Python complains about this for some Python versions.
…roblem (cherry picked from commit 56104f6)
(cherry picked from commit eaf95fe)
…ntity (cherry picked from commit affacb4)
The native password module used was deprecated with MySQL8 and doesn't work with MySQL9 anymore. It seems we don't need it anymore (I think we needed it because the mariadb-utils did not have support for caching_sha2_password yet), but the alternative is to keep using the MySQL8 container and not test for MySQL9. Under the hood in the past we used to store the password as a hash in the mysql.user table and now it's stored in another way (https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password) which should also give better performance. See: https://dba.stackexchange.com/a/209520 (cherry picked from commit 9c2bb99)
Fixes DOMjudge#2646. We used to persist the entity both before and after calling the lifecycle callbacks ourselves, which would introduce weird behavior where Doctrine wanted to insert some rows twice. By not persisting before calling the callbacks ourselves, this issue goes away. (cherry picked from commit 9f12b77)
For python the entry point is going to be weird, since it needs to be the filename, which is dynamically generated. We should come up with something smart here |
I have tested Python, and there is no issue. I believe the Paste code feature can only be used with a single file, so when it's just one file, the Python entry point shouldn't be a problem, right? |
I think this depends on if you enable "require entry point" for python. If you do it might break |
Alright, I'm not familiar with Python, so I didn't consider that. Perhaps we could set up an option that allows the administrator to decide whether to enable the paste code feature. Do you think this would be a good approach? |
I was thinking maybe to either:
|
I don't quite understand in what situations Python would have issues. Could you provide me with an example problem using Python? Thanks. |
Can you try to enable "require entry point" for the python language in the jury and try to submit? Let's see what happens. Maybe it's fine |
If enabling the "require entry point" in Python causes issues, would it be feasible to design the system so that, when using Python and the paste_code feature, the code for such cases is specifically saved with a designated filename? Thank you. |
That was my option 2. If you can make it nicely I think that's ok |
I have modified my code to force the entry point to equal the filename when using paste_code, since there's only one file in that case. I've tested it, and no issues occurred. Thanks! |
You probably want to change the merge target to the |
Thank you for pointing that out! I've already changed the merge target to the main branch. |
I think you want to do a rebase against |
I have made the changes and submitted a new PR |
Sorry, I accidentally closed the PR due to some GitHub operation error. I have resubmitted it. Apologies for the inconvenience.
Modify the old PR
Add two features: the ability to view the first failed test case and to copy and paste code directly.
Motivation:
As for the process of uploading code as files, I often find it a bit inconvenient. In online judges like Codeforces and Luogu, there are features allowing users to paste code directly. I believe this is a very convenient feature to have.
Implementation: