Page MenuHomeElementl

[RFC] DagsterAuthManager for run attribution
AbandonedPublic

Authored by sashank on Apr 30 2021, 4:40 PM.

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