Page MenuHomeElementl

[RFC] DagsterAuthManager for run attribution
AbandonedPublic

Authored by sashank on Apr 30 2021, 4:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 28, 11:21 PM
Unknown Object (File)
Wed, Mar 22, 3:09 AM
Unknown Object (File)
Tue, Mar 21, 11:10 AM
Unknown Object (File)
Mon, Mar 20, 2:30 PM
Unknown Object (File)
Fri, Mar 17, 6:23 AM
Unknown Object (File)
Tue, Mar 14, 8:39 AM
Unknown Object (File)
Sun, Mar 12, 10:57 AM
Unknown Object (File)
Sat, Mar 11, 1:14 AM
Subscribers

Details

Reviewers
max
Summary

This diff adds an abstract DagsterAuthManager class and custom Dagster Instance FlaskDagsterInstance that users can implement for run attribution. The string returned from get_identity is attached to all runs created through the GraphQL layer as a tag.

Test Plan

todo

Diff Detail

Repository
R1 dagster
Branch
identity-auth-manager
Lint
Lint Errors
Unit
No Test Coverage

Event Timeline

Re: th

python_modules/dagster-graphql/dagster_graphql/implementation/execution/run_lifecycle.py
70–72

Is there a way we can put this into a customized run launcher rather than in the core of the instance? That would compartmentalize this way more.

Actually duh that is in the daemon process rather than dagit.

I would consider a more generic mechanism, such as pluggable tag provider or a way to customize the run creation process. That way this could be used for other purposes as well.

I think I agree that another layer of indirection would be nice here, with e.g. get_additional_tags_for_run(pipeline_run) on the custom instance, and then the implementation of that calling the auth manager. i also think it makes sense to call this auth manager something like FlaskAuthManager