-
Notifications
You must be signed in to change notification settings - Fork 7
Issue 53586: Domain field with long name can result in "PropertyURI cannot exceed 300 characters, but was 302 characters long." #6939
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
Conversation
…roperty name in PropertyURI
labkey-klum
left a comment
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 pulled this down and ran with it locally. I'd be fine relying on the automated tests over a manual test pass.
…propertyURI instead of name
… tableAliasMap option
|
|
||
| // Return the "name" portion of the propertyURI after the hash | ||
| // Return the "name" portion of the propertyURI after the hash (Issue 30718) | ||
| private String getPropertyName(DomainProperty dp) |
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.
This behavior seems strange now. It's not really returning the property name for (most) new-style PropertyURIs
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.
@labkey-jeckels I agree but I don't think this code can actually be hit for any newly created properties. It is executed for Sample Types that have the parentCol, idCol1, idCol2, idCol3 behavior which is deprecated. I couldn't find a way in the UI to create one of these. I took the XAR file from that issue 30718 and imported it locally and this code did the right thing for those PropertyURIs in the XAR. Thoughts on other ways to test this? Since you can't create these types of Sample Types anymore, I think the code should continue working for any existing property descriptors in those deprecated sample types.
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.
Got it. I hadn't looked at the usages. Do you think we should mark this or related methods as deprecated?
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.
Yeah, I'll take a look
Rationale
https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=53586
Several places in the code generated PropertyURIs for a domain field by appending the encoded field name to the domain type URI prefix. This can create long PropertyURI values that exceed our 300 char limit. This PR updates the DomainUtil.createUniquePropertyURI() helper to replace the "encode field name" with a Lsid DB seq as we've moved towards for other URI related cases recently.
Related Pull Requests
Changes