Skip to content

Preserve order of commits after rebase if these commits were made at the same time #2450

Open
@iarspider

Description

@iarspider

From cms-sw/cmssw#47546 (comment)

Reconstruction:

Why the order has changed:

When processing a PR, the bot first collects all commits (as returned by github, sorted by time descending) into a list, then appends any "missing" (squashed) commits from cache, then sorts that list by timestamp. The timestamps we get from GitHub API have a precision of 1s. Since commit cms-sw/cmssw@e175131 was squashed, it was added to the end of the list, so from bot's point of view it now happened earlier than cms-sw/cmssw@37096f4 .

Fix

To be discussed. We need a better sorting key than (or in addition to) timestamp - e.g. base64-decoded node_id returned by github, or our own internal counter (that must be saved to bot cache)?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions