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

Setting up development environment fails with gradle quarkusDev #9656

Open
Koenkk opened this issue Sep 27, 2024 · 6 comments
Open

Setting up development environment fails with gradle quarkusDev #9656

Koenkk opened this issue Sep 27, 2024 · 6 comments

Comments

@Koenkk
Copy link
Contributor

Koenkk commented Sep 27, 2024

Issue description

I'm trying to setup a local development environment for Nessie.

The first problem I ran into is after executing ./gradlew quarkusDev the UI is not accessible on http://localhost:19120. It looks to me that :nessie-quarkus does not start when running ./gradlew quarkusDev. This is solved by executing ./gradlew :nessie-quarkus:quarkusDev, am I doing something wrong or is the information in the README.md outdated?

Now that the UI is accessible, I run into a second problem. Whenever I open the UI I get the following error (in the terminal running ./gradlew :nessie-quarkus:quarkusDev):

     2024-09-27 16:08:36,125 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-4) HTTP Request to /api/v1/trees/tree failed, error id: c9627606-91f0-47d4-976a-6af0365bcab2-6: java.lang.NoClassDefFoundError: org/projectnessie/nessie/relocated/protobuf/UnsafeByteOperations
        at org.projectnessie.versioned.storage.common.indexes.StoreIndexImpl.serialize(StoreIndexImpl.java:522)
        at org.projectnessie.versioned.storage.common.logic.CommitLogicImpl.buildCommitObj(CommitLogicImpl.java:718)
        at org.projectnessie.versioned.storage.common.logic.CommitLogic.buildCommitObj(CommitLogic.java:186)
        at org.projectnessie.versioned.storage.common.logic.CommitLogicImpl.doCommit(CommitLogicImpl.java:277)
        at org.projectnessie.versioned.storage.common.logic.RepositoryLogicImpl.initializeInternalRef(RepositoryLogicImpl.java:261)
        at org.projectnessie.versioned.storage.common.logic.RepositoryLogicImpl.initialize(RepositoryLogicImpl.java:81)
        at org.projectnessie.versioned.storage.common.logic.RepositoryLogicImpl.initialize(RepositoryLogicImpl.java:73)
        at org.projectnessie.quarkus.providers.storage.PersistProvider.produceWithInitializedRepository(PersistProvider.java:104)
        at org.projectnessie.quarkus.providers.storage.PersistProvider_ProducerMethod_produceWithInitializedRepository_sL325iqwi3y6FdhYHbfY

I found a possible fix here: #8483 (comment) ( ./gradlew :nessie-protobuf-relocated:build) but this unfortunately does not help. How can I solve this?

@dimas-b
Copy link
Member

dimas-b commented Sep 27, 2024

@Koenkk thanks for reporting inconsistencies in README.

To unlock your local development, would it work for you to do ./gradlew :nessie-quarkus:assemble and then run java -jar servers/quarkus-server/build/quarkus-app/quarkus-run.jar from the command line?

@Koenkk
Copy link
Contributor Author

Koenkk commented Sep 28, 2024

@dimas-b thanks for your reply, I forgot to mention it in my post but this worked indeed (ran ./gradlew :nessie-quarkus:build and then java -jar quarkus-run.jar). However I would like to run it with qaurkusDev so I can quickly test out code changes and debug easily.

Once the UnsafeByteOperations error is fixed I can make a PR to update the README.md.

@snazy
Copy link
Member

snazy commented Sep 30, 2024

This is an issue in the Quarkus-Gradle plugin, that requires quite a lot of refactoring of the Quarkus-Gradle plugin.

@Koenkk
Copy link
Contributor Author

Koenkk commented Sep 30, 2024

That's a bit of a bummer, so if I understand correctly, there is no way to develop nessie-quarkus through quarkusDev? Doesn't that lead to a slow development cycle? Debugging becomes harder and the feedback cycle is slow (you need to rebuild it with ./gradlew :nessie-quarkus:assemble and restart it every time).

@snazy
Copy link
Member

snazy commented Sep 30, 2024

You can still debug tests in the IDE - and connecting to a running Quarkus instance w/ a debugger is also still possible.

@Koenkk
Copy link
Contributor Author

Koenkk commented Sep 30, 2024

Thanks, I've created a PR to update the README.md: #9668

@dimas-b dimas-b changed the title Setting up development environment fails Setting up development environment fails with gradle quarkusDev Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants