Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nickygerritsen
Copy link
Member

  • 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
@nickygerritsen nickygerritsen requested a review from vmcj July 24, 2025 18:32
failed_when: false
changed_when: false
check_mode: false
when: ICPC_IMAGE
Copy link
Member

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
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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:
Copy link
Member

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).

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

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.

Copy link
Member Author

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
Copy link
Member

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:
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants