Skip to content

Add monthly container usage tracker - #109

Open
jplomas wants to merge 2 commits into
open-quantum-safe:mainfrom
jplomas:feat/track-container-usage
Open

jplomas wants to merge 2 commits into
open-quantum-safe:mainfrom
jplomas:feat/track-container-usage

Conversation

@jplomas

@jplomas jplomas commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Following on from #78:

Add tools/usage-tracker.sh to snapshot how the OQS CI container images are used across the open-quantum-safe org: for each openquantumsafe image on Docker Hub it records the last-published date and counts references on the open-quantum-safe GitHub org repos' default branches, rendering USAGE-TRACKER.md with up/down/same trends versus the previous snapshot.

Add a scheduled GitHub Actions workflow that regenerates the file on the 1st of each month and commits any change to main, plus the initial baseline USAGE-TRACKER.md.

This should both close #78 and provide some data to support the development of processes to retire stale containers.

Script written in Golang, then ported to bash by Claude (avoids a setup Golang CI step).

jplomas added 2 commits July 23, 2026 18:17
Add tools/usage-tracker.sh to snapshot how the OQS CI container images are used across the open-quantum-safe org: for each ci-* image it records the last-published date and counts references on org repos' default branches, rendering USAGE-TRACKER.md with up/down/same trends versus the previous snapshot.

Add a scheduled GitHub Actions workflow that regenerates the file on the 1st of each month and commits any change to main, plus the initial baseline USAGE-TRACKER.md.

Signed-off-by: JP Lomas <jp@theqrl.org>
Signed-off-by: JP Lomas <jp@theqrl.org>
@dstebila

Copy link
Copy Markdown
Member

Thanks JP! Very helpful. If I understand the first report correctly, this is telling us that we can already prune most of the images, is that right?

@jplomas

jplomas commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Yes, I think so.

While not accounting for external consumers, I think this supports considerable pruning.

Of course, the actual method of retiring is debatable. A belt-and-braces approach:

  1. Edit of short description / long description on Docker Hub ("deprecated: see [URL] for alternatives")

  2. Final build with injected:

echo "⚠️ WARNING: This Docker image is deprecated and no longer maintained" >&2
echo "⚠️ Please migrate to [alternative/image] as soon as possible" >&2

and

  1. Dockerfile LABEL metadata

  2. Move sources into an "archived" folder in this repo

There is some effort here, and it's probably not for me to say whether this is a better option than a YOLO retirement...

@dstebila

Copy link
Copy Markdown
Member

This is what Dockerhub shows me about container usage. It seems like all of the images are getting used. I don't know how to tell by whom, though.

Screenshot 2026-07-24 at 14-13-33 openquantumsafe Docker Hub

@jplomas

jplomas commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Ah, that's more than you get out of the public Docker Hub APIs...

A quick search of GitHub for one of the containers listed in the screenshot (5 years old, 10GB):
https://github.com/search?q=ci-centos-8-amd64&type=code

Clicking through a sample of those, all I tried were personal forks with no activity for ~6 years, so I suspect the recent pulls are stale CI runs 😱

I'm not sure if that pushes more towards "this image is deprecated" warnings or just remove!

@dstebila

Copy link
Copy Markdown
Member

Clicking through a sample of those, all I tried were personal forks with no activity for ~6 years, so I suspect the recent pulls are stale CI runs 😱

I'm not sure if that pushes more towards "this image is deprecated" warnings or just remove!

I'm thinking we go with remove, and then if someone complains we can restore.

@baentsch

Copy link
Copy Markdown
Member

I suspect the recent pulls are stale CI runs 😱
I'm not sure if that pushes more towards "this image is deprecated" warnings or just remove!
I'm thinking we go with remove, and then if someone complains we can restore.

This "someone" (complaining) should only be OQS CI jobs, right? We never suggested anyone else should rely on these images, or did we?

Thus, I'm all in favour of removing -- actually, even over tracking: The (need for) the latter makes you think there's no real plan behind OQS CI... which probably is the case :-/

So what about this suggestion: Clear out all images (maybe except the most obviously used one, i.e., ubuntu-latest), re-run all OQS CI jobs, see which ones fail and re-generate those that the sub projects then really can make a good case for (keeping). This would also allow substantial pruning of code (and CI runs I also figure as probably unnecessary) in this repo right away.

Alternative: we ask an AI to analyze the state of things across (i.e., deduce the need for images from the code in) all repos rather than rely on tracking and manual reading...

Done:

Docker images used in OQS CI jobs

Docker image Sub-projects
openquantumsafe/ci-ubuntu-latest:latest liboqs, liboqs-java
openquantumsafe/ci-ubuntu-latest oqs-provider
openquantumsafe/ci-ubuntu-jammy:latest liboqs
openquantumsafe/ci-ubuntu-jammy oqs-provider
openquantumsafe/ci-ubuntu-focal-x86_64:latest oqs-provider, openssh
openquantumsafe/ci-alpine-amd64:latest liboqs
openquantumsafe/ci-alpine-amd64 oqs-provider
ghcr.io/zephyrproject-rtos/ci:v0.28.7 liboqs
ghcr.io/zephyrproject-rtos/ci:v0.26-branch liboqs

--> I'd suggest removing anything else. I'd further suggest stopping use of focal and jammy: Time has moved on. All else can be pruned from this repo.

A bit more drastic than tracking, but a real remedy to too many CPU cycles and storage space wasted.

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.

Track container usage

3 participants