hotfix: [M3-7085] Edit VLAN config validation bug #9644
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description 📝
Latest API release was responsible for exposing an issue with our validation schema when editing a linode config.
NOTE: I will write an e2e test to cover this issue in a subsequent PR
Our config interfaces properly types
interface.label
andinterface.ipam_address
asstring | null
, however our yup schema validation (which apparently never encountered a null value before) was throwing an error.This is due to the fact that the API now seems to return a default public record (brand new Linode created with VLAN) in the interface array which has
null
ipam_address
&label
.ex payload for config interfaces with a newly created linode with VLAN
Wether or not this is intended, our validation schema should still be able to handle
null
values as defined by our types so this PR should be relevant nonetheless.Major Changes 🔄
null
interface recordlabel
&ipam_address
to go through YUP validationHow to test 🧪
/linodes/49433992/configurations
and edit config