Page MenuHomeElementl

[RFC] DagsterAuthManager for run attribution
AbandonedPublic

Authored by sashank on Apr 30 2021, 4:40 PM.
Tags
None
Referenced Files
F2774223: D7680.id36545.diff
Sun, Feb 5, 5:23 AM
Unknown Object (File)
Sun, Jan 29, 7:10 PM
Unknown Object (File)
Thu, Jan 19, 1:04 AM
Unknown Object (File)
Thu, Jan 12, 3:23 AM
Unknown Object (File)
Tue, Jan 10, 9:51 PM
Unknown Object (File)
Jan 3 2023, 4:34 PM
Unknown Object (File)
Dec 14 2022, 12:56 AM
Unknown Object (File)
Dec 6 2022, 9:02 PM
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 Skipped
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