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

Fix as_task bug #896

Merged
merged 5 commits into from
Apr 4, 2019
Merged

Fix as_task bug #896

merged 5 commits into from
Apr 4, 2019

Conversation

cicdw
Copy link
Member

@cicdw cicdw commented Apr 4, 2019

Thanks for contributing to Prefect!

Please describe your work and make sure your PR:

  • adds new tests (if appropriate)
  • updates CHANGELOG.md (if appropriate)
  • updates docstrings for any new functions or function arguments, including docs/outline.toml for API reference docs (if appropriate)

What does this PR change?

This PR fixes our as_task utility for auto-converting python objects to Prefect Tasks, specifically for callables and dictionaries. Closes #894

Why is this PR important?

as_task is used internally to track all task dependencies, including constants. This utility was implicitly assuming that dictionaries were only keyed by strings and also would attempt to convert all callables into FunctionTasks. This isn't actually possible because python builtins cannot be inspected via inspect.getfullargspec and consequently users were seeing errors when passing these types of objects around in their Flow.

@cicdw cicdw requested review from jlowin and joshmeek as code owners April 4, 2019 01:02
jlowin
jlowin previously approved these changes Apr 4, 2019
@cicdw cicdw merged commit 4894a5a into master Apr 4, 2019
@cicdw cicdw deleted the as-task-bugs branch April 4, 2019 14:08
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.

Unsupported types for unmapped
3 participants