AppendRevisionsOnlyViolation in import_package

Bug #806425 reported by Andrew Bennetts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Distributed Development
Fix Released
Critical
Vincent Ladeuil
Tags: regression

Related branches

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 806425] [NEW] AppendRevisionsOnlyViolation in import_package

On Wed, 06 Jul 2011 11:14:44 -0000, Andrew Bennetts <email address hidden> wrote:
> Public bug reported:
>
> This appears to be fallout from the fix for bug 248418: http://package-
> import.ubuntu.com/status/b3ba0ccc332f8240c26d74e6f44c997c.html
>
> Currently affected imports:
>
> http://package-import.ubuntu.com/status/ikvm.html
> http://package-import.ubuntu.com/status/libmailtools-perl.html
> http://package-import.ubuntu.com/status/libcap-ng.html
> http://package-import.ubuntu.com/status/schroot.html
> http://package-import.ubuntu.com/status/pacpl.html
>
> As this is a regression we may want to consider reverting r483 of lp:udd
> (the fix for bug 248418).

This looks like append_revisions_only is inherited to me?

I don't think that's what we want.

It did make me realise that there are occaisions that we push
--overwrite to Launchpad though (in the case of collisions at minimum),
and I don't think we can get rid of that without rethinking the way we
do that. Is there a way to override the setting temporarily, or do you
have to change it and change it back? I guess you could do that under a
write lock, which would be much like overriding temporarily?

Thanks,

James

Revision history for this message
Andrew Bennetts (spiv) wrote :

James Westby wrote:
[...]
> This looks like append_revisions_only is inherited to me?

Hmm, I don't think so. I wasn't particularly careful to only set
append_revisions_only on LP branches though, as I didn't expect the local
branches to need to behave differently to the LP branches here. Maybe I was
wrong?

[...]
> It did make me realise that there are occaisions that we push
> --overwrite to Launchpad though (in the case of collisions at minimum),
> and I don't think we can get rid of that without rethinking the way we
> do that. Is there a way to override the setting temporarily, or do you
> have to change it and change it back? I guess you could do that under a
> write lock, which would be much like overriding temporarily?

Taking a write lock like that would work. Later we might want to add a
force_non_append=True param to Branch.push (and perhaps the corresponding CLI
option) to make this simpler, but that's not urgent.

Revision history for this message
James Westby (james-w) wrote :

On Thu, 07 Jul 2011 02:43:14 -0000, Andrew Bennetts <email address hidden> wrote:
> James Westby wrote:
> [...]
> > This looks like append_revisions_only is inherited to me?
>
> Hmm, I don't think so. I wasn't particularly careful to only set
> append_revisions_only on LP branches though, as I didn't expect the local
> branches to need to behave differently to the LP branches here. Maybe I was
> wrong?

I hadn't really thought about it until I saw the backtraces :-)

Perhaps I just made it do whatever it is doing in a silly way, but it
may want to rewind sometimes (particularly during collision.)

> Taking a write lock like that would work. Later we might want to add a
> force_non_append=True param to Branch.push (and perhaps the corresponding CLI
> option) to make this simpler, but that's not urgent.

Indeed.

Thanks,

James

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 7/7/2011 4:43 AM, Andrew Bennetts wrote:
> James Westby wrote:
> [...]
>> This looks like append_revisions_only is inherited to me?
>
> Hmm, I don't think so. I wasn't particularly careful to only set
> append_revisions_only on LP branches though, as I didn't expect the local
> branches to need to behave differently to the LP branches here. Maybe I was
> wrong?

The specific pull that is failing in ikvm is a local tree. My guess is
something like:

 checkout upstream-X.Y.Z-1
 build and commit upstream-X.Y.Z
 pull --overwrite debian-X.Y.Z-1
 merge upstream-X.Y.Z and generate debian-X.Y.Z

Or something along those lines. The builder is probably resetting its
local tree pointer so that it can merge the previous one. So most likely
we need to revert your change for the local directories.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4Vl84ACgkQJdeBCYSNAANaPACgmEFYsvgt6fLFZENuJglTMU0T
zWMAmgL8iKlDsdOTHJLkgHTdBQE7QNmJ
=9X4Z
-----END PGP SIGNATURE-----

Andrew Bennetts (spiv)
Changed in udd:
assignee: nobody → Andrew Bennetts (spiv)
Vincent Ladeuil (vila)
Changed in udd:
assignee: Andrew Bennetts (spiv) → Vincent Ladeuil (vila)
status: Confirmed → In Progress
Revision history for this message
Vincent Ladeuil (vila) wrote :
Download full text (11.4 KiB)

Capturing the existing failures for later investigations once we settle on whether we want to activate append_revisions_only and if yes, in which cases.

There is, as of just now, 112 such failures across 4 call sites.

97 packages failed with key bzrlib.errors.AppendRevisionsOnlyViolation:<module>:main:import_package:import_package:_do_import_package:pull_version_from_branch:pull_write_locked:pull:pull:pull_write_locked:pull:_pull:update_revisions:update_revisions_write_locked:update_revisions:set_last_revision_info_write_locked:set_last_revision_info:_check_history_violation

Failed at 2011-08-16 15:23:10.757335

Traceback (most recent call last):
  File "/srv/package-import.canonical.com/new/scripts/import_package.py", line 1124, in <module>
    only_before=options.only_before))
  File "/srv/package-import.canonical.com/new/scripts/import_package.py", line 1047, in main
    bstore, push, possible_transports=possible_transports)
  File "/srv/package-import.canonical.com/new/scripts/import_package.py", line 620, in import_package
    use_time_from_changelog=True)
  File "/srv/package-import.canonical.com/new/scripts/plugins/builddeb/import_dsc.py", line 1286, in import_package
    pull_debian=pull_debian)
  File "/srv/package-import.canonical.com/new/scripts/plugins/builddeb/import_dsc.py", line 1148, in _do_import_package
    self.pull_version_from_branch(pull_branch, version)
  File "/srv/package-import.canonical.com/new/scripts/plugins/builddeb/import_dsc.py", line 766, in pull_version_from_branch
    self.tree.pull(pull_branch.branch, stop_revision=pull_revision)
  File "<string>", line 4, in pull_write_locked
  File "/usr/lib/pymodules/python2.6/bzrlib/workingtree.py", line 1676, in pull
    local=local)
  File "/usr/lib/pymodules/python2.6/bzrlib/branch.py", line 1089, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "<string>", line 4, in pull_write_locked
  File "/usr/lib/pymodules/python2.6/bzrlib/branch.py", line 3492, in pull
    merge_tags_to_master=not source_is_master)
  File "/usr/lib/pymodules/python2.6/bzrlib/branch.py", line 3602, in _pull
    overwrite=overwrite, graph=graph)
  File "/usr/lib/pymodules/python2.6/bzrlib/branch.py", line 1038, in update_revisions
    overwrite, graph)
  File "<string>", line 4, in update_revisions_write_locked
  File "/usr/lib/pymodules/python2.6/bzrlib/branch.py", line 3453, in update_revisions
    self.target.set_last_revision_info(stop_revno, stop_revision)
  File "<string>", line 4, in set_last_revision_info_write_locked
  File "/usr/lib/pymodules/python2.6/bzrlib/branch.py", line 2869, in set_last_revision_info
    self._check_history_violation(revision_id)
  File "/usr/lib/pymodules/python2.6/bzrlib/branch.py", line 2893, in _check_history_violation
    raise errors.AppendRevisionsOnlyViolation(self.user_url)
bzrlib.errors.AppendRevisionsOnlyViolation: Operation denied because it would change the main history, which is not permitted by the append_revisions_only setting on branch "/srv/package-import.canonical.com/new/updates/ant/sid/".

6 packages failed with key bzrlib.errors.AppendRevisionsOnlyViolation:<module>:main:import_package:import_package:_import...

Revision history for this message
Vincent Ladeuil (vila) wrote :

Deployed on jubany, no fallouts so far, still 76 to go, looks good.

Changed in udd:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.