Skip to content

Conversation

@OwenKephart
Copy link
Contributor

Summary & Motivation

This makes it so dg plus deploy refresh-defs-state can handle workspaces in addition to projects. previously we assumed we were executing in the same python environment as the main dg command, but this isn't always the case. Now, we create an InstanceRef that has access to our prod DefsStateStorage. We can then serialize this reference and pass it to the subprocess, which then invokes dg utils refresh-defs-state in the project's python env. This results in the instance in the main process being mutated, which we can then read from at the end to get the updated defs state info.

How I Tested These Changes

Changelog

Insert changelog entry or delete this section.

Copy link
Contributor Author

OwenKephart commented Nov 19, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@OwenKephart OwenKephart marked this pull request as ready for review November 20, 2025 00:40
@OwenKephart OwenKephart force-pushed the 11-18-_dg_update_dg_plus_deploy_refresh-defs-state_command_to_handle_subprocesses branch from 1d6ede1 to 3f77f9e Compare November 20, 2025 00:40
@OwenKephart OwenKephart changed the base branch from master to graphite-base/32851 November 20, 2025 16:50
@OwenKephart OwenKephart force-pushed the 11-18-_dg_update_dg_plus_deploy_refresh-defs-state_command_to_handle_subprocesses branch from 3f77f9e to b20ddf9 Compare November 20, 2025 16:50
@OwenKephart OwenKephart changed the base branch from graphite-base/32851 to 11-20-_dg_add_--instance-ref_arg_to_refresh-defs-state November 20, 2025 16:51
@github-actions
Copy link

github-actions bot commented Nov 20, 2025

Deploy preview for dagster-docs ready!

Preview available at https://dagster-docs-a76ev410z-elementl.vercel.app
https://11-18-dg-update-dg-plus-deploy-refresh-defs-state-command-to-h.archive.dagster-docs.io

Direct link to changed pages:

@OwenKephart OwenKephart force-pushed the 11-18-_dg_update_dg_plus_deploy_refresh-defs-state_command_to_handle_subprocesses branch from b20ddf9 to 707a52c Compare November 20, 2025 17:12
@OwenKephart OwenKephart force-pushed the 11-20-_dg_add_--instance-ref_arg_to_refresh-defs-state branch from 4d5a804 to cee07c4 Compare November 20, 2025 17:12
@OwenKephart OwenKephart changed the base branch from 11-20-_dg_add_--instance-ref_arg_to_refresh-defs-state to graphite-base/32851 November 20, 2025 17:15
@OwenKephart OwenKephart force-pushed the 11-18-_dg_update_dg_plus_deploy_refresh-defs-state_command_to_handle_subprocesses branch from 707a52c to 6edd4e4 Compare November 20, 2025 17:16
@graphite-app graphite-app bot changed the base branch from graphite-base/32851 to master November 20, 2025 17:17
@OwenKephart OwenKephart force-pushed the 11-18-_dg_update_dg_plus_deploy_refresh-defs-state_command_to_handle_subprocesses branch from 6edd4e4 to 0938685 Compare November 20, 2025 17:17
Copy link
Collaborator

@smackesey smackesey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm vaguely uncomfortable with the "serialized instance as a comms channel for this specific information" hack but it seems like we can always change it later if we come up with a "cleaner" way to handle this stuff under the hood that doesn't involve a full gRPC server.

If it gets the job done!

@OwenKephart OwenKephart changed the base branch from master to graphite-base/32851 November 22, 2025 00:51
@OwenKephart OwenKephart force-pushed the 11-18-_dg_update_dg_plus_deploy_refresh-defs-state_command_to_handle_subprocesses branch from 0938685 to 5251ffe Compare November 22, 2025 00:51
@OwenKephart OwenKephart changed the base branch from graphite-base/32851 to 11-17-_dg_add_support_for_gitlab_in_configure_workflow November 22, 2025 00:51
@OwenKephart OwenKephart force-pushed the 11-18-_dg_update_dg_plus_deploy_refresh-defs-state_command_to_handle_subprocesses branch from 5251ffe to e0fa419 Compare November 24, 2025 18:43
@OwenKephart OwenKephart force-pushed the 11-17-_dg_add_support_for_gitlab_in_configure_workflow branch from bf76707 to 5e04f13 Compare November 24, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants