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

Meaningful message returned if schedule name too long #354

Closed
wants to merge 3 commits into from

Conversation

cppwfs
Copy link
Contributor

@cppwfs cppwfs commented Dec 12, 2019

resolves #353

@cppwfs cppwfs changed the title Meaning message returned if schedule name too long Meaningful message returned if schedule name too long Dec 12, 2019
@@ -190,4 +210,12 @@ private void setImagePullSecret(ScheduleRequest scheduleRequest, CronJob cronJob
.add(localObjectReference);
}
}

private boolean isScheduleNameTooLong(String message ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe validationScheduleNameLength or similar -- mainly to match something liek the other validateScheduleName


private boolean isScheduleNameTooLong(String message ) {
boolean result = false;
if(StringUtils.hasText(message) && message.contains("must be no more than") && message.endsWith("characters")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

consider just inlining

@chrisjs chrisjs self-assigned this Dec 13, 2019
@cppwfs
Copy link
Contributor Author

cppwfs commented Dec 16, 2019

Submitted issue #356 so that we can investigate using the Constraints provided by Fabric8 instead of home-rolling our own.

@chrisjs
Copy link
Contributor

chrisjs commented Dec 16, 2019

merged in 034f9c4

@chrisjs chrisjs closed this Dec 16, 2019
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.

Need a meaningful error message when schedule names are too long
2 participants