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

ANNOUNCEMENT: Help testing the RxDB version 15 release #5155

Closed
pubkey opened this issue Oct 24, 2023 · 20 comments
Closed

ANNOUNCEMENT: Help testing the RxDB version 15 release #5155

pubkey opened this issue Oct 24, 2023 · 20 comments

Comments

@pubkey
Copy link
Owner

pubkey commented Oct 24, 2023

RxDB version 15.0.0 is now it beta and you should help testing it so that you can later safely migrate to the new version.

RxDB v15 release notes: https://github.com/pubkey/rxdb/blob/master/docs-src/docs/releases/15.0.0.md

What should be tested

Especially the schema migration should be tested. What happens when you increase your schema versions and run the schema migration. Does everything work without errors? Does the replication continue from the correct checkpoints?

Also the EventReduce algorithm is now activated by default. Make sure that your observed queries still emit the correct results at the correct point in time.

How to test

You can find the latest 15.0.0-beta.XX version here: https://github.com/pubkey/rxdb/releases

Update your package json with that rxdb-version and re-install your node_modules. Then you update all required code changes and test your application.

If you find any bugs, report them here or better, create a PR with a test case.

The new version will be in beta for about 4 weeks, then it will be released if no more bugs are found.

@adam-lynch
Copy link
Contributor

Can you release a matching beta version for rxdb-premium? We can't test it otherwise

@pubkey
Copy link
Owner Author

pubkey commented Nov 2, 2023

@adam-lynch This is done already. There is version 15.0.0-beta.22 on both npm packages.

@voiddev90
Copy link

Great new functionality that the full replication is no longer happening after migrating.
Does this also work when migrating from RxDB 14 to 15?
I've executed a major version migration as stated by the following docs. But I noticed a full replication is still happening with my initial bump to RxDB 15.

@pubkey
Copy link
Owner Author

pubkey commented Nov 16, 2023

Hi @voiddev90 the storage-migration plugin does not migrate your replication states.
This is because different storages use different checkpoints and it would lead to possible broken state. The storage-migration only migrates the plain document data.
Only the schema-migration will migrate your replication states.

@tatumalgorand
Copy link

npm ERR! enoent ENOENT: no such file or directory, open '/var/www/html/rxdb/examples/vite-vanilla-ts/rxdb-local.tgz' -
Seems that this tgz is not in the directory ??? any help would be appreciated

@tatumalgorand
Copy link

https://rxdb.info/releases/15.0.0.html - page not found

@pubkey
Copy link
Owner Author

pubkey commented Nov 17, 2023

@pubkey
Copy link
Owner Author

pubkey commented Nov 29, 2023

@tatumalgorand

npm ERR! enoent ENOENT: no such file or directory, open '/var/www/html/rxdb/examples/vite-vanilla-ts/rxdb-local.tgz' -
Seems that this tgz is not in the directory ??? any help would be appreciated

The postinstall npm script in the examples should create the rxdb-local-tgz automatically. If that does not work, run npm run postinstall manually.

@1yasa
Copy link

1yasa commented Dec 3, 2023

v15 made migrations public, which is great. I am currently using the beta version of v15, and all the APIs I'm using do not involve version differences.

So, I'm thinking, since migrations are now public, why not also open up the disableVersionCheck function? Otherwise, migrations might not be very useful.

The disableVersionCheck function is practical for 90% of applications because most scenarios do not involve complex version differences in RxDB APIs.

export function isDatabaseStateVersionCompatibleWithDatabaseCode(
    databaseStateVersion: string,
    codeVersion: string
): boolean {
    if (!databaseStateVersion) {
        return false;
    }

    if (
        codeVersion.includes('beta') &&
        codeVersion !== databaseStateVersion
    ) {
        return false;
    }

    const stateMajor = databaseStateVersion.split('.')[0];
    const codeMajor = codeVersion.split('.')[0];
    if (stateMajor !== codeMajor) {
        return false;
    }
    return true;
}
// RxDB Premium v15 or newer:
import { disableVersionCheck } from 'rxdb-premium-old/plugins/shared';

disableVersionCheck();

From a developer experience perspective, disableVersionCheck should be built-in and optional because in most scenarios, developers won't encounter RxDB's underlying APIs, and there are no version differences at the data layer.

I am a developer who uses RxDB for applications to a moderate extent. It would be great if upgrading RxDB versions could be done seamlessly.

@pubkey
Copy link
Owner Author

pubkey commented Dec 3, 2023

@1yasa It happened so often in the past that people had problems and reported them even when they have been already fixed. This mostly happened because the missed upgrading the correct rxdb-premium version along with their rxdb version.
Also accidentially having different version could lead to broken database state which would be very hard to fix when it was already deployed to the clients. I will not remove that and the disableVersionCheck() should only be called on the previous rxdb version, never on the newest one.

@1yasa
Copy link

1yasa commented Dec 4, 2023

What I mean is, since the migration plugin has been made accessible to everyone, could the disableVersionCheck function also be made available? I understand your concerns, but those who can find this function are already aware of its usage and potential impacts. (Regarding the issue of database state damage, in practice, a dump backup of the database is always performed before executing database migration or modification operations, so this shouldn't be a problem.)

@pubkey
Copy link
Owner Author

pubkey commented Dec 4, 2023

@1yasa I think you are confusing the disableVersionCheck() from premium with the isDatabaseStateVersionCompatibleWithDatabaseCode() from the core. Please check the code https://github.com/pubkey/rxdb/blob/master/src/rx-database-internal-store.ts#L237
This mostly throws on different beta versions. Non-beta releases can reuse the database state on the whole major version.

@1yasa
Copy link

1yasa commented Dec 4, 2023

@1yasa I think you are confusing the disableVersionCheck() from premium with the isDatabaseStateVersionCompatibleWithDatabaseCode() from the core. Please check the code https://github.com/pubkey/rxdb/blob/master/src/rx-database-internal-store.ts#L237 我认为你混淆了premium中的disableVersionCheck()和核心中的 isDatabaseStateVersionCompatibleWithDatabaseCode() 。请检查代码https://github.com/pubkey/rxdb/blob/master/src/rx-database-internal-store.ts#L237 This mostly throws on different beta versions. Non-beta releases can reuse the database state on the whole major version. 这主要是针对不同的beta版本。非beta版本可以在整个主版本上重用数据库状态。

soga.

@voiddev90
Copy link

@pubkey Do you have a new timeframe for when V15 will be released?

@pubkey
Copy link
Owner Author

pubkey commented Dec 5, 2023

@voiddev90 Mid next week. But only if there are no mid/big problems found.
Please also make sure you tested the latest beta release 15.0.0-beta.42

@pubkey
Copy link
Owner Author

pubkey commented Dec 13, 2023

@voiddev90 I am sorry, there is something I have to refactor with index handling to clear the path for a server plugin that is planned for start of 2024.
v15 will be in beta for another week.

@voiddev90
Copy link

@pubkey Thanks for the update

@pubkey
Copy link
Owner Author

pubkey commented Dec 15, 2023

Just released 15.0.0-beta.44 on premium and core. There are no more planned changes, release is planned for next thursday. Please test.

@pubkey
Copy link
Owner Author

pubkey commented Dec 20, 2023

Just released 15.0.0-beta.47 please test. RxDB v15 release is planned for today.

@pubkey
Copy link
Owner Author

pubkey commented Dec 20, 2023

Just released version 15! Read more about the changes here

@pubkey pubkey closed this as completed Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants