-
Notifications
You must be signed in to change notification settings - Fork 353
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
Operation ids are nondetermenistic in tests after a jj git clone
.
#1596
Comments
I think that's because we include the command arguments in the operation. You can probably make the paths relative in the test. |
Why don't they show up as different in the output to |
Because we normalize the paths there :) |
Heh. 🤦♂️ Yup, changing the clone command to
fixed the problem. That was a fun few hours. I really wish we could do something better here, though I'm highly biased at the moment. The first option that comes to mind is to call |
I'll just close this. I'm not sure how likely more people are to be confused by this. |
This issue is somewhat minor, but I find it confusing, and it slowed down my attempts to debug #864 quite a bit.
Operation ids are meant to be deterministic in tests. They usually are, as the following example shows.
Example of passing test to show that operation ids are deterministic
However, they are not deterministic after a
jj git clone
. For example, the following test will failbecause the operation ids marked as
ee79b02a33d4
(and all the following ones) will change on each run.Test showing non-determinism after `jj git clone`
If we add a call to
jj debug operation
to that test, we can notice the following:head_ids
as part of the view object, and their order can change.This is a red herring and does not affect the operation ids (this can be seen by adding
jj debug operation
to the passing example test above). Moreover, even if it did, that would createonly two different possibilities, not a distinct result on every run.
jj debug operations
as, for example, the diff at ilyagr@op-id-nondeterminism shows.The text was updated successfully, but these errors were encountered: