Edgewall Software
Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#11756 closed defect (fixed)

Missing svn commit log message in ticket comment

Reported by: joop.van.bussel@… Owned by: Jun Omae
Priority: normal Milestone: 1.0.3
Component: ticket system Version: 0.12-stable
Severity: normal Keywords: CommitTicketUpdater needinfo
Cc: fschophuizen@…, Ryan J Ollos Branch:
Release Notes:

Warning is logged when notifying repository change listeners if explicit synchronization is configured for the repository.

API Changes:
Internal Changes:

Description (last modified by Jun Omae)

Ocassionally we are missing svn commit log messages referring a ticket as a ticket comment. There are no strange messages in the trac log. Is this a know bug? Are there conditions when the creation of the comment is left out?

Configuration of the commit updater:

commit_ticket_update_envelope =
commit_ticket_update_commands.close = #!NO#!
commit_ticket_update_commands.refs = <ALL>
commit_ticket_update_check_perms = false
commit_ticket_update_notify = true

Attachments (0)

Change History (14)

comment:1 by Jun Omae, 6 years ago

Description: modified (diff)
Keywords: CommitTicketUpdater added

comment:2 by Jun Omae, 6 years ago

Component: generalticket system

comment:3 by Ryan J Ollos, 6 years ago

We see this issue from time to time on trac-hacks.org. I have no clues as to what the cause might be.

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

comment:4 by fschophuizen@…, 6 years ago

The issue is not listed as a known issue on the CommitTicketUpdater page. Where was this issue discussed before on track-hacks.org?

comment:5 by Frank Schophuizen <fschophuizen@…>, 6 years ago

Cc: fschophuizen@… added

in reply to:  4 ; comment:6 by Ryan J Ollos, 6 years ago

Cc: Ryan J Ollos added

Replying to fschophuizen@…:

The issue is not listed as a known issue on the CommitTicketUpdater page. Where was this issue discussed before on track-hacks.org?

It was mentioned in several tickets on trac-hacks.org over the years, but there isn't any useful information in those tickets so I won't bother trying to search for them now.

I wonder if the issue could be similar to #11767, see comment:2:ticket:11767. Are you using explicit synchronization in the post-commit hook and have a non-empty value for [trac] repository_sync_per_request?

After reading comment:2:ticket:11767 I checked the configuration on trac-hacks.org and see that we do have [trac] repository_sync_per_request = (default) and are using explicit synchronization in SVN's post-commit hook (using tags/trac-1.0.1/contrib/trac-svn-hook). I'll change to [trac] repository_sync_per_request = later this evening and do some testing.

in reply to:  6 ; comment:7 by Jun Omae, 6 years ago

Replying to rjollos:

After reading comment:2:ticket:11767 I checked the configuration on trac-hacks.org and see that we do have [trac] repository_sync_per_request = (default) and are using explicit synchronization in SVN's post-commit hook (using tags/trac-1.0.1/contrib/trac-svn-hook). I'll change to [trac] repository_sync_per_request = later this evening and do some testing.

Should we check whether repository is not listed in the option when changeset added and changeset modified are called, like this?

  • trac/versioncontrol/api.py

    diff --git a/trac/versioncontrol/api.py b/trac/versioncontrol/api.py
    index 3046092..39fb808 100644
    a b class RepositoryManager(Component):  
    671671                          base or reponame)
    672672            return
    673673        for repos in sorted(repositories, key=lambda r: r.reponame):
     674            reponame = repos.reponame or '(default)'
     675            if reponame in self.repository_sync_per_request:
     676                self.log.warn("Repository '%s' should be removed from [trac] "
     677                              "repository_sync_per_request for explicit "
     678                              "synchronization", reponame)
    674679            repos.sync()
    675680            for rev in revs:
    676681                args = []
    class RepositoryManager(Component):  
    685690                    except NoSuchChangeset:
    686691                        continue
    687692                self.log.debug("Event %s on %s for revision %s",
    688                                event, repos.reponame or '(default)', rev)
     693                               event, reponame, rev)
    689694                for listener in self.change_listeners:
    690695                    getattr(listener, event)(repos, changeset, *args)
    691696

in reply to:  7 ; comment:8 by Ryan J Ollos, 6 years ago

Replying to jomae:

Should we check whether repository is not listed in the option when changeset added and changeset modified are called, like this?

Yeah, that looks like a good idea. Your changes test out well for me on the trunk.

in reply to:  6 comment:9 by Ryan J Ollos, 6 years ago

Replying to rjollos:

I wonder if the issue could be similar to #11767, see comment:2:ticket:11767. Are you using explicit synchronization in the post-commit hook and have a non-empty value for [trac] repository_sync_per_request?

Using explicit synchronization on every request seems like it would reduce performance, but I haven't yet found a mechanism by which it might prevent the post-commit hook from inserting a changeset message. The mechanisms I had in mind don't seem probable based on further study of the code, but I'll do some more testing to be sure.

in reply to:  8 ; comment:10 by Ryan J Ollos, 6 years ago

Release Notes: modified (diff)

Replying to rjollos:

Replying to jomae:

Should we check whether repository is not listed in the option when changeset added and changeset modified are called, like this?

Yeah, that looks like a good idea. Your changes test out well for me on the trunk.

Change committed to 1.0-stable in [13337], merged in [13338].

comment:11 by Ryan J Ollos, 6 years ago

Keywords: needinfo added
Milestone: 1.0.3

Need feedback on whether setting [trac] repository_sync_per_request = fixes the issue. Ticket will be closed by end of 1.0.3 (Jan 1st) if there is no feedback.

in reply to:  10 comment:12 by Peter Suter, 6 years ago

Replying to rjollos:

Change committed to 1.0-stable in [13337], merged in [13338].

Because of [13393] this check needs to be removed / changed: #11885

comment:13 by Ryan J Ollos, 6 years ago

Resolution: fixed
Status: newclosed

Closing since there has been no feedback, but if additional information is given we will be happy to help continue debugging the issue.

comment:14 by Ryan J Ollos, 6 years ago

Owner: set to Jun Omae

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.