Alpha state. A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc.
This PR resolves an issue where the backend experienced delays when serving the index.html file of a SinglePageApp. The delay occurred because the backend was waiting for the index.html file to regenerate before serving it, ensuring the file included references to newly generated JavaScript bundles. The logic now checks for updates using the LastWriteTime to confirm when the new file is ready.
The delay primarily affected Windows due to differences in how file timestamps are handled across operating systems. On Windows, the CreationTime doesn't update when a file is modified, unlike on MacOS where both CreationTime and LastWriteTime are updated. The fix ensures consistent behavior across platforms by relying on the LastWriteTime.
Atomic Changes
Fix issue when waiting extensively on generation of SinglePageApp files
Checklist
[x] I have added a Label to the pull-request
[x] I have added tests, and done manual regression tests
[x] I have updated the documentation, if necessary
Summary & Motivation
This PR resolves an issue where the backend experienced delays when serving the
index.html
file of a SinglePageApp. The delay occurred because the backend was waiting for theindex.html
file to regenerate before serving it, ensuring the file included references to newly generated JavaScript bundles. The logic now checks for updates using theLastWriteTime
to confirm when the new file is ready.The delay primarily affected Windows due to differences in how file timestamps are handled across operating systems. On Windows, the
CreationTime
doesn't update when a file is modified, unlike on MacOS where bothCreationTime
andLastWriteTime
are updated. The fix ensures consistent behavior across platforms by relying on theLastWriteTime
.Atomic Changes
Checklist