Skip to content

Make pull merge in on database transaction #19596

Open
@6543

Description

@6543

this is currently not possible because we get a deadlock, at least on sqlite :/ (see comments and commits on #19576)

// changeStatusCtx changes issue status to open or closed.
// TODO: if context is not db.DefaultContext we get a deadlock!!!

// TODO: make it able to do this in a database session
mergeCtx := context.Background()
pr.MergedCommitID, err = rawMerge(mergeCtx, pr, doer, mergeStyle, expectedHeadCommitID, message)

// Push back to upstream.
// TODO: this cause an api call to "/api/internal/hook/post-receive/...",
// that prevents us from doint the whole merge in one db transaction
if err := pushCmd.Run(&git.RunOpts{

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/refactoringExisting code has been cleaned up. There should be no new functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions