Skip to content

Add run_id to Action Outputs#212

Open
bhattarai842 wants to merge 1 commit into
dagster-io:mainfrom
bhattarai842:add-output-runid
Open

Add run_id to Action Outputs#212
bhattarai842 wants to merge 1 commit into
dagster-io:mainfrom
bhattarai842:add-output-runid

Conversation

@bhattarai842

Copy link
Copy Markdown

This change introduces a run_id output in the action metadata, making it accessible to subsequent steps in the workflow. The run_id value is derived from the output of the dagster-cloud-cli step, allowing workflows to reference it.

@bhattarai842

Copy link
Copy Markdown
Author

@gibsondan Could it be possible to review this small PR?

@gibsondan gibsondan self-requested a review February 12, 2025 08:46
@gibsondan

Copy link
Copy Markdown
Member

@bhattarai842 is this for when the command is dagster-cloud job launch?

There's an existing dagster-io/dagster-cloud-action/actions/utils/run action that runs that specific command and already has run_id as an output, is that an option here?

This command runs arbitrary dagster cloud CLI commands so i would be hesitant about assuming a specific format to the output.

@gibsondan gibsondan requested a review from mlarose February 12, 2025 16:49

@gibsondan gibsondan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To you for that question

@bhattarai842

Copy link
Copy Markdown
Author

@bhattarai842 is this for when the command is dagster-cloud job launch?

There's an existing dagster-io/dagster-cloud-action/actions/utils/run action that runs that specific command and already has run_id as an output, is that an option here?

This command runs arbitrary dagster cloud CLI commands so i would be hesitant about assuming a specific format to the output.

Thanks @gibsondan. I will check your suggestion.

@bhattarai842

Copy link
Copy Markdown
Author

I haven't done that yet, but it seems we could use dagster-io/dagster-cloud-action/actions/utils/run. I will close this pull request for now and reopen it if required.

@bhattarai842

Copy link
Copy Markdown
Author

@gibsondan I tested your suggestion but I cannot lauch job. It throws me error.

File "/venv-dagster-cloud/lib/python3.10/site-packages/dagster_cloud_cli/utils.py", line 92, in wrap_function
    return to_wrap(*args, **modified_kwargs)
  File "/venv-dagster-cloud/lib/python3.10/site-packages/dagster_cloud_cli/commands/job/__init__.py", line [51](https://github.com/jouzen/dagster-etl/actions/runs/13852328638/job/38761713863?pr=93#step:19:52), in launch
    gql.launch_run(
  File "/venv-dagster-cloud/lib/python3.10/site-packages/dagster_cloud_cli/gql.py", line 639, in launch_run
    formatted_tags = [{"key": cast(str, k), "value": cast(str, v)} for k, v in tags.items()]
AttributeError: 'str' object has no attribute 'items'
Failed to launch run

@bhattarai842 bhattarai842 reopened this Mar 31, 2025
@gibsondan

gibsondan commented Mar 31, 2025 via email

Copy link
Copy Markdown
Member

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.

2 participants