Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Earlier code should have sorted topologically or failed" assertion was hit #28

Open
jnm2 opened this issue Mar 9, 2024 · 6 comments
Open

Comments

@jnm2
Copy link
Member

jnm2 commented Mar 9, 2024

Got a report that this assertion was hit:

throw new InvalidOperationException("Should not be reachable. Earlier code should have sorted topologically or failed.");

This indicates that it was migrating a merge changeset, and that it was unable to find a previously-migrated commit corresponding to a parent changeset of the merge. The question is why it was migrating a merge changeset before migrating one of its parents.

To know why this happened is tricky without a crash dump. One possibility is a bug in TopologicalSortExtensions.cs.

@jnm2
Copy link
Member Author

jnm2 commented Mar 19, 2024

I have a feeling that this might be something I also hit in a particular test migration scenario, prompting me to start on main...support_branch_source_renames.

@JohanLarsson
Copy link
Contributor

CS319321 (19,4 %, 1 331 ms/changeset, ETA 2,1 hours)...Unhandled exception: System.InvalidOperationException: A commit should have been created for the parent changeset 319103 before reaching this point.

@JohanLarsson
Copy link
Contributor

Did more digging using the additional error info.
It goes wrong where we had a TFS branch that was merged more than once.

@jnm2
Copy link
Member Author

jnm2 commented Apr 3, 2024

I've seen it handle that scenario, I believe. There might be another element to it. Was the branch ever renamed? I have a branch in the works that starts reacting to source-renames.

@JohanLarsson
Copy link
Contributor

I have no memory of the branch being renamed but have poor memory.

@JohanLarsson
Copy link
Contributor

To expand on the above we have

  1. A branch with two commits that were merged
  2. Then more commits were added to the branch and it was merged again a couple of times.
  3. Don't remember if there were any commits made the main branch between.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants