-
Notifications
You must be signed in to change notification settings - Fork 184
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
Hot Reload File IO -> React to 1 file change notification per file change #2424
base: main
Are you sure you want to change the base?
Conversation
… events trigger hot reload, we only act on the first event which has a differing filecontents. If no file changes have actually occurred, we shouldn't act on the file change notification. Additional add protection for reading file with read inent version read/write which was causing issues in some hot reload scenarios.
return; | ||
} | ||
|
||
byte[] updatedRuntimeConfigFileHash = FileUtilities.ComputeHash(filePath: _fileWatcher.Path + "/" + _fileWatcher.Filter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will be good to add in the comments why we needed to computeHash
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Azure.DataApiBuilder.Config.Utilities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be added some class/method summary
{ | ||
public static byte[] ComputeHash(string filePath) | ||
{ | ||
int runCount = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is runCount here?
{ | ||
int runCount = 1; | ||
|
||
while (runCount < 4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 4?
} | ||
} | ||
|
||
return new byte[20]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 20? can we something else?
Why make this change?
What is this change?
How was this tested?
TBD