Hello! I am running dagster locally for now and am...
# ask-community
a
Hello! I am running dagster locally for now and am testing creation of new code locations and loading its' definitions without restarting the process. What I've noticed is: • when I'm adding, say, 3rd code location to my
workspace.yaml
it's sufficient to just press Reload All button in Deployment tab to have all the new definitions present, even sensors start to run automatically then • but if I only had 1 code location and am adding the 2nd one, then Dagit doesn't even have this Reload All button and there is no way the new definitions can start to take an effect w/o the restart Tried to read on that or find similar questions, but find much on it yet, would be grateful for some input on this matter!
d
Hi Arsenii - this sounds like a bug. Will surface to the team!
If you wouldn't mind filing a github issue, we can use it for tracking
a
Ok I can do that But can I get more info on what was the designed behavior? i.e should I be able to load the new definitions w/o restarting?
d
You should, yeah
success kid 1
And as a workaround, there's a graphql API call that you can make that does the same thing that the button would do if it were there
a
Yes, I actually saw smth similar in this answer But as I understood it can only be used with the older version of code locations with
@repository
usage? how do I use it for with Definitions API?
d
The API you want for this (to check for new code locations too, rather than load a particular code location) is actually reloadWorkspace (which isn't currently available on the GraphQL python client)
that will work with any code locations, whether or not they are using Definitions
a
so, how exactly can I make use of it as of now?
d
This page shows how to use the graphql API: https://docs.dagster.io/concepts/dagit/graphql#graphql-api the easiest way is probably to use the graphql playground in dagit
a
ok will try, thank you!
oh & extra thanks for such a quick feedback!
condagster 1
d
A PR for this just landed and will be in the release this week: https://github.com/dagster-io/dagster/pull/12588#event-8629643272 - thanks for the report!
🙌 1