Skip to content
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

Added initial checkpoint to graphql replication #6227

Closed
wants to merge 1 commit into from

Conversation

lavaxun
Copy link

@lavaxun lavaxun commented Jul 18, 2024

This PR contains:

  1. Initial checkpoint for GraphQL Replication: pull & push.
  2. This PR is inspired by couchdb initial replication from another PR: Feature: initialCheckpoint for Couchdb #5461

Describe the problem you have without this PR

  1. Currently only the couchdb supported initial replication. However GraphQL replication does not support this.

@pubkey
Copy link
Owner

pubkey commented Jul 18, 2024

Thank you for the PR. Can we add a test to that? Also docs must be updated.

@lavaxun
Copy link
Author

lavaxun commented Jul 19, 2024

Thank you for the PR. Can we add a test to that? Also docs must be updated.

ya sure. I'll try to add the test cases around the initialcheckpoint next week or so.

I'm currently using Github codespace for this, however it hits a roadblock when doing npm install .
Seems like there is something to do with the premium plugin.
any idea to solve this?

See the npm install logs here

lavaxun ➜ /workspaces/rxdb (master) $ npm install
npm warn deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm warn deprecated osenv@0.1.5: This package is no longer supported.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated flatten@0.0.1: flatten is deprecated in favor of utility frameworks such as lodash.
npm warn deprecated read-package-json@2.1.2: This package is no longer supported. Please use @npmcli/package-json instead.
npm warn deprecated exists-file@3.0.2: This package is a perf sacrilege. Use fs.existsSync() instead
npm warn deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm warn deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated npmlog@4.1.2: This package is no longer supported.
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated flat@1.0.0: Fixed a prototype pollution security issue in flat, please upgrade to ^1.6.2 or ^5.0.1.
npm warn deprecated dependency-check@4.1.0: dependency-check has been deprecated in favor of the knip module
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported.
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.0: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm warn deprecated @babel/plugin-proposal-object-rest-spread@7.20.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
npm warn deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm warn deprecated gauge@4.0.4: This package is no longer supported.
npm warn deprecated gauge@2.7.4: This package is no longer supported.
npm warn deprecated @babel/polyfill@7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm warn deprecated node-pre-gyp@0.17.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm warn deprecated express-graphql@0.12.0: This package is no longer maintained. We recommend using graphql-http instead. Please consult the migration document https://github.com/graphql/graphql-http#migrating-express-grpahql.
npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm error code 1
npm error path /workspaces/rxdb/node_modules/rxdb-premium
npm error command failed
npm error command sh -c node ./scripts/postinstall.js && node ./scripts/installer.js
npm error # RxDB Premium running postinstall.js
npm error # RxDB Premium running postinstall.js DONE
npm error secp256k1 unavailable, reverting to browser version
npm error currentVersion: 15.4.2
npm error currentPath: /workspaces/rxdb/node_modules/rxdb-premium/scripts
npm error currentPath: /workspaces/rxdb/node_modules/rxdb-premium/
npm error currentPath: /workspaces/rxdb/node_modules/
npm error currentPath: /workspaces/rxdb/
npm error accessToken: xxxxx
npm error /workspaces/rxdb/node_modules/ethereumjs-util/dist/bytes.js:148
npm error throw new Error(Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${v});
npm error ^
npm error
npm error Error: Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: 0xxxxxx
npm error at toBuffer (/workspaces/rxdb/node_modules/ethereumjs-util/dist/bytes.js:148:19)
npm error at Object.publicKeyByPrivateKey (/workspaces/rxdb/node_modules/eth-crypto/dist/lib/public-key-by-private-key.js:17:91)
npm error at u (/workspaces/rxdb/node_modules/rxdb-premium/scripts/installer.js:1:846)
npm error at Object. (/workspaces/rxdb/node_modules/rxdb-premium/scripts/installer.js:1:2357)
npm error at Module._compile (node:internal/modules/cjs/loader:1358:14)
npm error at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
npm error at Module.load (node:internal/modules/cjs/loader:1208:32)
npm error at Module._load (node:internal/modules/cjs/loader:1024:12)
npm error at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
npm error at node:internal/main/run_main_module:28:49
npm error
npm error Node.js v20.15.1

npm error A complete log of this run can be found in: /home/codespace/.npm/_logs/2024-07-19T03_12_49_188Z-debug-0.log

@pubkey
Copy link
Owner

pubkey commented Jul 25, 2024

Do you install premium for this PR? Because the changes are only for the core stuff and therefore you should not need premium.

@lavaxun
Copy link
Author

lavaxun commented Aug 12, 2024

Do you install premium for this PR? Because the changes are only for the core stuff and therefore you should not need premium.

The PR was based on the main branch and was created using the GitHub built-in codespace. Shouldn’t have the premium plugin installed I guess?

Will have to look further into the npm install issue again in future.
but will close this PR for now due to busy schedule recently. Sorry about that.

@lavaxun lavaxun closed this Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants