Page MenuHomePhabricator

toolforge-jobs: Indicate which containers are deprecated
Closed, ResolvedPublicFeature

Description

The toolforge-jobs containers command should indicate which containers are deprecated. This data is available on https://wikitech.wikimedia.org/wiki/Help:Toolforge/Kubernetes#Available_container_types, afaik it's not available anywhere programmatically, webservice hardcodes the list of containers.

Event Timeline

taavi changed the subtype of this task from "Task" to "Feature Request".Jul 21 2021, 12:02 PM

The current approach as of this writing to avoid the harcoded container list is to fetch them from the registry at API startup time.

If we need to store some additional metadata in the source code, then fetching the list is pointless and we could probably just go the webservice route and hardcode them.

We could introduce a deprecated string everywhere near the container name when listing, so users listing their jobs could clearly identify jobs using deprecated images (like we do with glance images @ CloudVPS), for example:

$ toolforge-jobs show myscheduledjob
+------------+-----------------------------------------------------------------+
| Job name:  | myscheduledjob                                                  |
+------------+-----------------------------------------------------------------+
| Command:   | ./read-dumps.sh myargument                                      |
+------------+-----------------------------------------------------------------+
| Job type:  | schedule: * * * * *                                             |
+------------+-----------------------------------------------------------------+
| Container: | tf-buster-std (deprecated)                                      | <-------
+------------+-----------------------------------------------------------------+
| File log:  | yes                                                             |
+------------+-----------------------------------------------------------------+
| Resources: | mem: 10Mi, cpu: 100                                             |
+------------+-----------------------------------------------------------------+
| Status:    | Last schedule time: 2021-06-30T10:26:00Z                        |
+------------+-----------------------------------------------------------------+
| Hints:     | Last run at 2021-06-30T10:26:08Z. Pod in 'Pending' phase. State |
|            | 'waiting' for reason 'ContainerCreating'.                       |
+------------+-----------------------------------------------------------------+

I think I'll go the configmap route. Let me write a patch.

Change 706458 had a related patch set uploaded (by Arturo Borrero Gonzalez; author: Arturo Borrero Gonzalez):

[cloud/toolforge/jobs-framework-api@main] containers: store information in a ConfigMap

https://gerrit.wikimedia.org/r/706458

Change 706458 merged by Arturo Borrero Gonzalez:

[cloud/toolforge/jobs-framework-api@main] containers: store information in a ConfigMap

https://gerrit.wikimedia.org/r/706458

Mentioned in SAL (#wikimedia-cloud) [2021-07-22T15:30:41Z] <arturo> pushed new docker image on the registry for toolforge-jobs-framework-api 4d8235b879adbac9122a968b4335cf2bafee2b61 (T287077)

aborrero claimed this task.