-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fail validation for blank changeset ids (DAT-18773) #6472
base: master
Are you sure you want to change the base?
Conversation
@@ -184,7 +184,7 @@ protected void validateChange(ChangeSet changeSet, Database database, Change cha | |||
|
|||
private boolean areChangeSetAttributesValid(ChangeSet changeSet) { | |||
boolean authorEmpty = StringUtils.isEmpty(changeSet.getAuthor()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we introduce another validation for the author as well, since it also uses isempty? Maybe in another ticket?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. If we apply the same logic for author
, I think we can remove the strict validation we added some time ago.
@@ -184,7 +184,7 @@ protected void validateChange(ChangeSet changeSet, Database database, Change cha | |||
|
|||
private boolean areChangeSetAttributesValid(ChangeSet changeSet) { | |||
boolean authorEmpty = StringUtils.isEmpty(changeSet.getAuthor()); | |||
boolean idEmpty = StringUtils.isEmpty(changeSet.getId()); | |||
boolean idEmpty = StringUtils.isBlank(changeSet.getId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abrackx but this is validation all changesets, including existing ones right? IT's not in the ticket description, but ther eis a comment stating:
We will not fix changesets that have been already deployed with empty ChangeSetIDs
So if the changeset was already applied we should not validate it, otherwise the user will have to fix it and will have a changeset mismatch.
can we do it here?
filipe's comments need to be addressed
Impact
Description
If a changeset id is entirely blank (one or more spaces) fail validation.
Things to be aware of
Things to worry about
Additional Context