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] Build base asset jobs using AssetGraph #20227

Merged

Conversation

smackesey
Copy link
Collaborator

@smackesey smackesey commented Mar 3, 2024

Summary & Motivation

Reap some benefits of the new AssetGraph. Construct the base jobs for a repository from the asset graph instead of lists of assets and checks.

How I Tested These Changes

Existing test suite.

@smackesey smackesey force-pushed the sean/allow-mixed-asset-jobs branch from a3983e7 to 8ecfe36 Compare March 4, 2024 00:01
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch 2 times, most recently from 2f5ded7 to f5a18c0 Compare March 4, 2024 12:59
@smackesey smackesey force-pushed the sean/allow-mixed-asset-jobs branch from 8ecfe36 to 61f2d54 Compare March 4, 2024 14:12
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch 2 times, most recently from 6e9f0d2 to 3320908 Compare March 4, 2024 14:15
@smackesey smackesey force-pushed the sean/allow-mixed-asset-jobs branch from 61f2d54 to 7da9c0f Compare March 4, 2024 16:56
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from 3320908 to 0faa6b0 Compare March 4, 2024 16:56
@smackesey smackesey force-pushed the sean/allow-mixed-asset-jobs branch from 7da9c0f to a636256 Compare March 4, 2024 18:23
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from 0faa6b0 to 6a08c42 Compare March 4, 2024 18:23
@smackesey smackesey force-pushed the sean/allow-mixed-asset-jobs branch from a636256 to d61c5bf Compare March 4, 2024 20:29
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from 6a08c42 to 7ff96a5 Compare March 4, 2024 20:29
@smackesey smackesey force-pushed the sean/allow-mixed-asset-jobs branch 2 times, most recently from 77b327a to 4d232d2 Compare March 5, 2024 14:36
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from 7ff96a5 to 0b9554c Compare March 5, 2024 14:36
@smackesey smackesey force-pushed the sean/allow-mixed-asset-jobs branch from 4d232d2 to 87d4d8f Compare March 5, 2024 18:12
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from 0b9554c to e953bd4 Compare March 5, 2024 18:12
@smackesey smackesey force-pushed the sean/allow-mixed-asset-jobs branch from 87d4d8f to d0aaa70 Compare March 5, 2024 18:34
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from e953bd4 to f54d8d2 Compare March 5, 2024 18:34
@smackesey smackesey force-pushed the sean/allow-mixed-asset-jobs branch from ec160de to 9b18924 Compare March 7, 2024 17:21
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from f2fca55 to a92823f Compare March 7, 2024 17:21
@smackesey smackesey force-pushed the sean/allow-mixed-asset-jobs branch from 9b18924 to 86ebf75 Compare March 7, 2024 18:02
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from a92823f to ae24e81 Compare March 7, 2024 18:02
@smackesey smackesey force-pushed the sean/allow-mixed-asset-jobs branch from 86ebf75 to 06e3dba Compare March 8, 2024 14:10
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch 2 times, most recently from c89e7a3 to aa172c5 Compare March 8, 2024 14:15
@smackesey smackesey changed the base branch from sean/allow-mixed-asset-jobs to sean/external-assets-asset-checks March 8, 2024 14:23
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from aa172c5 to 388323d Compare March 8, 2024 14:23
@smackesey smackesey force-pushed the sean/external-assets-asset-checks branch from 96c8dd2 to aca467d Compare March 8, 2024 16:17
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from 388323d to 12501b8 Compare March 8, 2024 16:17
def res_upstream(context):
return context.resources.foo

@asset(required_resource_keys={"foo"})
@asset
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tests using this were looking for res_midstream to be flagged specifically in the error message, when the same error would be thrown for all res_upstream, res_downstream as well. The reason the test did not previously fail is that res_midstream was incidentally being processed first, so that's where the error was.

The adjustment to base asset job creation in this PR causes res_midstream to no longer be processed first (which does not matter), but broke this test. Therefore I removed the required_resource_keys on res_upstream/res_downstream, as this fixed the failing test and none of the other tests using these assets actually depends on res_upstream/res_downstream having these req'd keys.

@smackesey smackesey marked this pull request as ready for review March 8, 2024 16:35
@smackesey smackesey requested a review from schrockn March 8, 2024 16:35
@smackesey smackesey force-pushed the sean/external-assets-asset-checks branch from aca467d to 7408446 Compare March 11, 2024 13:10
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from 12501b8 to 8ce31aa Compare March 11, 2024 13:10
@smackesey smackesey force-pushed the sean/external-assets-asset-checks branch from 7408446 to f104d31 Compare March 11, 2024 14:49
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from 8ce31aa to 0138965 Compare March 11, 2024 14:49
Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

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

tommynice

@smackesey smackesey force-pushed the sean/external-assets-asset-checks branch from f104d31 to 1c30a6b Compare March 11, 2024 17:03
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from 0138965 to bff9f3d Compare March 11, 2024 17:03
Base automatically changed from sean/external-assets-asset-checks to master March 11, 2024 17:05
@smackesey smackesey force-pushed the sean/external-assets-build-asset-jobs-with-asset-graph branch from bff9f3d to 6674779 Compare March 11, 2024 17:06
@smackesey smackesey merged commit 2b0c777 into master Mar 11, 2024
1 check was pending
@smackesey smackesey deleted the sean/external-assets-build-asset-jobs-with-asset-graph branch March 11, 2024 17:30
PedramNavid pushed a commit that referenced this pull request Mar 28, 2024
## Summary & Motivation

Reap some benefits of the new `AssetGraph`. Construct the base jobs for
a repository from the asset graph instead of lists of assets and checks.

## How I Tested These Changes

Existing test suite.
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