Skip to content

Migrate from dagster-shell to PipesSubprocessClient#57

Closed
menzenski wants to merge 8 commits intoquantile-development:masterfrom
menzenski:to-dagster-pipes
Closed

Migrate from dagster-shell to PipesSubprocessClient#57
menzenski wants to merge 8 commits intoquantile-development:masterfrom
menzenski:to-dagster-pipes

Conversation

@menzenski
Copy link
Copy Markdown

@menzenski menzenski commented Apr 23, 2025

For #56

I haven't really started to test this yet but wanted to get something out there for review.

Comment on lines +60 to +74
full_command = f"{self.meltano_bin} {command}"
merged_env = {**self.default_env, **env}

context.log.info(f"Executing command with PipesSubprocessClient: {full_command}")

client: PipesSubprocessClient = PipesSubprocessClient(
env=merged_env,
cwd=self.project_dir,
context_injector=None,
)
_command: list[str] = full_command.split(" ")
client.run(
command=_command,
context=context,
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Using PipesSubprocessClient adds the ability to inject context and get structured messages back from the subprocess. This is useful when the subprocess are python scripts or similar that could be updated to take advantage.

In this case it looks like we are explicitly disabling context injection always invoking a meltano command that I assume can not benefit from these capabilities.

I think the move here might be to just move to a stock subprocess.run call

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think the move here might be to just move to a stock subprocess.run call

@alangenfeld thanks for that idea - I've opened #58 which does this (it reimplements what dagster-shell had been doing with subprocess).

@menzenski
Copy link
Copy Markdown
Author

Closing this PR - the approach in #58 is better

@menzenski menzenski closed this Nov 25, 2025
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.

4 participants