ydb-platform / yoj-project

YDB ORM for Java (YOJ) is a lightweight ORM for immutable entities. It has native support for YDB and is battle-tested.
Apache License 2.0
13 stars 12 forks source link

Fix ClassCastException during initial schema check #95

Closed Eistern closed 6 days ago

Eistern commented 6 days ago

In the scope of this PR, we will fix ClassCastException that happens due to column types being marked as NOT NULL

nvamelichev commented 6 days ago

Hi! Good catch! 👍

But please remember that YOJ was not written to work with NOT NULL columns, so you might need to also tune the YdbSchemaCompatibilityChecker, error handling in YdbValidator (to handle "value cannot be null" errors from YDB) and also code generation in all of YqlStatement implementations etc. These fixes should be done in other PRs, of course.

nvamelichev commented 6 days ago

@Eistern @OlegOAndreev Do you need a release with this fix ASAP? Do you need a backport to YOJ 2.5.x series (because YOJ 2.6.x had a major refactoring in filter expression handling, and Cloud Java is unlikely to have migrated to 2.6.x already)?

OlegOAndreev commented 6 days ago

It would be nice to have this backported to 2.5.x, yup.

nvamelichev commented 6 days ago

Fix has been backported to 2.5.10, the new version should appear on Maven Central in the following hours.

https://github.com/ydb-platform/yoj-project/releases/tag/v2.5.10 https://central.sonatype.com/search?q=tech.ydb.yoj&sort=published

Eistern commented 16 hours ago

Hi @nvamelichev,

Thank you for handling the backport! I've noticed that version 2.5.10 isn't available on Maven Central yet. Could there be an issue with the release pipeline?

The action (https://github.com/ydb-platform/yoj-project/actions/runs/12030357956) shows as completed successfully. However, I see that it doesn't include a commit ID and version in the description, unlike the previous runs. Could you please check if everything went as expected?

Thank you!

nvamelichev commented 5 hours ago

Maybe the 2.5.x branch did not have the changes to release staged artifacts immediately. I'll look into it.

nvamelichev commented 4 hours ago

@Eistern :heavy_check_mark: I've rebuilt v2.5.10 and released the staging repository to Maven Central. It should appear in a few hours.

nvamelichev commented 4 hours ago

2.5.10 is now on Maven Central: https://central.sonatype.com/artifact/tech.ydb.yoj/yoj-repository-ydb-v2/2.5.10