https://dagster.io/ logo
Title
m

Martin Carlsson

10/24/2021, 1:36 PM
I’m trying to convert a solid/op to a resource. It is working, but in the dagit UI, I dont get any logging from the resource.
Plus, I’m not seeing
get_access_token
in the dependency graph
c

chris

10/24/2021, 3:19 PM
Resources don’t show up in the dependency graph by design, since we consider them pluggable “environment” that lives above the computation itself. The logging issue is troublesome though, can get back to you tomorrow about that
m

Martin Carlsson

10/24/2021, 3:19 PM
@chris thanks
@chris if relevant, I can give you access to repo (just send your github username)
Of cause another relevant question. Am I using
resource
in the way it is supposed to be used? 😄 The API I’m calling needs a bearer token - so first need to get a bearer token, and then I can do the work I need to do on the API. So, the way I’m using
resource
here is just to return the bearer token as a string, and then I want to use it in all subsequent API calls.
@chris I think the real question could be, am I using
resource
in the way it was supposed to be used?
r

raaid

10/26/2021, 10:18 AM
I use resources in a similar manner and it works for me, if that helps. I don't return an access token, but I have a resource return a configured http session object that needs to be used across multiple solids in my pipeline (I haven't upgraded to ops/jobs yet so forgive the ancient syntax 🙂 )
p

prha

10/26/2021, 5:46 PM
@Martin Carlsson I think you are using
resource
correctly. The code snapshot that you posted should work (e.g. should log the bearer status code), if you are passing the
get_access_token
resource to your job. Can you paste a shot of what the resource initialization entries look like in the run logs in Dagit?
1