Skip to content

Update functional tests to use builtin FSMonitor present in v2.31.0.vfs.0.0#491

Merged
jeffhostetler merged 5 commits intomicrosoft:mainfrom
jeffhostetler:builtin-fsmonitor-support
Mar 18, 2021
Merged

Update functional tests to use builtin FSMonitor present in v2.31.0.vfs.0.0#491
jeffhostetler merged 5 commits intomicrosoft:mainfrom
jeffhostetler:builtin-fsmonitor-support

Conversation

@jeffhostetler
Copy link
Contributor

No description provided.

…vfs.0.0)

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Remove watchman axis from test matrix.

Add axis to set `git config feature.scalar`.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Comment on lines +246 to +269
else
{
error = $"Builtin FSMonitor not supported by this version of Git";
this.Context.Tracer.RelatedError(error);
return false;
}
Copy link
Contributor

@derrickstolee derrickstolee Mar 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes the Ubuntu builds to break with:

Error: Failed to set initial config: Builtin FSMonitor not supported by this version of Git).

This should just be a warning, then continue to the Watchman integration (if available).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@derrickstolee Do we want to fall back to watchman here or do we want to amend the test matrix in the .yml to not spawn those cases at all ??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for now, i'll go with your suggestion and fallbakc to Watchman if available. I think longer term we want the feature.scalar=experimental to evolve and test other things.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, and the builds won't have Watchman installed, anyway, so they'll be wasted, but 🤷.

Comment on lines +116 to +119
// TODO Do we need to iterate over all of the repos that we created and
// TODO issue a `git fsmonitor--daemon --stop` on each? Note that we
// TODO will have code in DeleteEnlistment() to do that during the tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DeleteEnlistment() should be sufficient, I think. If we have problems, then we can try to do something here.

…SMonitor

Extend definition of `feature.scalar` to select either Watchman or the new
builtin FSmonitor.

Update the `ConfigStep.cs:TrySetConfig()` to set/unset `core.useBuiltinFSMonitor`
when enabling/disabling the builtin `git fsmonitor--daemon`.  This feature is
new as of Git v2.31.0.vfs.0.0.

Previous beta versions of Git used `core.fsmonitor == :internal:` to select it.

Also, coordinate values of `core.fsmonitor` with `core.useBuiltinFSMonitor`
so that we can select neither or one or the other.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
…finished

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
@jeffhostetler jeffhostetler merged commit aa318e5 into microsoft:main Mar 18, 2021
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

Successfully merging this pull request may close these issues.

2 participants