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

[external-assets] Change error to warning for duplicate assets when constructing ExternalAssetGraph #20062

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

smackesey
Copy link
Collaborator

@smackesey smackesey commented Feb 26, 2024

Summary & Motivation

#19900 introduced a check in the construction of ExternalAssetGraph that would throw an error if two materializable or observable defs having the same key were detected in a deployment (this is an invalid state). However, after running a shadow script against customer deployments, I discovered that ~3% of active deployments have this problem, so I am changing it to a warning (and making the message more informative) until we can find a clean strategy to message our customers who have this problem.

How I Tested These Changes

New test.

@smackesey
Copy link
Collaborator Author

@smackesey smackesey force-pushed the sean/external-assets-duplicate-error-message branch from 7445c24 to 36d7eb7 Compare February 26, 2024 20:05
@smackesey smackesey changed the title [external-assets] Improve error message for duplicate assets when constructing ExternalAssetGraph [external-assets] Change error to warning for duplicate assets when constructing ExternalAssetGraph Feb 26, 2024
@smackesey smackesey marked this pull request as ready for review February 26, 2024 20:11
Comment on lines +404 to +407
warnings.warn(
f"Found {execution_type.value} nodes for some asset keys in multiple code locations."
f" Only one {execution_type.value} node is allowed per asset key. Duplicates:\n {duplicate_str}"
)
Copy link
Member

Choose a reason for hiding this comment

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

echoing a concern raised in discussions else where so its recorded here

I think this will only show up in the daemon / webserver, which a user might catch in local dev but in a deployed contex is unlikely to be observed. Improving that effectively requires some UI surface area to highlight these global asset graph problems, much like we have talked about in the past for cycles.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@smackesey smackesey merged commit b649d63 into master Feb 26, 2024
1 check passed
@smackesey smackesey deleted the sean/external-assets-duplicate-error-message branch February 26, 2024 20:33
cmpadden pushed a commit that referenced this pull request Feb 28, 2024
…onstructing ExternalAssetGraph (#20062)

## Summary & Motivation

#19900 introduced a check in the construction of `ExternalAssetGraph`
that would throw an error if two materializable or observable defs
having the same key were detected in a deployment (this is an invalid
state). However, after running a shadow script against customer
deployments, I discovered that ~3% of active deployments have this
problem, so I am changing it to a warning (and making the message more
informative) until we can find a clean strategy to message our customers
who have this problem.

## How I Tested These Changes

New test.
PedramNavid pushed a commit that referenced this pull request Mar 28, 2024
…onstructing ExternalAssetGraph (#20062)

## Summary & Motivation

#19900 introduced a check in the construction of `ExternalAssetGraph`
that would throw an error if two materializable or observable defs
having the same key were detected in a deployment (this is an invalid
state). However, after running a shadow script against customer
deployments, I discovered that ~3% of active deployments have this
problem, so I am changing it to a warning (and making the message more
informative) until we can find a clean strategy to message our customers
who have this problem.

## How I Tested These Changes

New test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants