[Asterisk-code-review] digium commits.py: Fix parsing crashes and add error feedback. (repotools[master])

Benjamin Keith Ford asteriskteam at digium.com
Wed Jan 3 10:29:20 CST 2018


Hello George Joseph, Joshua Colp, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/7718

to look at the new patch set (#3).

Change subject: digium_commits.py: Fix parsing crashes and add error feedback.
......................................................................

digium_commits.py: Fix parsing crashes and add error feedback.

The mkrelease.py script could crash when attempting to parse a commit message
that was not properly formatted. For example, opening parentheses would be
detected, and the script would parse until the index of a closing parentheses.
If there was no closing parentheses, the release script would crash.

This is a two-step fix. The first step is to ensure that when an error like
this occurs, the script does not fail. Try except blocks have been added to
parsing sections that can cause known crashes. When an error is detected, the
new errors list in the DigiumCommitMessageParser class will have the error
appended to it.

The second step will use this error message to provide feedback when a review
is submitted to Gerrit. Jenkins will run a job that goes through some of the
parsing, gathers errors with the parse_commit.py script, and reports them back
in the form of a -1 on the code review, along with the error messages
themselves.

Change-Id: Ibd5c86d69d32bc95d93c0cc81851083410d082a4
---
M digium_commits.py
A parse_commit.py
2 files changed, 39 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/repotools refs/changes/18/7718/3
-- 
To view, visit https://gerrit.asterisk.org/7718
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibd5c86d69d32bc95d93c0cc81851083410d082a4
Gerrit-Change-Number: 7718
Gerrit-PatchSet: 3
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180103/7a798893/attachment.html>


More information about the asterisk-code-review mailing list