-
Notifications
You must be signed in to change notification settings - Fork 3
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
ci: merge staging to master #68
Conversation
- Continuous benchmarking (CI/CD) - Platform tests (CI/CD) - Linting/general CI/CD updates
Pipeline Attempt on 595698870 for 158c0c7 https://gitlab.com/MatrixAI/open-source/js-encryptedfs/-/pipelines/595698870 |
There are test failures on windows and macos. Have a look into why that is the case using However I was thinking, let's just update |
Could there potentially be issues with an injected logger coming from PK that wants the formatting to be json? Because if this is passed through to EFS's DB then the logger there wouldn't have that functionality. Would it cause a runtime error or just be ignored? |
Pipeline Attempt on 596595197 for 442a61f https://gitlab.com/MatrixAI/open-source/js-encryptedfs/-/pipelines/596595197 |
No the bugs on windows and Mac are separate issues. Have a look at the logs and try cloning and reproducing it on the 2 machines. |
So runtime wise, when you switch to JSON formatting this only occurs for the root logger so it won't affect the child loggers. |
Having a look at the failures on windows now. The mac failure on the cicd looks to be just a timeout, however, |
There are a LOT of failures on Windows, all of them in the |
Alot of concurrency tests may not be robust against timing and scheduling changes. Which is why I wanted to get the better concurrency fast-check utility. See what you can fix right now, and report new issues for these bugs for the ones that will take more time. |
Using `path.join` caused the tests to use the windows' separator for the path which is not supported by the EFS. This lead to a lot of test failures. #69
Pipeline Attempt on 598882549 for 6dce66a https://gitlab.com/MatrixAI/open-source/js-encryptedfs/-/pipelines/598882549 |
…oin` to disambiguate with `utils.pathJoin`
Pipeline Attempt on 598883795 for 861470a https://gitlab.com/MatrixAI/open-source/js-encryptedfs/-/pipelines/598883795 |
Failed timeout test on macos:
Seems maybe the macos is just slow. Anyway the js-db v5 will be alot faster. For comparison:
|
Funnily enough the test only tests 50 files. I'm going to try to see if 25 files will make it pass. Speed improvements will be important for js-db 5.0.0 to compare. |
Pipeline Attempt on 598896453 for 07a3c5a https://gitlab.com/MatrixAI/open-source/js-encryptedfs/-/pipelines/598896453 |
Either the macos runner is crazy slow, or the db is just really slow for macos:
So this will pass now. |
The next test failure is inconsistent concurrency test. In fact I think it is wrong. @tegefaulkes.
Says at the end that it read operation will either read all 50 bytes, or it will read 0 bytes. Why is this so? It could read 5 bytes, 10 bytes, or any multiple in between. The atomicity is per write. It's not between the 2 operations. |
If that's the case then it might just be an oversight of the test. Although wouldn't a write stream 'flush' the writes in blocks? Just putting the error log here for reference.
|
To fix this, I've integrated the https://github.com/jest-community/jest-extended library. This package brings in quite a few useful matchers, that we should integrate into PK as well, as it provides some standard matchers that we have been missing for quite a bit. In particular I'm interested in asymmetric matching and the 200c0f1 brings in jest-extended, @emmacasolin this can go into staging of PK. Subsequently for the test itself, I've changed it to be predicate based. This is one step towards "model based testing", where we create a model of the predicates, and then allow simulations to fit the predicates. So subsequently we can bring in The predicate simply now checks that the bytes read is always a multiple of 5 starting at 0. I've removed the second variant of delaying by 100ms, this should be done when |
There could be other tests that are non-deterministic too due to incorrect assumption on promise execution order. Those will need to be fixed with a combination of |
Pipeline Attempt on 598964074 for ba683e0 https://gitlab.com/MatrixAI/open-source/js-encryptedfs/-/pipelines/598964074 |
Pipeline Succeeded on 598964074 for ba683e0 https://gitlab.com/MatrixAI/open-source/js-encryptedfs/-/pipelines/598964074 |
This is an automatic PR generated by the pipeline CI/CD. This will be automatically fast-forward merged if successful.
Fixes #69