Page MenuHomeElementl

[RFC] make_log_handler_resource
AbandonedPublic

Authored by sandyryza on Jun 3 2021, 4:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 1, 12:39 AM
Unknown Object (File)
Fri, May 19, 6:18 PM
Unknown Object (File)
Apr 24 2023, 5:40 PM
Unknown Object (File)
Apr 23 2023, 11:37 AM
Unknown Object (File)
Apr 23 2023, 8:05 AM
Unknown Object (File)
Apr 8 2023, 9:29 AM
Unknown Object (File)
Mar 20 2023, 9:47 PM
Unknown Object (File)
Mar 20 2023, 7:14 AM
Subscribers

Details

Reviewers
None
Summary

Depends on D8209.

This could replace LoggerDefinitions.

Test Plan

bk

Diff Detail

Repository
R1 dagster
Branch
logger-resource (branched from master)
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 3 2021, 4:53 PM
Harbormaster failed remote builds in B31599: Diff 38900!
sandyryza retitled this revision from make_log_handler_resource to [RFC] make_log_handler_resource.Jun 3 2021, 4:54 PM

Yeah I think with this one might need some special rule for "logger resources" that they are automatically added to every solid in an execution

Yeah I think with this one might need some special rule for "logger resources" that they are automatically added to every solid in an execution

@schrockn that brings up the question of whether we'd want to make that a generic resource capability. I'm sure there are some users who would love to have a global config resource that doesn't require setting required_resource_keys on each solid that wants to access it.

I'm a bit more wary of allowing users to do that. This is "special" since it is a "system" resource that is not directly reference by a context. (i.e., the user always goes through the intermediate logging API rather than direct against the resource)

I'm a bit more wary of allowing users to do that. This is "special" since it is a "system" resource that is not directly reference by a context. (i.e., the user always goes through the intermediate logging API rather than direct against the resource)

Backing up, my understanding of the requirement is essentially that we want someone to be able to set a logging policy for in-process logging inside their solids, without needing to require a resource key per solid.

What if someone wanted to be able to do the same for code that executes out-of-process? E.g. maybe all their solids invoke Java programs, and they have some particular Log4J config that they want to apply for production runs of their job. I suspect it would be useful to support that as well.

Which is to say that I think the need we're observing here points to a requirement that's more general than "configure these particular logging libraries", and I'm wary of adding a narrow abstraction if there's a more general one that's likely to subsume it. If we don't want to enable the config use case I described above, perhaps we could offer a class of global resources that run pre/post-step, but that solid bodies don't have access to?