Page MenuHomePhabricator

[jobs-api] load restarting jobs even with no change
Closed, ResolvedPublicBUG REPORT

Description

On running with debug flag, I see:

[2023-05-01 05:08:30] [loader.py] DEBUG: currently existing job stream has different 'mem' than the definition

Issue appears to be that jobs.yml defines mem, whereas /list API output contains memory. The normalisation applied in code seems to be the other way round.

tools.sdzerobot@tools-sgebastion-10:~$ curl -k --cert ~/.toolskube/client.crt --key ~/.toolskube/client.key https://api.svc.tools.eqiad1.wikimedia.cloud:30003/jobs/api/v1/list/
[... {"name": "stream", "cmd": "~/bin/node ~/SDZeroBot/eventstream-router/main.js", "image": "node16", "image_state": "stable", "filelog": "True", "filelog_stdout": "stream.out", "filelog_stderr": "stream.err", "status_short": "Running", "status_long": "Last run at 2023-05-01T05:03:01Z. Pod in 'Running' phase. State 'running'. Started at '2023-05-01T05:03:05Z'.", "emails": "onfailure", "retry": 0, "continuous": true, "memory": "2Gi"} ... ]

Event Timeline

Change 913693 had a related patch set uploaded (by SD0001; author: SD0001):

[cloud/toolforge/jobs-framework-cli@master] Fix memory flag normalization while comparing job config with API output

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

Change 913693 merged by jenkins-bot:

[cloud/toolforge/jobs-framework-cli@master] Fix memory flag normalization while comparing job config with API output

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

I wonder why this wasn't discovered by the unit tests earlier.

dcaro renamed this task from toolforge-jobs load restarting jobs even with no change to [jobs-api] load restarting jobs even with no change.Mar 11 2024, 2:22 PM
dcaro edited projects, added Toolforge; removed Toolforge Jobs framework.
dcaro claimed this task.
dcaro subscribed.

As I understand, this has been fixed right?

Please reopen if it's not the case, thanks!