-
Notifications
You must be signed in to change notification settings - Fork 11
Initial changes for the ICPC World Finals in Baku #189
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
base: main
Are you sure you want to change the base?
Conversation
nickygerritsen
commented
Jul 24, 2025
- Install php-bcmath extension
- Copy the pc2packages key to the Ubuntu archive keyring
- Install openjdk 21
- Copy kotlin folder instead of using old apt package
- Use correct repo URL
- Do not use cgroupv1
* Install php-bcmath extension * Copy the pc2packages key to the Ubuntu archive keyring * Install openjdk 21 * Copy kotlin folder instead of using old apt package * Use correct repo URL * Do not use cgroupv1
failed_when: false | ||
changed_when: false | ||
check_mode: false | ||
when: ICPC_IMAGE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put this in a block? All the next statements depend on the ICPC_IMAGE boolean.
check_mode: false | ||
when: ICPC_IMAGE | ||
|
||
- name: Add pc2packages key to ubuntu-archive-keyring.gpg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the whole idea of the apt-key
deprecation to not do this anymore? Why would this (https://stackoverflow.com/a/73805885) not work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this for the chroot, not for apt
directly. If you can find a way to prevent this, I'm open to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it should be passed to the dj_make_chroot
as another flag? We now have something for the old way and I think we should do both there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can create a gpg store with all needed keys (maybe it's only the pc2 one), sure.
I don't have time to fix this in the next couple of weeks so feel free to try and improve. At least this works for now.
when: ICPC_IMAGE | ||
|
||
- name: Sync kotlinc folder to chroot | ||
ansible.posix.synchronize: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is "expensive" on next runs, maybe add an explicit tag for this (I was already planning that so a remark here should be good enough).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The folder is very small and it runs about instant on my test VM. Feel free to change it later if you really want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It starts another SSH session, so on a noop
it delays the overall playbook. So my problem isn't really the size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so what do you propose? We could also add a check first if some file in it already exists and then don't do this (like the kotinc binary). I prefer that over a tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe tar/gzip the file locally and make sure that's present and if changed unzip remotely? Not sure this is ideal, but adding a tag that manually needs to be triggered (if I understand @vmcj correctly) I think has the risk of forgetting to update things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are not really local. They are on the server but just need to be copied.
My thought was adding a check if /chroot/domjudge/usr/lib/kotlinc/bin/Kolton exists and if so, don't do anything. A bit similar to how we don't rebuild the chroot if /chroot/DOMjudge exists.
@@ -42,6 +42,7 @@ INSTALLED_PACKAGES: | |||
- php-mysql | |||
- php-xml | |||
- php-zip | |||
- php-bcmath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: let's keep this list sorted.
when: ICPC_IMAGE | ||
|
||
- name: Sync kotlinc folder to chroot | ||
ansible.posix.synchronize: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe tar/gzip the file locally and make sure that's present and if changed unzip remotely? Not sure this is ideal, but adding a tag that manually needs to be triggered (if I understand @vmcj correctly) I think has the risk of forgetting to update things.