Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12412 closed defect (fixed)

Ticket overview not updating review status

Reported by: massimo.b@… Owned by: Ryan J Ollos
Priority: normal Component: CodeReviewerPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

Trac: 1.0.5

With revision 14726 from SVN I'm able to accept or reject codereviews (was failing before with "DataError: integer out of range"). However the ticket overwiew says

  • "Code review status: open"

on that change while the change itself already says

  • "Code review status is rejected. Update status and view/add a summary below."

I did a full reload on the ticket, cleaned the cookies, restarted uWSGI, but still the same issue.

Attachments (0)

Change History (21)

comment:1 Changed 9 years ago by Ryan J Ollos

Which status is out of sync, the status displayed on the ticket or the status displayed on the code review page? Could you check the log file to see if there are any tracebacks? Are you using PostgreSQL or MySQL?

comment:2 Changed 9 years ago by Ryan J Ollos

Owner: changed from Rob Guttman to Ryan J Ollos
Status: newaccepted

comment:3 Changed 9 years ago by massimo.b@…

Status of the ticket is outdated. Status of the change itself with review comments is updated correctly after changing the review status. No tracebacks in the log (ERROR) when reading the ticket or the change. This is PostgreSQL.

comment:4 Changed 9 years ago by Ryan J Ollos

Was the commit made before or after you installed CodeReviewerPlugin? If it was made before, could you try creating a code review (i.e. commit a changeset referencing a ticket) after the plugin is installed and see if the ticket status is correct for that case?

There is a utility for populating the codereviewer_map table to handle changesets created before the CodeReviewerPlugin is installed (codereviewerplugin/1.0/coderev/util). However, some work is needed to make the utility compatible with PostgreSQL.

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

comment:5 Changed 9 years ago by Ryan J Ollos

Summary: Ticket overwiew not updating review statusTicket overview not updating review status

comment:6 in reply to:  4 Changed 9 years ago by massimo.b@…

Replying to rjollos:

Was the commit made before or after you installed CodeReviewerPlugin? If it was made before, could you try creating a code review (i.e. commit a changeset referencing a ticket) after the plugin is installed and see if the ticket status is correct for that case?

There is a utility for populating the codereviewer_map table to handle changesets created before the CodeReviewerPlugin is installed (codereviewerplugin/1.0/coderev/util). However, some work is needed to make the utility compatible with PostgreSQL.

The commit was done when the CodeReviewerPlugin svn version from about 1 month ago was installed. Yesterday I installed the recent svn because code review was failing (..integer out of range).

Does that mean I would loose all code review status on tickets when installing future versions?

I tried with a new change done after the latest svn version was installed, but it is the same issue: Ticket overview does not update according to review status.

comment:7 Changed 9 years ago by Ryan J Ollos

Which VCS is your repository connected to? I've only tested with Subversion so far.

comment:8 Changed 9 years ago by massimo.b@…

It's a git repo with a custom cronjob doing git p4 sync. But for Trac it's a git.

comment:9 Changed 9 years ago by massimo.b@…

btw. as git is today's most used VCS, followed by hg in my opinion, I would provide the git API the most effort in Trac. Subversion was some default in earlier days and I wonder it still seems to be wide-spread in trac-hacks.org

comment:10 Changed 9 years ago by Ryan J Ollos

The Trac API for working with Git and Subversion is the same, so if properly coded it should work equally well with all VCS that are supported by Trac. I had a client that was using Subversion, that is why I put effort towards improving the plugin and testing with Subversion. I don't see what the problem could be for a VCS other than Subversion, but I'll do some testing in the next few days when I can find some free time.

Do you have multiple repositories? Is the repository you've seen the issue with the (default) repository, or is it a named repository?

For a ticket comment in which the repository status is not updating correctly, could you click Edit on the comment, copy the raw markup for the comment and paste it here in a code block ({{{ }}})?

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

comment:11 Changed 9 years ago by massimo.b@…

I have 4 of these git-p4 repos, identically setup, all 4 are named repositories. I haven't checked for the other 3.

EDIT:

In [changeset:"91aa18c/metakr" 91aa18c/metakr]:
{{{
#!CommitTicketReference repository="metakr" revision="91aa18c"
[ticket #42] Localization [de]
* Code reviews integrated
[git-p4: depot-paths = "//METAKR/": change = 408860]
}}}

comment:12 Changed 9 years ago by Ryan J Ollos

Thanks. I have an idea of what the problem might be. I'll have a change for you to test within a few hours.

comment:13 Changed 9 years ago by Ryan J Ollos

In 14736:

1.0.0dev: Use long rev when creating CodeReviewer object. Refs #12412.

The rev string passed as a CommitTicketReferenceMacro arg will be shortened in the case of a hash (Git or Hg). The full hash is obtained after retrieving a changeset object. This change has only been tested with Subversion, but is hypothesized to fix an issue with the code review status in CommitTicketReferenceMacro not updating when using Git.

comment:14 Changed 9 years ago by Ryan J Ollos

Would you please try [14736] and report back? Thanks!

comment:15 Changed 9 years ago by massimo.b@…

I tried [14736] and [14737]. Both still do not update the ticket page.

comment:16 Changed 9 years ago by Ryan J Ollos

In 14738:

1.0.0dev: Use short rev in ticket comment. Refs #12412.

comment:17 in reply to:  11 Changed 9 years ago by Ryan J Ollos

Replying to massimo.b@…:

I have 4 of these git-p4 repos, identically setup, all 4 are named repositories. I haven't checked for the other 3.

I can reproduce when I shorten the revision string to 7 characters. The question is, why is the revision string only 7 characters in your ticket comment? Are you not using the default CommitTicketUpdater?

comment:18 Changed 9 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 14739:

1.0.0dev: Handle shortened rev string. Fixes #12412.

comment:19 Changed 9 years ago by Ryan J Ollos

You may want to follow #12414. I've been seeing a new intermittent issue in which not all the reviews are initially shown after a new review is posted.

comment:20 Changed 9 years ago by Massimo

Fixed in 14742: Thanks.

I have

[components]
tracopt.ticket.commit_updater.* = enabled
tracopt.ticket.commit_updater.committicketreferencemacro = enabled
tracopt.ticket.commit_updater.committicketupdater = enabled

[ticket]
commit_ticket_update_check_perms = true
commit_ticket_update_commands.close = 
commit_ticket_update_commands.refs = <ALL>
commit_ticket_update_envelope = []
commit_ticket_update_notify = true

I re-enabled committicketreferencemacro different from the CodeReviewerPlugin documentation because this was breaking something else I can't remember. Does that cause any problems?

Last edited 9 years ago by Massimo (previous) (diff)

comment:21 Changed 9 years ago by Ryan J Ollos

You should disable CommitTicketReferenceMacro:

tracopt.ticket.commit_updater.committicketreferencemacro = disabled

CodeReviewerPlugin has a version of this macro with the extended functionality of providing status of the review. I suspect it would cause problems to have both enabled.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.