-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
type: bugSomething isn't workingSomething isn't working
Description
What's the issue?
Dagster allows creation of Assets with characters like .
, but throws an error when trying to create an Asset Check referencing an Asset with a .
in the key.
The Error:
dagster._core.errors.DagsterInvalidDefinitionError: "bad.asset.name" is not a valid name in Dagster. Names must be in regex ^[A-Za-z0-9_]+$.
What did you expect to happen?
@dg.asset should reject names with .
(and all other characters outside the allow list)
OR
@dg.asset_check should allow names with .
(and all other characters outside the allow list)
How to reproduce?
-
Create a quickstart project up through step 2 (see here).
-
Put the following code in the
assets.py
file created by Step 2 of the quickstart:
import dagster as dg
## works even though the name is invalid (contains '.')
@dg.asset(key="bad.asset.name")
def bad_asset_fn():
pass
# also works even though the name is invalid (contains '.')
bad_asset_job = dg.define_asset_job(name="bad_asset_job", selection=["bad.asset.name"])
## Uncomment and dagster definitions will fail to load due to invalid names
@dg.asset_check(asset="bad.asset.name", name="bad_check")
def bad_check():
return dg.AssetCheckResult(passed=True)
@dg.asset(key="good_asset_name")
def good_asset_fn():
pass
@dg.asset_check(asset="good_asset_name", name="good_check")
def good_check():
return dg.AssetCheckResult(passed=True)
- Run
dagster definitions validate
ordagster dev
, which returns an error:
dagster._core.errors.DagsterInvalidDefinitionError: "bad.asset.name" is not a valid name in Dagster. Names must be in regex ^[A-Za-z0-9_]+$.
- Comment out the
bad_check
Asset Check and rundagster definitions validate
ordagster dev
- should succeed. The Asset and the Asset Job are both visibile in the UI.
Dagster version
1.11.14
Deployment type
Local
Deployment details
Created a local deployment using the quickstart (up through step 2). Just using dagster dev
/ dagster definitions validate
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
Metadata
Metadata
Assignees
Labels
type: bugSomething isn't workingSomething isn't working