-
Notifications
You must be signed in to change notification settings - Fork 114
public_inbox: Fix email threads without an available root message #369
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
Open
mripard
wants to merge
4
commits into
psss:main
Choose a base branch
from
mripard:rootless-email-thread
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks! Tested with my setup and this PR fixes the issue! |
Hi, @mripard 😄. I'm afraid I haven't reported anything; don't even know this project 🤔. Wrong username, maybe? |
Yeah, sorry, I meant @martinezjavier |
Can you please rebase? |
240b72c
to
1a02f14
Compare
1a02f14
to
ab4318b
Compare
acb1782
to
d67ea38
Compare
Some type hints were set to return a given type, while the function was actually returning that type, or a None object. Fix the type hints when relevant. Signed-off-by: Maxime Ripard <mripard@kernel.org>
Some messages will not be perfect, and will have inconsistent or missing headers. We were mostly handling them fine, but didn't log anything when that was happening, making debugging issues fairly difficult. Let's improve the logging a bit. Signed-off-by: Maxime Ripard <mripard@kernel.org>
Commit af2b8ac ("Fix pylint R1710") made __fetch_thread_root() return the original message argument if no thread root could be found. However, and even though it wasn't really handled yet, the intent was always to return None in such a case. Restore the previous behaviour, but in an explicit way this time, and we'll handle it in the callers in the next commit. Signed-off-by: Maxime Ripard <mripard@kernel.org>
A message can have an In-Reply-To header but the message it points to might not be available for some reason. In such a case, the Message.parent_id() method will return a proper value, but __fetch_thread_root() on that message might not and would return None. Let's handle that case by returning the latest message we found as the root message. Signed-off-by: Maxime Ripard <mripard@kernel.org>
d67ea38
to
a30cda7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
@stefano-garzarella and @javierm have been reporting on the public-inbox plugin #329 that they were having crashes.
It turns out that lore doesn't always manage to archive all the messages and we might find emails with a valid in-reply-to header, but can't retrieve the message from the ML archive.
This was partly due to an improper type annotation, so this PR fixes both the type annotations and the actual bug they were both facing.