-
Notifications
You must be signed in to change notification settings - Fork 0
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 #38
Conversation
…napi/workers.cpp`
* Applied snapshots to dbGet and dbMultiGet, changed dbGetMany to dbMultiGet * Snapshots work with transactionGet and transactionGetForUpdate * Testing repeatable read using snapshots * Turns out snapshot lifecycle is controlled by the transaction, so no manual release * Transactions now have their own priority work count * Testing dbClose will automatically close of snapshots, iterators and transactions
* Enabled `NODE_DEBUG_NATIVE` runtime control of rocksdb logging * Testing transaction iterator
be called when the detached target is already closed. So I've removed the precondition of `Detach+` methods and `DecrementPendingWork` from both `Database` and `Transaction` classes.
… be checking for `pendingWork_ == 1`
* Fixed missing promisify for `transactionClear` * Using `__func__` for log messages * Namespacing C++ iterator workers * Testing `transactionClear` with non-repeatable read
…t demonstrating race condition thrashing
Introduce Snapshot Isolation OCC to DBTransaction
Pipeline Attempt on 576896307 for 8fd0c9a https://gitlab.com/MatrixAI/open-source/js-db/-/pipelines/576896307 |
👇 Click on the image for a new way to code review
Legend |
The new 22.05 revision means that we are now using We need to update all of the pkg-fetch releases. @emmacasolin Can you do an update for js-polykey and ts-demo-lib? |
Some bug discoveries:
So basically we need to use The only thing guaranteed to work is the CLI parameters. The |
Ok I've gone through the This means if we want to do incremental compilation, we cannot be using Since it is quite complicated magic, I'm going to be removing It seems we just need:
Will need to verify what exactly is the structure, but it appears to be the |
The failure in the windows build might be do with the fact that the name of the native is called This isn't a problem on Linux because it uses But it appears that on Windows, it is using So I'm going to change the name of |
I'm attempting some changes on node-gyp configure --msvs_version=2019
node-gyp build --jobs=max", Compensate for the option bugs that Document all the weird behaviour. And create the relevant The main reason However as long as the CI/CD tracks the mtimes, while caching |
After renaming to |
Ok examining the
Where the And Note that it is actually mandatory for there to be an The tags can be in any order. The |
In our case, it's only relevant to tag the binary if we want to extend our specificity. The default specificity is just to say The If the So our
Future builds which precompile for android or ios may require further tags. In which case the |
Note that now that we have a At the same time in the TS demo lib native, we have We may need to recognise the Also because the Which may mean env variable is the only way to do it. https://stackoverflow.com/questions/61510927/passing-cli-args-to-pre-command-in-package-json Which would mean that TS demo lib native has an incorrect line in the |
Ok now the script takes into account env variables. We can make use of this now. |
Ok there's still a problem with running
The problem is mainly that the This means when we try to execute However if I add the |
Rather than bringing in Alternatively we can add the |
* Added `scripts/prebuild.js` which is set as the `prebuild` script in `package.json` * The `scripts/prebuild.js` supports `npm_config_devdir`, `npm_config_nodedir` and `npm_config_arch` as environment variables * Environment variables are necessary to pass configuration when using `npm run build` because the prebuild script doesn't receive commmand line parameters * Added `engines` which specifies the node runtime and msvs version, used by `scripts/prebuild.js` * Renamed `src/rocksdb` to `src/native` to avoid name conflict with `deps/rocksdb`, this affects windows builds * All `package.json` scripts must be prefixed with the actual program to be executable on Windows * The `execFile` functions do not read `PATHEXT` requiring the usage of `shell: true` option on windows * Node headers and static libraries are installed into `npm_config_devdir` but only for window and macos, nix still uses `npm_config_nodedir` * The `scripts/prebuild.js` supports incremental compilation, just need to cache the `./build` directory * No more `prebuildify`, completely replaced by `scripts/prebuild.js`, replicates expected `./prebuilds` file and directory structure
Ok so the windows build should work now on CI/CD. Incremental compilation should still be ensured by integrating the caching of the On matrix-win-1, full compilation with all cores took about 7 minutes. Mac failures still to be looked at. This may have to do with compilation flags. |
Pipeline Attempt on 587061594 for 1f6299d https://gitlab.com/MatrixAI/open-source/js-db/-/pipelines/587061594 |
Also important to introduce the chocolatey caching that we have in js-polykey too. |
The ENOENT issue had already been brought up here https://github.com/MatrixAI/js-polykey/issues/401#issuecomment-1181364907, but I can add this additional context because I hadn't previously looked into the cause of it |
Yea this would only affect commands that are scripts and are not exes. So for PK that might affect our own scripts. But using an intermediate shell is not the solution for PK... I only enabled it here because it's just a script executing more scripts. |
Windows CI/CD builds succeeded: https://gitlab.com/MatrixAI/open-source/js-db/-/jobs/2716815439 However mac CI/CD builds still failing: https://gitlab.com/MatrixAI/open-source/js-db/-/jobs/2716815441 |
Fixed the mac builds, it was a missing comma in the settings. Surprising that the gyp file allows missing commas. So the mac builds and tests work now on But I did notice that the compilation settings are a bit messy, worth looking into cleaning it up so it's clearer. Messy settings include multiple overrides of |
Pipeline Attempt on 587539054 for 886f7cb https://gitlab.com/MatrixAI/open-source/js-db/-/pipelines/587539054 |
While the mac builds is running on the CI/CD I experimented with how nix could work. Firstly the latest update to
Afterwards, I enabled some settings in Trying to compile results in an error:
This is apparently due to the fact that I have |
@emmacasolin can you incorporate chocolatey caching and homebrew caching into the gitlab CI/CD jobs here as well. |
Pipeline Succeeded on 587539054 for 886f7cb https://gitlab.com/MatrixAI/open-source/js-db/-/pipelines/587539054 |
Branch created here https://github.com/MatrixAI/js-db/tree/feature-cicd-platforms-caching |
This is an automatic PR generated by the pipeline CI/CD. This will be automatically fast-forward merged if successful.