Coder Social home page Coder Social logo

Comments (15)

dieppa avatar dieppa commented on June 4, 2024 1

Hello, we are working on a workaround for this. We expect to have it at the end of this week, beginning of next week.

from mongock.

dieppa avatar dieppa commented on June 4, 2024 1

Sorry, we under estimate it, not because it's complex, we know what we need to do, but because we have a lot in our plates. I will notify you when it is ready 😃

from mongock.

dieppa avatar dieppa commented on June 4, 2024 1

We wanted to provide official support in the next major release. However, this is getting more and more attention and we won't be able to contain it much longer. So we have decided to provide a decent workaround to allow you guys to carry on working and add it in the next release as part of the core.

We did a POC to check the work needed and we are confident in releasing the workaround soon.

from mongock.

dieppa avatar dieppa commented on June 4, 2024 1

In the next major release we'll provide official support, but it won't be in this first quarter. Probably, starting Q2

from mongock.

dieppa avatar dieppa commented on June 4, 2024

Hello, we need to take a look to this in detail, but I bet is related to the conflict between Mongock using reflection and Graal Naive AOT compilation.

Although that's something will support in the next version, Mongock currently doesn't provide explicit support for AOT.

Anyway, we'll keep you updated as this is something that we need to address soon.

from mongock.

dieppa avatar dieppa commented on June 4, 2024

@nhandev552 if you can build a small project to which we can access via github and try ourselves would help a lot. Thanks

from mongock.

dieppa avatar dieppa commented on June 4, 2024

Hello @nhandev552 , could you provide that, so we can help you faster?

from mongock.

nhandev552 avatar nhandev552 commented on June 4, 2024

Hi, @dieppa thanks for supporting.

The simple project to reproduce: https://github.com/nhandev552/mongck-with-aot.

I worked around by clone mongodb-springdata-v4-driver source code and adding @NestedConfigurationProperty on the field io.mongock.driver.mongodb.springdata.v4.config.MongoDBConfiguration.WriteConcernLevel, building AOT works well

from mongock.

dieppa avatar dieppa commented on June 4, 2024

Thanks @nhandev552, for the project. We'll let you know soon.

Anyway, If you thing that it's a workaround that is valiable for now, you may want to create a PR and we can take a look.

Thanks!!

from mongock.

Rocker93 avatar Rocker93 commented on June 4, 2024

I can confirm the issue. The mentioned fix is part of the solution. Second issue is that MongockCommunityProperties doesn't expose mongock.properties resource for native processing. As a workaround it is possible to add it into app resources and expose via native hints.

from mongock.

Rocker93 avatar Rocker93 commented on June 4, 2024

Even after the changes proposed, I still have issues with Mongock. Mongock works fine when the same app runs on JVM, unfortunately, the GraalVM build has the following issues. For some reason MongoSync4ChangeEntryRepository#getEntriesLog doesn't return any result. I've tried registering native hints for MongoDB Document, FindIterable, but it didn't help. The other issue is that MigrateExecutorBase#fetchAndPrepareChangeLogs doesn't return any result, even though I've registered all changelogs in native hints as well.

from mongock.

mathieuales avatar mathieuales commented on June 4, 2024

Hi !
Any news on this subject?
I'm facing same same issue
I added mongock.properties to hints resources but next problem seems related to org.reflections:

org.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found [resource:/] either use fromURL(final URL url, final List<UrlType> urlTypes) or use the static setDefaultURLTypes(final List urlTypes) or addDefaultURLTypes(UrlType urlType) with your specialized UrlType.
at org.reflections.vfs.Vfs.fromURL(Vfs.java:113) at org.reflections.vfs.Vfs.fromURL(Vfs.java:95) at org.reflections.Reflections.lambda$scan$2(Reflections.java:176) at [email protected]/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) at [email protected]/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707) at [email protected]/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at [email protected]/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290) at [email protected]/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) at [email protected]/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at [email protected]/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:686) at [email protected]/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159) at [email protected]/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173) at [email protected]/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) at [email protected]/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) at [email protected]/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765) at org.reflections.Reflections.scan(Reflections.java:173) at org.reflections.Reflections.<init>(Reflections.java:126) at org.reflections.Reflections.<init>(Reflections.java:159) at io.mongock.runner.core.executor.changelog.ChangeLogServiceBase.mergeChangeLogClassesAndPackages(ChangeLogServiceBase.java:160) at io.mongock.runner.core.executor.changelog.ChangeLogServiceBase.fetchChangeLogs(ChangeLogServiceBase.java:138) at io.mongock.runner.core.executor.operation.migrate.MigrateExecutorBase.fetchAndPrepareChangeLogs(MigrateExecutorBase.java:77) at io.mongock.runner.core.executor.operation.migrate.MigrateExecutorBase.executeMigration(MigrateExecutorBase.java:47) at io.mongock.runner.core.executor.operation.migrate.MigrateExecutorBase.executeMigration(MigrateExecutorBase.java:18) at io.mongock.runner.core.executor.MongockRunnerImpl.execute(MongockRunnerImpl.java:57)

from mongock.

dieppa avatar dieppa commented on June 4, 2024

Hello @mathieuales , @Rocker93 and @nhandev552 , sorry for the delay.

As mentioned, we'll provide official support with a proper solution in the next major release, however, as there is a clear demand for this, we have release a workaround with the expectation you can carry on working until the official GraaVM support is released.

We have create an example that you can pull form this repo.

Please let us know if you find anything or you need some help.

Thanks for the patience.

from mongock.

mathieuales avatar mathieuales commented on June 4, 2024

Thanks for example, i'll try this asap

from mongock.

rfelgent avatar rfelgent commented on June 4, 2024

hello,

what is the current state @dieppa ? Is there official support by mongock library or do I have to use that work around?

from mongock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.