NoSuchFile when generating merge pages on cleanup from last run

Bug #653773 reported by James Westby on 2010-10-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Distributed Development
High
Unassigned
James Westby (james-w) on 2010-10-02
description: updated
description: updated
John A Meinel (jameinel) wrote :

The traceback I saw included "push_back" which I think means the code reached the critical section, and now requires that everything gets pushed up before it will continue trying to do the import.

But while it is doing that, it seems to be missing the entire update directory.

This sounds like a case that just needs to be hard reset/rolled back somehow.

John A Meinel (jameinel) wrote :

There are some logic issues with this bit of code that I'm sorting out:

        if push:
            commit_db.start_commit()
            push_branches_back(package, temp_dir, bstore, possible_transports, local_branches)
            icommon.generate_debian_diffs(lp, temp_dir, package, bstore,
                    possible_transports=possible_transports)
            icommon.generate_ubuntu_merges(lp, temp_dir, package, bstore,
                    possible_transports=possible_transports)
            if not keep_temp:
                shutil.rmtree(temp_dir)
            revid_db.commit()

Specifically:

1) commit_db.start_commit() is called, which inserts a record into the 'commits' table, indicating that a given branch needs to be updated.

However, commit_db.finish_commit() is never called afterword. It seems to only be called in the earlier code that noticed there was data that needed to be "push_back"ed.

I'm thinking we want to add a commit_db.finish_commit() after the revid_db.commit() state.

2) Focusing on this part:

            if not keep_temp:
                shutil.rmtree(temp_dir)
            revid_db.commit()

This says to delete the temporary tree, before you finish copying the data in the 'revids_working' table over to the 'revids' table. That, coupled with no .finish_commit(), means that you can end up thinking that there is stuff that needs to be pushed back up to launchpad and finalized, but you've already deleted all your local work.

James Westby (james-w) wrote :

> I'm thinking we want to add a commit_db.finish_commit() after the revid_db.commit() state.

That sounds sensible to me, without thinking too hard. Certainly things the methods should be
renamed if that's not the expected behaviour.

> This says to delete the temporary tree, before you finish copying the data in the 'revids_working' table over to the 'revids' table.
> That, coupled with no .finish_commit(), means that you can end up thinking that there is stuff that needs to be pushed back up to launchpad and finalized, but you've already deleted all your local work.

Also sounds reasonable.

Thanks,

James

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers