Skip to content

mercurial: fix the case insensitive matching when handling retry errors - #103

Merged
abpostelnicu merged 2 commits into
mozilla:masterfrom
suhaibmujahid:fix-case
Jun 30, 2023
Merged

abpostelnicu merged 2 commits into
mozilla:masterfrom
suhaibmujahid:fix-case

Conversation

@suhaibmujahid

Copy link
Copy Markdown
Member

This is a followup on #102

@suhaibmujahid suhaibmujahid changed the title mercurial: fix case insensitive matching when handling retry errors mercurial: fix the case insensitive matching when handling retry errors Jun 29, 2023
Comment thread libmozevent/mercurial.py Outdated
"push failed on remote",
"stream ended unexpectedly",
"error: EOF occurred in violation of protocol",
"error: eof occurred in violation of protocol",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abpostelnicu sorry I did not catch this in the review of #102 :(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not do this. Since as we tend to see in the logs new error messages we add them to the list and by doing so this would mean to do the lower by hand.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it in 84664f2 to be done automatically.

Comment thread libmozevent/mercurial.py Outdated
"push failed on remote",
"stream ended unexpectedly",
"error: EOF occurred in violation of protocol",
"error: eof occurred in violation of protocol",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not do this. Since as we tend to see in the logs new error messages we add them to the list and by doing so this would mean to do the lower by hand.

Comment thread libmozevent/mercurial.py Outdated
]
error = error.lower()
for eligible_message in eligible_errors:
if eligible_message in error:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be eligible_message.lower()

@suhaibmujahid suhaibmujahid Jun 29, 2023

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this replaces lower() in self.is_eligible_for_retry(error_log.lower())

@abpostelnicu
abpostelnicu merged commit 63fd4ce into mozilla:master Jun 30, 2023
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.

2 participants