[backend-only] cdp validation#6828
Conversation
| validateStashBoxCredentials(input: StashBoxInput!): StashBoxValidationResult! | ||
|
|
||
| # Validate remote CDP path | ||
| ValidateCDPPath: CDPValidationResult! |
There was a problem hiding this comment.
Would it be good to accept an input parameter here so that users can test before saving? Currently you cant test and it just saves regardless of it it is correct or not.
Should also do camel case here
There was a problem hiding this comment.
debated doing that as well
| } | ||
| if !isCDPPathHTTP(globalConfig) { | ||
| // unable to test non-http CDP | ||
| return fmt.Errorf("Unable to test non-http CDP paths") |
There was a problem hiding this comment.
So, should this be an error? I'm not sure on this one but it seems to me that the path could be valid but just not tested. It would return valid:false then spit the error out to the user. It could be misleading because it's not technically an error just not tested.
Perhaps it should be info level or something unless it's actually invalid.
There was a problem hiding this comment.
using the current way to fetch it, it cant handle it. We would need to do an actual xpath scrape to validate PATHs.
took more time then I would've liked but it's working. Unsure of how to proceed with UI as it's just a string input :/ or if it should be merged backend-only?