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

Review lengths of strings in metadata #342

Open
schlafly opened this issue Nov 30, 2023 · 3 comments
Open

Review lengths of strings in metadata #342

schlafly opened this issue Nov 30, 2023 · 3 comments
Assignees

Comments

@schlafly
Copy link
Collaborator

We hit an issue where roman.meta.program.category had a typo where SURVEY -> SURVYEY. This caused downstream problems because roman.meta.program.category is specified in the database as an nvarchar(6), and SURVYEY has 7 characters. We should review the lengths of all of the strings and tend to make them longer than the absolute minimum to fit the one word we know about so far.

Maybe default to ~20 characters for strings where we don't know what to expect.

@PaulHuwe PaulHuwe self-assigned this Feb 6, 2024
@stscijgbot-rstdms
Copy link
Collaborator

This issue is tracked on JIRA as RAD-147.

@stscijgbot-rstdms
Copy link
Collaborator

Comment by Nadia Dencheva on JIRA:

Paul Huwe I would think this was a good thing - it caught an error. 

Isn't it better in this case to enumerate the values? Or does this bring other problems?

@schlafly
Copy link
Collaborator Author

@nden , If the possible values are really known and likely to change only rarely, I think enum's are reasonable. But in this case I feel like we just picked a string length that was the length of our default and never looked again? But maybe someone actually knows the values and they are all fewer than 6 characters?

I'm happy to be aggressive about allowing only 'allowed' things when we know what's allowed, but I don't think we should box ourselves in when we don't know what the possibilities are.

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

No branches or pull requests

3 participants