SD-1615 add secret names to the SD cli output#1643
SD-1615 add secret names to the SD cli output#1643Brian Strauch (brianstrauch) merged 10 commits intomainfrom
Conversation
| if len(name) > secretNameSizeLimit { | ||
| return nil, fmt.Errorf(`secret name "%s" cannot exceed %d characters`, name, secretNameSizeLimit) | ||
| } |
There was a problem hiding this comment.
Is this validation not performed by the backend?
There was a problem hiding this comment.
it is validated at the backend, but I thought doing validation here would be a better user exp. Or does CLI not checking such in general to avoid duplicate implementation?
There was a problem hiding this comment.
Yeah, I'd rather not run into a situation where the secret size limit gets changed in the backend but not here (since we don't have any system tests for this)
There was a problem hiding this comment.
If the backend is going to return an error message that says the same thing anyway, there should be no reason to write the same code twice!
There was a problem hiding this comment.
that's fair, I've removed the secret name check, but kept the regex check in place, because that's far more likely to be violated hence better to have a local client side validation.
Checklist
What
SD CLI should also print out the secret names stored by the backend, which is already part of the api response
References
https://confluentinc.atlassian.net/wiki/spaces/DI/pages/2920416089/Design+Note+Stream+Designer+API+and+CLI+with+source+code+and+secrets
Test & Review