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

RJS-2739: Upgrade to Realm Core v14.1.0 #6512

Merged
merged 26 commits into from
Mar 6, 2024
Merged

RJS-2739: Upgrade to Realm Core v14.1.0 #6512

merged 26 commits into from
Mar 6, 2024

Conversation

kneth
Copy link
Member

@kneth kneth commented Feb 28, 2024

What, How & Why?

This closes #6499

☑️ ToDos

  • 📝 Changelog entry
  • 📝 Compatibility label is updated or copied from previous entry
  • 📝 Update COMPATIBILITY.md
  • 🚦 Tests
  • 📦 Updated internal package version in consuming package.jsons (if updating internal packages)
  • 📱 Check the React Native/other sample apps work if necessary
  • 💥 Breaking label has been applied or is not necessary

Comment on lines +754 to +768

itNormalizes(
{
type: "list",
objectType: "string",
indexed: true,
},
{
type: "list",
objectType: "string",
indexed: true,
optional: false,
},
{ isPrimaryKey: false },
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine, but it also seems unrelated to the upgrade.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this because the upgrade also included being able to index list of strings. So this tests that the parser also allows this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is testing an enhancement mentioned in the changelog.

Copy link
Member

@elle-j elle-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🙂 Left some suggestions here 👍

@kneth kneth changed the title Upgrade to Realm Core v14.0.1 Upgrade to Realm Core v14.1.0 Mar 3, 2024
Comment on lines 77 to 144
export enum LogCategory {
/**
* Include logs from all categories. Subcategories are {@link LogCategory.Storage},
* {@link LogCategory.Sync}, {@link LogCategory.App}, and {@link LogCategory.SDK}.
*/
Realm = "Realm",
/**
* Log database mutations and query operations.
* Subcategories are {@link LogCategory.Transaction}, {@link LogCategory.Object},
* {@link LogCategory.Query}, and {@link LogCategory.Notification}.
*/
Storage = "Realm.Storage",
/**
* Log when creating, advancing, and committing transactions.
*/
Transaction = "Realm.Storage.Transaction",
/**
* Log query operations.
*/
Query = "Realm.Storage.Query",
/**
* Log database mutations.
*/
Object = "Realm.Storage.Object",
/**
* Log notifications of changes to the database.
*/
Notification = "Realm.Storage.Notification",
/**
* Log activity related to Atlas Device Sync.
* Subcategories are {@link LogCategory.Client} and {@link LogCategory.Server}.
*/
Sync = "Realm.Sync",
/**
* Log activity related to Atlas Device Sync client operations.
* Subcategories are {@link LogCategory.Session}, {@link LogCategory.Changeset},
* {@link LogCategory.Network}, and {@link LogCategory.Reset}.
*/
Client = "Realm.Sync.Client",
/**
* Log connection level activity.
*/
Session = "Realm.Sync.Client.Session",
/**
* Log when receiving, uploading, and integrating changesets.
*/
Changeset = "Realm.Sync.Client.Changeset",
/**
* Log low level network activity.
*/
Network = "Realm.Sync.Client.Network",
/**
* Log client reset operations.
*/
Reset = "Realm.Sync.Client.Reset",
/**
* Log activity related to Atlas Device Sync server operations.
*/
Server = "Realm.Sync.Server",
/**
* Log activity at the Atlas App level.
*/
App = "Realm.App",
/**
* Log activity at the SDK level.
*/
SDK = "Realm.SDK",
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still feel using an enum with the leaf name as key isn't the best API design and would rather that we used a string union here. The main reason being that it's possible for Core to introduce a category that we can't unambiguously express to our users.

I.e. what do we do if core introduces a "Realm.Sync.Server.Changeset" or a "Realm.App.Network" category?

Copy link
Member

@elle-j elle-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was the right call to remove the needsFileFormatUpgrade and possibly add it as a follow-up 👍

LGTM with some suggested updates to docs. The biggest thing to decide on tho is whether to change the log categories to a string union.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
packages/realm/src/Logger.ts Outdated Show resolved Hide resolved
packages/realm/src/Realm.ts Outdated Show resolved Hide resolved
packages/realm/src/Realm.ts Outdated Show resolved Hide resolved
packages/realm/src/Realm.ts Show resolved Hide resolved
packages/realm/src/Realm.ts Outdated Show resolved Hide resolved
packages/realm/src/app-services/Sync.ts Outdated Show resolved Hide resolved
Co-authored-by: LJ <81748770+elle-j@users.noreply.github.com>
@kneth kneth changed the title Upgrade to Realm Core v14.1.0 RJS-2739: Upgrade to Realm Core v14.1.0 Mar 6, 2024
* Suggesting array of categories and string union for LogCategory
* Moved documentation onto the type
* Moved setLogger using LoggerCallback2 up
* Exporting "LogEntry" type
* Lint fixing tests
@kneth kneth merged commit 61dd78a into main Mar 6, 2024
32 checks passed
@kneth kneth deleted the kneth/realm-core-14.0.1 branch March 6, 2024 11:06
bimusiek pushed a commit to bimusiek/realm-js that referenced this pull request Mar 14, 2024
* RJS-2739: Upgrade to Realm Core v14.1.0

---------

Co-authored-by: Kræn Hansen <kraen.hansen@mongodb.com>
Co-authored-by: LJ <81748770+elle-j@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to Realm Core v14.1.0
3 participants