Open YoshicoppensE61 opened 1 year ago
Can I propose these code changes myself, and then someone can help a bit with the probable other code changes that need to happen because I probably do not grasp the full picture.
Sorry for the delayed response, and thanks for opening the issue. Can you please create a PR with the proposed changes? I'd be happy to review and provide feedback. I'd expect this to be an option that bubbles up all the way to the CLI as an optional argument.
Currently when you let the nutter run the tests, it starts jobs in databricks (using the 2.0 Jobs API). However, one of the big downsides of 2.0 vs 2.1 is that you cannot set permissions on your job in 2.0.
What will happen then often is that the nutter tests will run, they will show that an error has been made, but then only admins in databricks can actually see the results of the test in databricks (that is the default setting for jobs), others will see 'job not found'. Because we are generally running these tests in multiple environments, and not everyone can have admin access in all of those environments (we do not give admin access at all in production), this actually is a pretty big disadvantage.
If we could add access_list_permissions on the job as well, this would be mitigated. The underlying package databricks_api, which uses the underlying package databricks_cli, already allow for this.
nutter relevant code in common/apiclient.py
and
databricks_api relevant code
databricks_cli sdk relevant code
And then nutter run needs to get an extra argument, these access_list_permissions, that are optional to be defined.