Sensors can now set a string cursor using context.update_cursor(str_value) that is persisted across evaluations to save unnecessary computation. This persisted string value is made available on the context as context.cursor. Previously, we encouraged cursor-like behavior by exposing last_run_key on the sensor context, to keep track of the last time the sensor successfully requested a run. This, however, was not useful for avoiding unnecessary computation when the sensor evaluation did not result in a run request.
Dagit may now be run in --read-only mode, which will disable mutations in the user interface and on the server. You can use this feature to run instances of Dagit that are visible to users who you do not want to able to kick off new runs or make other changes to application state.
In dagster-pandas, the event_metadata_fn parameter to the function create_dagster_pandas_dataframe_type may now return a dictionary of EventMetadata values, keyed by their string labels. This should now be consistent with the parameters accepted by Dagster events, including the TypeCheck event.
# old
MyDataFrame = create_dagster_pandas_dataframe_type("MyDataFrame",
event_metadata_fn=lambda df:[
EventMetadataEntry.int(len(df),"number of rows"),
EventMetadataEntry.int(len(df.columns),"number of columns"),])# new
MyDataFrame = create_dagster_pandas_dataframe_type("MyDataFrame",
event_metadata_fn=lambda df:{"number of rows":len(df),"number of columns":len(dataframe.columns),},)
dagster-pandas’ PandasColumn.datetime_column() now has a new tz parameter, allowing you to constrain the column to a specific timezone (thanks @mrdavidlaing!)
The DagsterGraphQLClient now takes in an optional transport argument, which may be useful in cases where you need to authenticate your GQL requests:
Added an ecr_public_resource to get login credentials for the AWS ECR Public Gallery. This is useful if any of your pipelines need to push images.
Failed backfills may now be resumed in Dagit, by putting them back into a “requested” state. These backfill jobs should then be picked up by the backfill daemon, which will then attempt to create and submit runs for any of the outstanding requested partitions . This should help backfill jobs recover from any deployment or framework issues that occurred during the backfill prior to all the runs being launched. This will not, however, attempt to re-execute any of the individual pipeline runs that were successfully launched but resulted in a pipeline failure.
In the run log viewer in Dagit, links to asset materializations now include the timestamp for that materialization. This will bring you directly to the state of that asset at that specific time.
The Databricks step launcher now includes a max_completion_wait_time_seconds configuration option, which controls how long it will wait for a Databricks job to complete before exiting.
Solids can now be invoked outside of composition. If your solid has a context argument, the build_solid_context function can be used to provide a context to the invocation.
from dagster import build_solid_context
@soliddefbasic_solid():return"foo"assert basic_solid()==5@soliddefadd_one(x):return x +1assert add_one(5)==6@solid(required_resource_keys={"foo_resource"})defsolid_reqs_resources(context):return context.resources.foo_resource +"bar"
context = build_solid_context(resources={"foo_resource":"foo"})assert solid_reqs_resources(context)=="foobar"
build_schedule_context allows you to build a ScheduleExecutionContext using a DagsterInstance. This can be used to test schedules.
from dagster import build_schedule_context
with DagsterInstance.get()as instance:
context = build_schedule_context(instance)
my_schedule.get_execution_data(context)
build_sensor_context allows you to build a SensorExecutionContext using a DagsterInstance. This can be used to test sensors.
from dagster import build_sensor_context
with DagsterInstance.get()as instance:
context = build_sensor_context(instance)
my_sensor.get_execution_data(context)
build_input_context and build_output_context allow you to construct InputContext and OutputContext respectively. This can be used to test IO managers.
Resources can be provided to either of these functions. If you are using context manager resources, then build_input_context/build_output_context must be used as a context manager.
with build_input_context(resources={"cm_resource": my_cm_resource})as context:
io_manager.load_input(context)
validate_run_config can be used to validate a run config blob against a pipeline definition & mode. If the run config is invalid for the pipeline and mode, this function will throw an error, and if correct, this function will return a dictionary representing the validated run config that Dagster uses during execution.
validate_run_config({"solids":{"a":{"config":{"foo":"bar"}}}},
pipeline_contains_a
)# usage for pipeline that requires config
validate_run_config(
pipeline_no_required_config
)# usage for pipeline that has no required config
The ability to set a RetryPolicy has been added. This allows you to declare automatic retry behavior when exceptions occur during solid execution. You can set retry_policy on a solid invocation, @solid definition, or @pipeline definition.
@solid(retry_policy=RetryPolicy(max_retries=3, delay=5))deffickle_solid():# ...@pipeline(# set a default policy for all solids
solid_retry_policy=RetryPolicy())defmy_pipeline():# will use the pipelines policy by default
some_solid()# solid definition takes precedence over pipeline default
fickle_solid()# invocation setting takes precedence over definition
fickle_solid.with_retry_policy(RetryPolicy(max_retries=2))
Previously, asset materializations were not working in dagster-dbt for dbt >= 0.19.0. This has been fixed.
Previously, using the dagster/priority tag directly on pipeline definitions would cause an error. This has been fixed.
In dagster-pandas, the create_dagster_pandas_dataframe_type() function would, in some scenarios, not use the specified materializer argument when provided. This has been fixed (thanks @drewsonne!)
dagster-graphql --remote now sends the query and variables as post body data, avoiding uri length limit issues.
In the Dagit pipeline definition view, we no longer render config nubs for solids that do not need them.
In the run log viewer in Dagit, truncated row contents (including errors with long stack traces) now have a larger and clearer button to expand the full content in a dialog.
[dagster-mysql] Fixed a bug where database connections accumulated by sqlalchemy.Engine objects would be invalidated after 8 hours of idle time due to MySQL’s default configuration, resulting in an sqlalchemy.exc.OperationalError when attempting to view pages in Dagit in long-running deployments.
In 0.11.9, context was made an optional argument on the function decorated by @solid. The solids throughout tutorials and snippets that do not need a context argument have been altered to omit that argument, and better reflect this change.
In a previous docs revision, a tutorial section on accessing resources within solids was removed. This has been re-added to the site.
In Dagit, assets can now be viewed with an asOf URL parameter, which shows a snapshot of the asset at the provided timestamp, including parent materializations as of that time.
[Dagit] Queries and Mutations now use HTTP instead of a websocket-based connection.
A regression in 0.11.8 where composites would fail to render in the right side bar in Dagit has been fixed.
A dependency conflict in make dev_install has been fixed.
[dagster-python-client] reload_repository_location and submit_pipeline_execution have been fixed - the underlying GraphQL queries had a missing inline fragment case.
The @solid decorator can now wrap a function without a context argument, if no context information is required. For example, you can now do:
@soliddefbasic_solid():return5@soliddefsolid_with_inputs(x, y):return x + y
however, if your solid requires config or resources, then you will receive an error at definition time.
It is now simpler to provide structured metadata on events. Events that take a metadata_entries argument may now instead accept a metadata argument, which should allow for a more convenient API. The metadata argument takes a dictionary with string labels as keys and EventMetadata values. Some base types (str, int, float, and JSON-serializable list/dicts) are also accepted as values and will be automatically coerced to the appropriate EventMetadata value. For example:
The dagster-daemon process now has a --heartbeat-tolerance argument that allows you to configure how long the process can run before shutting itself down due to a hanging thread. This parameter can be used to troubleshoot failures with the daemon process.
When creating a schedule from a partition set using PartitionSetDefinition.create_schedule_definition, the partition_selector function that determines which partition to use for a given schedule tick can now return a list of partitions or a single partition, allowing you to create schedules that create multiple runs for each schedule tick.
Runs submitted via backfills can now correctly resolve the source run id when loading inputs from previous runs instead of encountering an unexpected KeyError.
Using nested Dict and Set types for solid inputs/outputs now works as expected. Previously a structure like Dict[str, Dict[str, Dict[str, SomeClass]]] could result in confusing errors.
Dagstermill now correctly loads the config for aliased solids instead of loading from the incorrect place which would result in empty solid_config.
Error messages when incomplete run config is supplied are now more accurate and precise.
An issue that would cause map and collect steps downstream of other map and collect steps to mysteriously not execute when using multiprocess executors has been resolved.
For pipelines with tags defined in code, display these tags in the Dagit playground.
On the Dagit asset list page, use a polling query to regularly refresh the asset list.
When viewing the Dagit asset list, persist the user’s preference between the flattened list view and the directory structure view.
Added solid_exception on HookContext which returns the actual exception object thrown in a failed solid. See the example “Accessing failure information in a failure hook“ for more details.
Added solid_output_values on HookContext which returns the computed output values.
Added make_values_resource helper for defining a resource that passes in user-defined values. This is useful when you want multiple solids to share values. See the example for more details.
StartupProbes can now be set to disabled in Helm charts. This is useful if you’re running on a version earlier than Kubernetes 1.16.
Fixed an issue where partial re-execution was not referencing the right source run and failed to load the correct persisted outputs.
When running Dagit with --path-prefix, our color-coded favicons denoting the success or failure of a run were not loading properly. This has been fixed.
Hooks and tags defined on solid invocations now work correctly when executing a pipeline with a solid subselection
Fixed an issue where heartbeats from the dagster-daemon process would not appear on the Status page in dagit until the process had been running for 30 seconds
When filtering runs, Dagit now suggests all “status:” values and other auto-completions in a scrolling list
Fixed asset catalog where nested directory structure links flipped back to the flat view structure
DagsterInstance.get() no longer falls back to an ephemeral instance if DAGSTER_HOME is not set. We don’t expect this to break normal workflows. This change allows our tooling to be more consistent around it’s expectations. If you were relying on getting an ephemeral instance you can use DagsterInstance.ephemeral() directly.
Undocumented attributes on HookContext have been removed. step_key and mode_def have been documented as attributes.
Added a permanent, linkable panel in the Run view in Dagit to display the raw compute logs.
Added more descriptive / actionable error messages throughout the config system.
When viewing a partitioned asset in Dagit, display only the most recent materialization for a partition, with a link to view previous materializations in a dialog.
When viewing a run in Dagit, individual log line timestamps now have permalinks. When loading a timestamp permalink, the log table will highlight and scroll directly to that line.
The default config_schema for all configurable objects - solids, resources, IO managers, composite solids, executors, loggers - is now Any. This means that you can now use configuration without explicitly providing a config_schema. Refer to the docs for more details: https://docs.dagster.io/concepts/configuration/config-schema.
When launching an out of process run, resources are no longer initialized in the orchestrating process. This should give a performance boost for those using out of process execution with heavy resources (ie, spark context).
input_defs and output_defs on @solid will now flexibly combine data that can be inferred from the function signature that is not declared explicitly via InputDefinition / OutputDefinition. This allows for more concise defining of solids with reduced repetition of information.
[Helm] Postgres storage configuration now supports connection string parameter keywords.
The Status page in Dagit will now display errors that were surfaced in the dagster-daemon process within the last 5 minutes. Previously, it would only display errors from the last 30 seconds.
Hanging sensors and schedule functions will now raise a timeout exception after 60 seconds, instead of crashing the dagster-daemon process.
Fixed the raw compute logs in Dagit, which were not live updating as the selected step was executing.
Fixed broken links in the Backfill table in Dagit when Dagit is started with a --prefix-path argument.
Showed failed status of backfills in the Backfill table in Dagit, along with an error stack trace. Previously, the backfill jobs were stuck in a Requested state.
Previously, if you passed a non-required Field to the output_config_schema or input_config_schema arguments of @io_manager, the config would still be required. Now, the config is not required.
Fixed nested subdirectory views in the Assets catalog, where the view switcher would flip back from the directory view to the flat view when navigating into subdirectories.
Fixed an issue where the dagster-daemon process would crash if it experienced a transient connection error while connecting to the Dagster database.
Fixed an issue where the dagster-airflow scaffold command would raise an exception if a preset was specified.
Fixed an issue where Dagit was not including the error stack trace in the Status page when a repository failed to load.