Skip to content

Commit

Permalink
[docs, dagster-pipes] fix inconsistencies in k8s example (#24658)
Browse files Browse the repository at this point in the history
## Summary & Motivation

Align code in k8s example with screenshots

## How I Tested These Changes

## Changelog

Insert changelog entry or "NOCHANGELOG" here.

- [ ] `NEW` _(added new feature or capability)_
- [ ] `BUGFIX` _(fixed a bug)_
- [x] `DOCS` _(fix inconsistencies in k8s pipes example)_
  • Loading branch information
danielgafni authored Sep 23, 2024
1 parent 4cae513 commit 90073c8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
Binary file modified docs/content/api/modules.json.gz
Binary file not shown.
Binary file modified docs/content/api/searchindex.json.gz
Binary file not shown.
Binary file modified docs/content/api/sections.json.gz
Binary file not shown.
14 changes: 8 additions & 6 deletions docs/content/concepts/dagster-pipes/kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,13 @@ from dagster_pipes import open_dagster_pipes

with open_dagster_pipes() as pipes:
# Stream log message back to Dagster
pipes.log.info("Started computation")
pipes.log.info(f"Using some_parameter value: {pipes.get_extra('some_parameter')}")

# ... your code that computes and persists the asset

# Stream asset materialization metadata and data version back to Dagster.
# This should be called after you've computed and stored the asset value. We
# omit the asset key here because there is only one asset in scope, but for
# multi-assets you can pass an `asset_key` parameter.
pipes.report_asset_materialization(
metadata={
"some_metric": {"raw_value": 1, "type": "int"}
"some_metric": {"raw_value": 2, "type": "int"}
},
data_version="alpha",
)
Expand Down Expand Up @@ -123,6 +119,9 @@ def k8s_pipes_asset(context: AssetExecutionContext, k8s_pipes_client: PipesK8sCl
return k8s_pipes_client.run(
context=context,
image="pipes-example:v1",
extras={
"some_parameter": 1
}
).get_materialize_result()
```

Expand Down Expand Up @@ -194,6 +193,9 @@ def k8s_pipes_asset(context: AssetExecutionContext, k8s_pipes_client: PipesK8sCl
return k8s_pipes_client.run(
context=context,
image="pipes-example:v1",
extras={
"some_parameter": 1
}
).get_materialize_result()


Expand Down
Binary file modified docs/next/public/objects.inv
Binary file not shown.

1 comment on commit 90073c8

@github-actions
Copy link

Choose a reason for hiding this comment

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

Deploy preview for dagster-docs ready!

✅ Preview
https://dagster-docs-77e2hxvjo-elementl.vercel.app
https://master.dagster.dagster-docs.io

Built with commit 90073c8.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.