Skip to content

Add non-interactive shell runner customizer #358

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

Merged

Conversation

onobc
Copy link
Contributor

@onobc onobc commented Jan 31, 2022

  • Add ordering on the ApplicationShellRunner which is different than the order on the DefaultApplicationRunner. The latter is order that the default runner will execute wrt other application runners. However, the shell runner order is the order that the default app runner will consider them for "1st available to handle the shell".

  • Refactored the shell runners javadocs to clearly spell out the above and make them consistent w/ the new mechanism (not the enabled property of days old).

  • Added customizer which allows us to replace the skipper InteractiveApplicationRunner w/ a customizer that simply filters out the non-command args from the ApplicationArguments (@jvalkeal )

This is WIP as I have not added any unit/int testing. I have manually verified the interactive and non-interactive cases in skipper manually though. (spring-attic/spring-cloud-skipper#1026)

*/
@Order(DefaultApplicationRunner.PRECEDENCE)
public class DefaultApplicationRunner implements ShellApplicationRunner {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[UNRELATED] I would like to rename this to DefaultShellApplicationRunner for specificity.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah true, we could do it with this pr.

@jvalkeal
Copy link
Contributor

Other than that, I think this looks good!

onobc added 2 commits January 31, 2022 23:19
* Add test for ShellRunnerAutoConfiguration
@onobc onobc changed the title WIP: Add non-interactive shell runner customizer Add non-interactive shell runner customizer Feb 1, 2022
@jvalkeal jvalkeal added this to the 2.1.0-M2 milestone Feb 1, 2022
@jvalkeal jvalkeal merged commit 0efd71a into spring-projects:main Feb 1, 2022
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

Successfully merging this pull request may close these issues.

2 participants