Skip to content

Unbreak rejudgingpage #2876

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

Merged
merged 6 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/jobs/baseinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ mysql_root "show databases"
mysql_root "SELECT CURRENT_USER();"
mysql_root "SELECT USER();"
mysql_root "SELECT user,host FROM mysql.user"
mysql_root "SET max_allowed_packet=1073741824"
mysql_root "SET GLOBAL max_allowed_packet=1073741824"
echo "unused:sqlserver:domjudge:domjudge:domjudge:3306" > /opt/domjudge/domserver/etc/dbpasswords.secret
mysql_user "SELECT CURRENT_USER();"
mysql_user "SELECT USER();"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ jobs:
done
- name: dump the db
if: ${{ !cancelled() }}
run: mysqldump -uroot -proot domjudge > /tmp/db.sql
run: mysqldump -uroot -proot --quick --max_allowed_packet=1024M domjudge > /tmp/db.sql
- name: Upload database dump for debugging
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: DB-dump
path: /tmp/db.sql
Expand Down Expand Up @@ -141,10 +141,10 @@ jobs:
curl $CURLOPTS http://localhost/domjudge/jury/contests/1/freeze/doNow || true
curl $CURLOPTS http://localhost/domjudge/jury/contests/1/end/doNow || true
curl $CURLOPTS -X POST -d 'finalize_contest[b]=0&finalize_contest[finalizecomment]=gitlab&finalize_contest[finalize]=' http://localhost/domjudge/jury/contests/1/finalize
- name: Verify no errors in prod.log
- name: Verify no errors in symfony {prod,test,dev}.log
shell: bash
run: |
if cat /opt/domjudge/domserver/webapp/var/log/prod.log | egrep '(CRITICAL|ERROR):'; then
if cat /opt/domjudge/domserver/webapp/var/log/*.log | egrep '(CRITICAL|ERROR):'; then
exit 1
fi
- name: Download and perform API check
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/Form/Type/RejudgingType.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use App\Entity\Problem;
use App\Entity\Team;
use App\Entity\User;
use App\Service\DOMJudgeService;
use App\Service\ConfigurationService;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
Expand All @@ -25,7 +25,7 @@

class RejudgingType extends AbstractType
{
public function __construct(protected readonly DOMJudgeService $dj, protected readonly EntityManagerInterface $em)
public function __construct(protected readonly ConfigurationService $config, protected readonly EntityManagerInterface $em)
{
}

Expand Down
3 changes: 1 addition & 2 deletions webapp/tests/Unit/Service/ConfigurationServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ public function provideAddOptionsExecutables(): Generator
public function testAddOptionsResults(string $item): void
{
$verdictOptions = ['' => ''];
$verdictsConfig = self::getContainer()->getParameter('domjudge.etcdir') . '/verdicts.php';
$verdicts = include $verdictsConfig;
$verdicts = $this->config->getVerdicts(['final']);
foreach (array_keys($verdicts) as $verdict) {
$verdictOptions[$verdict] = $verdict;
}
Expand Down
Loading