diff --git a/docs/content/api/modules.json.gz b/docs/content/api/modules.json.gz index 8b6d7eef297cc..e0a38edcd36e5 100644 Binary files a/docs/content/api/modules.json.gz and b/docs/content/api/modules.json.gz differ diff --git a/docs/content/api/searchindex.json.gz b/docs/content/api/searchindex.json.gz index e5cd77e15a6d3..6e05a2c4a4ba1 100644 Binary files a/docs/content/api/searchindex.json.gz and b/docs/content/api/searchindex.json.gz differ diff --git a/docs/content/api/sections.json.gz b/docs/content/api/sections.json.gz index e4261752b4208..5f130c0849c26 100644 Binary files a/docs/content/api/sections.json.gz and b/docs/content/api/sections.json.gz differ diff --git a/docs/content/concepts/dagster-pipes/aws-glue.mdx b/docs/content/concepts/dagster-pipes/aws-glue.mdx index 4d9c1901f2710..406143be913ad 100644 --- a/docs/content/concepts/dagster-pipes/aws-glue.mdx +++ b/docs/content/concepts/dagster-pipes/aws-glue.mdx @@ -7,7 +7,9 @@ description: "Learn to integrate Dagster Pipes with AWS Glue to launch external This tutorial gives a short overview on how to use [Dagster Pipes](/concepts/dagster-pipes) with [AWS Glue](https://aws.amazon.com/glue/). -## The [dagster-aws](/\_apidocs/libraries/dagster-aws) integration library provides the resource which can be used to launch AWS Glue jobs from Dagster assets and ops. Dagster can receive regular events like logs, asset checks, or asset materializations from jobs launched with this client. Using it requires minimal code changes on the job side. +The [dagster-aws](/\_apidocs/libraries/dagster-aws) integration library provides the resource which can be used to launch AWS Glue jobs from Dagster assets and ops. Dagster can receive regular events like logs, asset checks, or asset materializations from jobs launched with this client. Using it requires minimal code changes on the job side. + +--- ## Prerequisites @@ -129,7 +131,9 @@ defs = Definitions( Dagster will now be able to launch the AWS Glue job from the `glue_pipes_asset` asset. -By default the client will be using the CloudWatch log stream (`.../output/`) created by the Glue job to receive Dagster events and will forward this stream to `stdout`. If this is undesired, instead, the client can be configured to use , and the Glue job can use . +By default, the client uses the CloudWatch log stream (`.../output/`) created by the Glue job to receive Dagster events. The client will also forward the stream to `stdout`. + +To customize this behavior, the client can be configured to use , and the Glue job to use . --- diff --git a/docs/next/public/objects.inv b/docs/next/public/objects.inv index d9e1537489ec5..b52155dd004d7 100644 Binary files a/docs/next/public/objects.inv and b/docs/next/public/objects.inv differ diff --git a/docs/sphinx/sections/api/apidocs/libraries/dagster-aws.rst b/docs/sphinx/sections/api/apidocs/libraries/dagster-aws.rst index 3de17d8fb855d..078144abceb26 100644 --- a/docs/sphinx/sections/api/apidocs/libraries/dagster-aws.rst +++ b/docs/sphinx/sections/api/apidocs/libraries/dagster-aws.rst @@ -119,7 +119,6 @@ Clients .. autoclass:: dagster_aws.pipes.PipesLambdaClient .. autoclass:: dagster_aws.pipes.PipesGlueClient - :members: run Legacy -------- diff --git a/python_modules/libraries/dagster-aws/dagster_aws/pipes.py b/python_modules/libraries/dagster-aws/dagster_aws/pipes.py index ddd449a8fd805..d50bd0e3315ef 100644 --- a/python_modules/libraries/dagster-aws/dagster_aws/pipes.py +++ b/python_modules/libraries/dagster-aws/dagster_aws/pipes.py @@ -23,7 +23,7 @@ import dagster._check as check from botocore.exceptions import ClientError from dagster import PipesClient -from dagster._annotations import experimental +from dagster._annotations import experimental, public from dagster._core.definitions.resource_annotation import TreatAsResourceParam from dagster._core.errors import DagsterExecutionInterruptedError from dagster._core.execution.context.compute import OpExecutionContext @@ -198,6 +198,7 @@ def read_messages( finally: self._handler = None + @public def consume_cloudwatch_logs( self, log_group: str, @@ -211,11 +212,10 @@ def consume_cloudwatch_logs( log_group (str): CloudWatch log group name log_stream (str): CLoudWatch log stream name start_time (Optional[int]): The start of the time range, expressed as the number of - milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this - time or later than this time are included. - Events with a timestamp earlier than this time are not included. + milliseconds after ``Jan 1, 1970 00:00:00 UTC``. Only events with a timestamp equal to this + time or later are included. end_time (Optional[int]): The end of the time range, expressed as the number of - milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or + milliseconds after ``Jan 1, 1970 00:00:00 UTC``. Events with a timestamp equal to or later than this time are not included. """ handler = check.not_none( @@ -297,6 +297,7 @@ def __init__( def _is_dagster_maintained(cls) -> bool: return True + @public def run( self, *, @@ -362,9 +363,9 @@ class PipesGlueClient(PipesClient, TreatAsResourceParam): message_reader (Optional[PipesMessageReader]): A message reader to use to read messages from the glue job run. Defaults to :py:class:`PipesCloudWatchsMessageReader`. When provided with :py:class:`PipesCloudWatchMessageReader`, - it will be used to recieve logs and events from the `.../output/` + it will be used to recieve logs and events from the ``.../output/`` CloudWatch log stream created by AWS Glue. Note that AWS Glue routes both - `stderr` and `stdout` from the main job process into this LogStream. + ``stderr`` and ``stdout`` from the main job process into this LogStream. client (Optional[boto3.client]): The boto Glue client used to launch the Glue job forward_termination (bool): Whether to cancel the Glue job run when the Dagster process receives a termination signal. """ @@ -385,6 +386,7 @@ def __init__( def _is_dagster_maintained(cls) -> bool: return True + @public def run( self, *,