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

Upgrade to 6.1.1 fails when Redis is in place with other plugins (ex. OAuth) #13324

Closed
rmondejar opened this issue Dec 20, 2023 · 4 comments · Fixed by grails/grails-async#69 or grails/grails-async#70
Assignees

Comments

@rmondejar
Copy link

Expected Behavior

After upgrading a basic application that uses Redis and other plugins (like OAuth or Jesque) from Grails version 6.1.0 to 6.1.1, we anticipate the application to start as usual.

This expectation is particularly reasonable given that the upgrade is a minor version change.

Actual Behaviour

The app fails to start with the following error:

Field grails_events_Events__eventBus in uk.co.desirableobjects.oauth.scribe.OauthResourceService required a bean of type 'reactor.bus.EventBus' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=false)


Action:

Consider defining a bean of type 'reactor.bus.EventBus' in your configuration

Steps To Reproduce

  1. Create a vanilla app with Grails Forge (6.1.1)
  2. The app starts nicely
  3. Add the following plugins in the build.gradle:
implementation("org.grails.plugins:oauth:4.0.0")
compileOnly("org.grails.plugins:redis:2.0.5")
runtimeOnly("redis.clients:jedis:2.10.2")
  1. Running the app fails

Alternatively, just checkout the following project:
https://github.com/rmondejar/grails-611-issue
Although the only changes are:
https://github.com/rmondejar/grails-611-issue/blob/main/build.gradle#L60-L62

Environment Information

openjdk version "17.0.9" 2023-10-17
OpenJDK Runtime Environment Temurin-17.0.9+9 (build 17.0.9+9)
OpenJDK 64-Bit Server VM Temurin-17.0.9+9 (build 17.0.9+9, mixed mode)

Example Application

https://github.com/rmondejar/grails-611-issue

Version

6.1.1

@matrei
Copy link
Contributor

matrei commented Dec 20, 2023

This is probably because grails-events and grails-async was updated to 5.0.0 in grails-core 6.1.1.
Deprecated class reactor.bus.EventBus (and other) were removed in grails-events:5.0.0.

You should be able to downgrade manually by adding the following to the dependencies section of build.gradle:

implementation 'org.grails.plugins:events:4.0.0'
implementation 'org.grails.plugins:async:4.0.0'

Those deprecated classes should probably be added back and org.grails.plugins:events:5.0.1 released to be included in Grails 6.1.2 or alternatively Grails 6 should be downgraded to 4.0.0 again.

@puneetbehl
Copy link
Contributor

I believe we should add those classes back in 5.0.1 release. If you can send a PR, I will try to get it out this week and patch Grails 6.

@matrei
Copy link
Contributor

matrei commented Dec 21, 2023

https://github.com/antony/grails-oauth-scribe is based on Grails 3.0.3. Prior to Grails 3.3.0 events and async was baked into grails-core. Even though none of this functionality is used in grails-oauth-scribe, its Grails artifacts still requires to get an reactor.bus.EventBus injected or it will blow up. Grails 6.1.2 is planned to contain grails-async:5.0.1 which reverses the removal of these classes and will resolve this issue.

@matrei
Copy link
Contributor

matrei commented Dec 21, 2023

Scratch the previous comment. It turned out that the deprecated files are not missing from 5.0.0. They were removed after that release. The real problem was that grails-plugins-async (that gets added to grails applications by grails-dependencies) was not longer pulling in grails-plugin-events (which it does not really depend on). This is should now be resolved by grails/grails-async#70.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants