-
Notifications
You must be signed in to change notification settings - Fork 461
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
#22872 Avoid creation of duplicate persona tags #23848
Conversation
Postman Tests Report 54 files ±0 729 suites ±0 1h 31m 4s ⏱️ - 2m 10s For more details on these failures, see this check. Results for commit 8f1f482. ± Comparison against base commit a0734f8. ♻️ This comment has been updated with latest results. |
Integration Tests [postgres] Report 425 files ±0 425 suites ±0 1h 3m 32s ⏱️ - 7m 2s For more details on these failures, see this check. Results for commit 8f1f482. ± Comparison against base commit a0734f8. ♻️ This comment has been updated with latest results. |
} | ||
|
||
@Override | ||
public String getMSSQLScript() { |
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.
Does this SQL work in MSSQL?
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.
same
@@ -75,7 +75,7 @@ public Tag getTagAndCreate ( String name, String hostId, boolean persona ) throw | |||
} | |||
|
|||
@Override | |||
public Tag getTagAndCreate(final String name, final String userId, final String siteId, final boolean persona, final boolean searchInSystemHost) throws DotDataException, DotSecurityException { | |||
public Tag getTagAndCreate(final String tagName, final String userId, final String siteId, final boolean persona, final boolean searchInSystemHost) throws DotDataException, DotSecurityException { | |||
|
|||
boolean localTransaction = false; |
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.
Please remove the local transaction logic here and add the @WrapInTransaction
annotation
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.
Done
public Tag getTagAndCreate(final String name, final String userId, final String siteId, final boolean persona, final boolean searchInSystemHost) throws DotDataException, DotSecurityException { | ||
|
||
boolean localTransaction = false; | ||
@WrapInTransaction |
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.
good
* #22872 Avoid creation of duplicate persona tags * #22872 remove dup line * #22872 Upgrade task to get rid of rels to dup tags, and dup tags per se * #22872 compile errors fix * #22872 IT for the UT * #22872 new method in TestDataUtil * #22872 delete with join for MSSQL. Add task to tasklocator. Add wrapIntransacton annotation
For specific reasons sometimes tags names are altered with a ":persona" suffix. This should not change the way some API methods behave.
This fix avoids creating a duplicate tag just because the persona suffix is added when calling the API method that creates the tag.
IT included.