etherealengine icon indicating copy to clipboard operation
etherealengine copied to clipboard

IR-2012 Update file system operation to promise API (Partial)

Open jonathan-casarrubias opened this issue 1 year ago â€ĸ 7 comments

Summary

Due the extensive use of file system operations I decided to approach this story by sending portions of each fs api migration with the objective of avoiding extensive and overwhelming code reviews as well as to reduce risk.

For this pull request I introduced writeFileAsync, existsAsync and deprecated deleteFolderRecursive.

I have completely replaced any writeFileSyncRecursive call for the new writeFileAsync. I have completely replaced any deleteFolderRecursive call for the native node.js api fps.rmdir(path, { recursive: true }) I have partially replaced some fs.existsSync calls for the new existsAsync function, will continue replacing these calls in subsequent PRs

Subtasks Checklist

[x] Implement non-blocking writeFileAsync helper [x] Implement non-blocking existsAsync helper [x] Implement non-blocking cpAsync helper [x] Replace deleteFolderRecursive helper in favour of native non-blocking fps.rmdir function

Breaking Changes

N/A

References

JIRA Ticket IR-2012

QA Steps

Already modified tests using new non-blocking APIs should still pass npm run test

jonathan-casarrubias avatar May 18 '24 02:05 jonathan-casarrubias

Thank you for your pull request and welcome to the Ethereal Engine developer community!

We require contributors to sign our Copyright Assignment Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign the agreement at https://forms.gle/15ENsSAJGKf2ozvB7

The agreement has not been signed by users: @jonathan-casarrubias.

After signing the agreement, you can ask me to recheck this PR by posting @cla-bot check as a comment to the PR :)

cla-bot[bot] avatar May 18 '24 02:05 cla-bot[bot]

Thank you for your pull request and welcome to the Ethereal Engine developer community!

We require contributors to sign our Copyright Assignment Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign the agreement at https://forms.gle/15ENsSAJGKf2ozvB7

The agreement has not been signed by users: @jonathan-casarrubias.

After signing the agreement, you can ask me to recheck this PR by posting @cla-bot check as a comment to the PR :)

cla-bot[bot] avatar May 18 '24 02:05 cla-bot[bot]

@cla-bot check

jonathan-casarrubias avatar May 18 '24 03:05 jonathan-casarrubias

Checking that all contributors to this PR are verified.

cla-bot[bot] avatar May 18 '24 03:05 cla-bot[bot]

Looking good now, I would like this QA'd on a deployment to make sure the builder and project installer works correctly

HexaField avatar May 29 '24 03:05 HexaField

Looking good now, I would like this QA'd on a deployment to make sure the builder and project installer works correctly

Seemed to all work fine on QAT.

barankyle avatar May 31 '24 00:05 barankyle

converted to a draft just while it doesnt have checks passing

HexaField avatar May 31 '24 00:05 HexaField