Page MenuHomePhabricator

jobs framework should not error out when executed by a non-tool account
Closed, ResolvedPublic

Description

Only tools have kubernetes credentials. If a normal user tries to execute any command, they are currently shown an error:

taavi@tools-sgebastion-11:~ $ toolforge-jobs containers
[toolforge-jobs] ERROR: unable to fetch information. Contact a Toolforge admin: "Exception: couldn't read kubeconfig for user 'taavi': [Errno 2] No such file or directory: '/data/project/taavi/.kube/config'"

It should display a more helpful message instead.

Event Timeline

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

[cloud/toolforge/jobs-framework-cli@master] toolforge-jobs: explicit warning if not running as tool account

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

Change 704105 merged by Arturo Borrero Gonzalez:

[cloud/toolforge/jobs-framework-cli@master] toolforge-jobs: explicit warning if not running as tool account

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

aborrero claimed this task.