Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error t.partition.split is not a function when viewing paritions #26793

Open
fboerman opened this issue Jan 2, 2025 · 3 comments
Open

error t.partition.split is not a function when viewing paritions #26793

fboerman opened this issue Jan 2, 2025 · 3 comments
Labels
area: partitions Related to Partitions area: UI/UX Related to User Interface and User Experience type: bug Something isn't working

Comments

@fboerman
Copy link

fboerman commented Jan 2, 2025

What's the issue?

when clicking on a partition of an asset in the dagster web UI I get:

Sorry, page can't be displayed.Please report this error to the Dagster team via GitHub or Slack. Refresh the page to try again.
t.partition.split is not a function

What did you expect to happen?

that the UI shows me details of the partition

How to reproduce?

define an asset with MultiPartitionsDefinition and go in the UI to assets -> partitions -> click on a partition

Dagster version

dagster, version 1.9.6

Deployment type

Local

Deployment details

this was in local dev environment

Additional information

No response

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.

@fboerman fboerman added the type: bug Something isn't working label Jan 2, 2025
@fboerman
Copy link
Author

fboerman commented Jan 2, 2025

after further investigation it seems this happens when I have partitions with values of "true" and "false" this bugs the selector somehow

@garethbrickman garethbrickman added area: UI/UX Related to User Interface and User Experience area: partitions Related to Partitions labels Jan 3, 2025
@garethbrickman
Copy link
Contributor

garethbrickman commented Jan 3, 2025

Confirming I was able to reproduce this using the below code:

from dagster import (
    AssetExecutionContext,
    MultiPartitionsDefinition,
    StaticPartitionsDefinition,
    asset,
    Definitions
)

@asset(
    partitions_def=MultiPartitionsDefinition(
        {
            "boolean": StaticPartitionsDefinition(["true", "false"]),
            "color": StaticPartitionsDefinition(["red", "yellow", "blue"]),
        }
    )
)
def multi_partitions_asset(context: AssetExecutionContext):
    partition_keys = context.partition_key.keys_by_dimension
    context.log.info(f"Boolean: {partition_keys['boolean']}, Color: {partition_keys['color']}")


defs = Definitions(assets=[multi_partitions_asset])

Screenshot 2025-01-03 at 15 00 19

Screenshot 2025-01-03 at 15 00 27

@bengotow
Copy link
Collaborator

bengotow commented Jan 4, 2025

Hmm offhand I think we must have URL querystring parsing in place that automatically coerces numeric and boolean types. I think it was a pain dealing with query string values like "false" because they were truthy strings by default.

I think a quick fix for this specific callsite would be to do something like this, but we may need to continue using the app and view other pages, etc. to make sure it doesn't pop up elsewhere! I think this is one of the only places partition names are serialized alone into the URL though.

`${t.partition}`.split...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: partitions Related to Partitions area: UI/UX Related to User Interface and User Experience type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants