restfulapi / restful-api

Grails plugin to facilitate exposing non-trivial RESTful APIs
Apache License 2.0
52 stars 27 forks source link

Support Grails 3 #26

Closed snowping closed 7 years ago

snowping commented 9 years ago

First of all: Your plugin is awesome. Thank you!

Are you planning to support Grails 3 as well?

sriddell commented 9 years ago

Glad you like it.

I suspect we will be doing Grails 3 support, although we haven't taken a real look at it yet to see what changes may be necessary and I don't have a timeline for that yet.

sriddell commented 9 years ago

Support for Grails 3 is now being worked on.

pcjericks commented 8 years ago

Any progress on Grails 3?

sriddell commented 8 years ago

Most of it has been converted; we were being held up by some other plugins that weren't ready for Grails 3 yet. I will try to check back on the status of those shortly to see if we can finish it up.

Thanks for the reminder!

pcrgarret commented 7 years ago

Has there been any progress? Thanks for this plugin by the way.

sriddell commented 7 years ago

Slow, but yes. All the tests are passing under grails 3.x except the functional ones (which just appears to be a config problem we haven't figured out yet).

jrbostic commented 7 years ago

Hey, I'm a member of the same organization as pcjericks and pcrgarret above. Just wanted to let you know that we have a pull request out to cache-headers plugin ( https://github.com/grails-plugins/cache-headers/pull/5 ), which is currently under review, to move that plugin fully to 3.x with running tests and proper signatures on trait methods. Simultaneously, we have taken your original g3 branch and completed the move through to Grails 3.2.9. All original tests passing. Wondering if you're interested in receiving these changes? Thanks!

bbellsct commented 7 years ago

Hi. We’re checking within our organization to determine the best path forward and will get back to you later this week.

bbellsct commented 7 years ago

Hey. I got pulled off onto other things, and trying to get back to this issue. Have you submitted a pull request for your changes. I didn't see it listed.

jrbostic commented 7 years ago

I have not generated a pull request at this point due to the cache-headers plugin dependency being still under review for that project (see PR link in above comment). It appeared that there was some busy-ness around gr8conf this last week. Hoping that they will have time to get back to that pretty soon here. I can certainly generate a request to begin the review process, however it will not be deployable until cache-headers receives updates.

bbellsct commented 7 years ago

We can wait until the plugin dependency clears review. Thanks.

jrbostic commented 7 years ago

Sorry about the delay here. The cache-headers PR was reviewed and then overlooked for a repo-owner's changes. They didn't fix the bug we needed fixed though. I've submitted a new pull request to them with the changes ( https://github.com/grails-plugins/cache-headers/pull/7 ) and pinged them on the developers forum. Will check in again if/when I hear back.

jrbostic commented 7 years ago

So, the cache-headers plugin was updated this week. Here's the pull request for the restful-api branch containing that updated dependency: https://github.com/restfulapi/restful-api/pull/35

bbellsct commented 7 years ago

Thanks. I'l try and allocate some time next week for review.

basejump commented 7 years ago

@jrbostic I am trying to test your https://github.com/jrbostic/restful-api/tree/g3 branch. the grailsVersion=3.0.7 in gradle.properties correct? how are you running your tests with this project?

basejump commented 7 years ago

using grails compile I get

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/basejump/source/9os/restful-api/restful-api/build.gradle' line: 16

* What went wrong:
An exception occurred applying plugin request [id: 'io.spring.dependency-management', version: '0.5.2.RELEASE']
> Failed to apply plugin [id 'io.spring.dependency-management']
   > Could not create task of type 'DependencyManagementReportTask'.

running 3.2.11

got it working by running ./gradlew check but thats using 3.0.7. I thought I saw you mention it worked with 3.2.9

jrbostic commented 7 years ago

I think the issue is that the original Gradle version I was using was 2.9... the version of Grails should still be 3.2.9. And tests should be run from the test-restful-api directory (tasks "test" and "integrationTest"). I apologize for the lack of clarity on that.

basejump commented 7 years ago

still not really understanding how you are running it with grails 3.2.9, both grails or ./gradlew fail. If you have gradle.properties set with grailsVersion=3.0.7 then I don't think it will use your grails that is installed. if you change grailsVersion=3.0.7 to 3.2.9 is it working for you?

basejump commented 7 years ago

FYI we started flushing out a new plugin that will use the new grails 3 and the views. beginings are here. Instead of services/adapters the idea is that it can rely on what the dao plugin does for the [list,create,update,delete] was going to get some ideas from this plugin or try and upgrade it then say your update to this issue. https://9ci.github.io/gorm-rest-api/ Let me know thoughts on this @bbellsct . Are you guys planning on continuing to build out this plugin?

jrbostic commented 7 years ago

Sorry, wish I had a better answer for you. What I do know is that I saw the same error as you while using Gradle 3.4.1, however when I switched back to Gradle 2.9 (which is what was being used at the time of development, I believe)... everything ran fine. We are currently using an internally deployed version of this that works (as a dependency for a Grails 3.2.9 app), all of the tests run and pass... so I know it can be done. However, I'm hesitant to speak on the behavior of gradle-related commands outside of the building and testing... I just don't have insight into the ./gradlew command and why it may not work.

basejump commented 7 years ago

@jrbostic thanks. when you say "tests run and pass", wow are you successfully running the tests on that project? with ./gradlew check?

jrbostic commented 7 years ago

@basejump The tests are currently running successfully using gradle test and gradle integrationTest tasks from the test project directory using Gradle 2.9. I simply finished the work that was originally being done on the g3 branch and ported the cache-headers plugin forward (although Segio del Amo ended up just fixing in his own separate branch via tagged version 2.0.2, I think). The ./gradlew stuff sounds like it would be preferable... and more properly standardized... but at this point I can't commit to figuring out what the issue there is. My inclination is to believe that most of the work is done but that the ./gradlew command lacks some required configuration... but I literally never touched the file or successfully ran the command. Sorry.

basejump commented 7 years ago

@jrbostic thanks for the help. I got it now. I used sdkman to bump my installed gradle down to 2.9 then ran gradle tests and integrationTest against your brach. I see the tests passing now.

bbellsct commented 7 years ago

Jesse, I've finally gotten an opportunity to pull down your changes, and see they are based of the original work from Shane. I am not familiar with Grails 3 and its dependency on gradle. I was able to compile the code, and run some tests, but not all the functional tests ran successfully. It looks like it was not finding one of the test domain classes for ThingWrapper. I am probably just not running the tests from the gradle command correctly. Or, do you use native grails command to run the functional tests? This is using gradle 2.3 and grails 3.0.7 as you have them in your plugin.

I also don't see a readme file that was in the original master branch that would guide a new user to install, build, and run tests. Am I missing where that's been relocated for Grails 3? I also did not see an updated readme file in Shane's original g3 branch. And I thought one of your earlier messages said that had all been updated.

Joshua, we have not yet upgraded to use Grails 3 for our products. We are currently running Grails 2.5, and are actively modifying the restful-api plugin in a separate branch based on the original 1.0 version. This work is to support new features required for our existing product line. They provide support for filtering of content based on authenticated user, and providing support for dynamically extending content based on the needs of each client. I plan to meet with management team next week to discuss future planning and support for the restful-api plugin.

bbellsct commented 7 years ago

I have accepted your pull request into the base branch. Thanks for all your work on this.

jrbostic commented 7 years ago

Great news! Apologies for the holes left in documentation. I'm still trying to wrap my head around expectations and requirements of open source projects. Thanks for your consideration of our work!