Page MenuHomeElementl

[crag] permit resource instances on to_job
AbandonedPublic

Authored by cdecarolis on Jun 28 2021, 3:44 PM.

Details

Summary

Helps with less verbose testing story; people don't have to call .hardcoded_resource or .hardcoded_io_manager. Probably going to consolidate this implementation with that from build_resources.

Test Plan

Unit tests

Diff Detail

Repository
R1 dagster
Branch
resource_instances_job
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 28 2021, 4:07 PM
Harbormaster failed remote builds in B32733: Diff 40318!
Harbormaster returned this revision to the author for changes because remote builds failed.Jun 28 2021, 4:56 PM
Harbormaster failed remote builds in B32737: Diff 40331!

I'm not sure I have a strong stance on this one

  • the deferred construction pattern of resource_defs is good in a lot of situations, not a bad "pit of success"
  • taking instances directly is good for ramp up, simple cases, and pretty user friendly

I could go either way

I had originally been a strong proponent of this, but, having reviewed the resources in our dogfood pipelines, I'm less sure. It's only really the IOManagers that would benefit from this. I wonder if it would make more sense to just make it a little less verbose to make a hardcoded resource. Right now it requires ResourceDefinition.hardcoded_resource. We could make hardcoded_resource a top-level API?

This revision is now accepted and ready to land.Jul 13 2021, 5:23 PM

Oops accepted by accident

This revision now requires changes to proceed.Jul 13 2021, 5:24 PM
cdecarolis abandoned this revision.

Move to a more ergonomic hardcoded resource API instead of this.