https://dagster.io/ logo
#ask-community
Title
# ask-community
a

Arsenii Poriadin

02/28/2023, 5:06 PM
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

daniel

02/28/2023, 5:08 PM
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

Arsenii Poriadin

02/28/2023, 5:10 PM
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

daniel

02/28/2023, 5:10 PM
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

Arsenii Poriadin

02/28/2023, 5:12 PM
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

daniel

02/28/2023, 5:14 PM
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

Arsenii Poriadin

02/28/2023, 5:15 PM
so, how exactly can I make use of it as of now?
d

daniel

02/28/2023, 5:16 PM
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

Arsenii Poriadin

02/28/2023, 5:17 PM
ok will try, thank you!
oh & extra thanks for such a quick feedback!
condagster 1
d

daniel

02/28/2023, 8:20 PM
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