Skip to content

3.3.0-RC1 spring shell version doesn't show the shell prompt #1081

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

Closed
madukan opened this issue May 31, 2024 · 4 comments
Closed

3.3.0-RC1 spring shell version doesn't show the shell prompt #1081

madukan opened this issue May 31, 2024 · 4 comments

Comments

@madukan
Copy link

madukan commented May 31, 2024

I used the start.spring.io intializer to generate a Spring Shell project with GraalVM. The version 3.3.0 Spring Boot with the Spring Shell version 3.3.0-RC1 does not by default (or able to get there in anyway I could see) get to the shell prompt (shell:>).

This is the POM overall. And will attach the sample project too to this.

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>3.3.0</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
	<groupId>com.example</groupId>
	<artifactId>demo</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>demo</name>
	<description>Demo project for Spring Boot</description>
	<properties>
		<java.version>21</java.version>
		<spring-shell.version>3.3.0-RC1</spring-shell.version>
	</properties>

Would it be possible to get some light shed on this please?
I'm not sure if its a but or some expected changes here.

A sample project to demonstrate the issue:
demo 2.zip

Observation
The parameters seem to work (hello custom command, help default commands etc would print the outputs as expected.). However not the standard prompt.

Wen run with no parameters application exits with below lines at the end:

2024-05-31T21:58:21.817+10:00  INFO 9047 --- [demo] [           main] com.example.demo.DemoApplication         : Started DemoApplication in 0.943 seconds (process running for 1.217)

Process finished with exit code 0

Expected result
Expectation is that when the project is run (DemoApplication class), the shell prompt should come thorough and let the user interact.

2024-05-31T22:00:02.507+10:00  INFO 9064 --- [demo] [           main] com.example.demo.DemoApplication         : Started DemoApplication in 0.738 seconds (process running for 1.024)
shell:>

NOTE: <spring-shell.version>3.2.4</spring-shell.version> works fine. Only
<spring-shell.version>3.3.0-RC1</spring-shell.version> found to have this issue.

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label May 31, 2024
@madukan
Copy link
Author

madukan commented May 31, 2024

Just found out this is due to by default interactive mode is set to off in Spring Shell 3.3.0-RC1. Not sure if this is by design.

I was able to re-enable by adding the following to application.properties.

spring.shell.interactive.enabled=true

An updated version of the same project: demo 3.zip

@jvalkeal jvalkeal removed status/need-triage Team needs to triage and take a first look labels May 31, 2024
@jvalkeal
Copy link
Contributor

Indeed this is intended breaking change in 3.3.x mentioned in https://docs.spring.io/spring-shell/reference/3.3/execution.html#using-shell-execution-shellrunner.

Part of better testing stories so that default skeleton project would not hang when running tests which was always confusing for users.

@madukan
Copy link
Author

madukan commented Jun 1, 2024

I see. Thanks for confirming.

So no more meddling with the test configurations like this then! :

@SpringBootTest("spring.shell.interactive.enabled=false")

@jvalkeal
Copy link
Contributor

jvalkeal commented Jun 2, 2024

Yes, that was partially motivation for a change and we can only do behavioural changes like this with minor versions.

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

2 participants