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

Add map index to task logs for mapped task runs. #2402

Merged
merged 2 commits into from
Apr 24, 2020

Conversation

emreakg
Copy link

@emreakg emreakg commented Apr 24, 2020

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 (not appropriate)

Note that your PR will not be reviewed unless all three boxes are checked.

What does this PR change?

Task runs that are mapped now logs their map index alongside their task name, similar to TaskRunners '{name}[{index}]: Starting rask run' logs.

Why is this PR important?

Enables easy identification of which task log belongs to which task, in parallelized flow runs.

@marvin-robot
Copy link
Member

Here I am, brain the size of a planet and they ask me to welcome you to Prefect.

So, welcome to the community @Fraznist! 🎉 🎉

@codecov
Copy link

codecov bot commented Apr 24, 2020

Codecov Report

Merging #2402 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@joshmeek
Copy link

joshmeek commented Apr 24, 2020

Hey @Fraznist I'm running this branch and I don't actually notice a difference in the logs 🤔

image

image

On the left is a log from your branch and on the right is with the current master build. The master build appears to already have the mapped index in the logs as this PR expects.

@emreakg
Copy link
Author

emreakg commented Apr 24, 2020

Hey @joshmeek . You are right, TaskRunners already include the map index in their name. I have added map indexes to logs emitted from within task.run() implementations. In your case you can't spot a difference because I believe none of your tasks log anything to the logger within their run() implementation.
image
On the left is my branch, the right side is the current master branch.
I am sorry if I wasn't clear enough in the PR message.

@joshmeek
Copy link

Ah okay I misread @Fraznist! Looks great!

@joshmeek joshmeek merged commit a66697e into PrefectHQ:master Apr 24, 2020
@emreakg
Copy link
Author

emreakg commented Apr 24, 2020

🎉

@emreakg emreakg deleted the map-index-log branch March 23, 2022 07:26
zanieb pushed a commit that referenced this pull request Jul 21, 2022
BUG: Deleting a block does not route the application back to the blocks overview
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.

3 participants