feedback
feedback copied to clipboard
Increase the flag name limit from 45 chars to at least 1024 chars (the DB field and UI with possible truncation)
A prospective customer uses complex package name (paths) to convert them into flags. Our current limit of 45 chars is an eventual blocker issue.
Proposal: increase DB field size and API validation (as well as other processing layers) to support 1024 chars. The customer doesn't intend to use the full size, with most flags likely being around 200 chars. However, since we are making the change let's make it future proof.
Some items to consider:
- Github PR comment can only support so many chars (tested with 100), without the flag table looking misaligned.
- In the Codecov UI, the "Uploads" sections is too small. A flags with 50+ chars in the name will be pushing the "box" beyond the limits. Suggestion: convert this section to a modal that can fill most of the screen.
- Flags drop down for selecting/searching needs to be able to support a larger number of chars
- In some cases (such as the drop-down) the UI truncation of the beginning characters (ending is likely to be the most unique part) is acceptable to preserve aesthetics and functionality
- URL query string length has to be able to accept larger number of chars + other params
Additional important request:
- Allow "special chars" such as
;to be allowed in the flag name. (URL encode special chars, required for complex names)
After testing, it seems to fail (at least at first) during the upload. Need to take a look if there's validation on the upload endpoint.
Thanks for posting this @vlad-ko. Let us know if there is anything else we can test or any other info we can provide to the team.
One blocking validation needs to be relaxed here: https://github.com/codecov/shared/blob/9802cb57362193cc1d96bbadd649bbf1417ce50f/shared/validation/user_schema.py#L1
Example of failing upload
Nov 14 23:37:08.788: [2023-11-14T23:37:08.787Z] ['info']
Nov 14 23:37:08.788: _____ _
Nov 14 23:37:08.788: / ____| | |
Nov 14 23:37:08.788: | | ___ __| | ___ ___ _____ __
Nov 14 23:37:08.788: | | / _ \ / _` |/ _ \/ __/ _ \ \ / /
Nov 14 23:37:08.788: | |___| (_) | (_| | __/ (_| (_) \ V /
Nov 14 23:37:08.788: \_____\___/ \__,_|\___|\___\___/ \_/
Nov 14 23:37:08.788:
Nov 14 23:37:08.788: Codecov report uploader 0.7.1
Nov 14 23:37:08.789: [2023-11-14T23:37:08.789Z] ['error'] There was an error running the uploader: Flags must consist only of alphanumeric characters, '_', '-', or '.' and not exceed 45 characters. Received sixtyfivechars_qwertyuiopasdfghjklzxcvbnmzxcvbnmaaaaaaaaaaaaaaaa
this was done