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

[Core feature] Improved error message with maptasks: using it within a task should error out #3509

Open
2 tasks done
cosmicBboy opened this issue Mar 21, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request flytekit FlyteKit Python related issue good first issue Good for newcomers improve-error-message UX Issues that require UX-Design

Comments

@cosmicBboy
Copy link
Contributor

Motivation: Why do you think this is important?

Flytekit should raise a runtime error when map tasks are written in any of the following contexts:

  • When a user tries to write a map_task within a task function body
@task
def t1():
    map_task(...)(...)
  • When a user tries to define a map_task at the module-level scope
@map_task
@task
def t1(): ...

or

@task
def t1(): ...


my_map_task = map_task()(t1)

Goal: What should the final outcome look like, ideally?

The error should make it clear that map_tasks can only be defined in workflow function bodies.

Describe alternatives you've considered

NA

Propose: Link/Inline OR Additional context

No response

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@cosmicBboy cosmicBboy added enhancement New feature or request untriaged This issues has not yet been looked at by the Maintainers labels Mar 21, 2023
@pingsutw pingsutw added flytekit FlyteKit Python related issue UX Issues that require UX-Design improve-error-message good first issue Good for newcomers and removed untriaged This issues has not yet been looked at by the Maintainers labels Dec 22, 2023
@davidlin20dev
Copy link

#take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request flytekit FlyteKit Python related issue good first issue Good for newcomers improve-error-message UX Issues that require UX-Design
Projects
None yet
Development

No branches or pull requests

3 participants