Skip to content

Conversation

vmcj
Copy link
Member

@vmcj vmcj commented Aug 23, 2025

Discussed during the NWERC hackathon in 2023.

We allow admins to toggle an autoquery to domjudge.org for 2 reasons:

  • Alerting users that a new version might exist, helping us in case of security releases.
  • Giving a gentle nudge for people to upgrade making support easier.
  • Getting some information on what installations are out there.

Default this doesn't happen, so the admin chooses to enable this themselves so this is different from normal telemetry.

Discussed during the hackathon in 2023. We allow admins to toggle an
autoquery to domjudge.org for 2 reasons:
- Alerting users that a new version might exist, helping us in case of
  security releases.
- Giving a gentle nudge for people to upgrade making support easier.
- Getting some information on what installations are out there.
return false;
}
$versionLocalString = explode("/", str_replace("DEV", "-prerelease", $this->domjudgeVersion))[0];
$versionLocal = Version::parse($versionLocalString, false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why tarball in the user agent and not DOMjudge like we do when shadowing?

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 also wanted to know which installmethods are out there, so next step is a config variable but I had no idea on how to set that (yet) I suspect a make option..

* the user can see on the website if there is a new Major/minor themselves
* otherwise the latest minor, or Major release. So the user might make the upgrade path:
* DJ6.0.0 -> DJ6.0.6 -> DJ6.6.0 -> DJ9.0.0 instead of
* -> DJ6.0.[1..6] -> DJ6.[1..6] -> DJ[7..9].0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole loop could also be done by sorting the versions lexicographically and taking the next one higher than the local version. This could replace all three checks?

Copy link
Member Author

@vmcj vmcj Aug 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't that give the path over all patches, minor plus patches in that minor etc?

Basically the 2nd path I mentioned.

Copy link
Member

@nickygerritsen nickygerritsen Aug 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah you might be right but we could solve that by only exposing specific versions on the versions site?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if the array would only the latest patch release per M.m release we would still need to filter somewhere.

But I get the point that we should do something smarter so the code is less duplicated.

Copy link
Member Author

@vmcj vmcj Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need the loop as at best we can only clean the list to always have the highest patch version in the list,

We could ofcourse do this math on the version site and basically only let the server do a lookup there so:
{'1.1.5': '1.5.5',
'1.2.3': '1.2.5',
'1.5.5': '5.5.5'}
where 5 is always the highest version in that release.

But that also feels expensive, it just removes the calculation to another server.

I did some cleanup though and I think this is already more what you want. Although I'm not 100% if it will now not also alert for the current version.

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.

2 participants