You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
When an operator specifies a non-existent JSON/YAML file for parsing, the system produces the above error. This error leads the operator to believe that content may have triggered the marshalling error. Instead, the actual file does not exist.
EXAMPLE:
ls: cannot access foo.yaml: No such file or directory
# drpcli contents create foo.yaml
Error: Error parsing layer: error unmarshaling JSON: json: cannot unmarshal string into Go value of type models.Content
EXPECTED RESULT:
Something more along the lines of an error message like: cannot access foo.yaml: no such file or directory
The text was updated successfully, but these errors were encountered:
well - sooo - this is one of those you can't have your cake and eat it too without changing your behavior. The problem is that the parameter following the create is one of 4 thing:
a filename
a JSON string
a string
The cli tests it in that order. '-' which tells the the cli to read from standard in. The value is tested as a filename to see if exists. Then the string is parsed a JSON/YAML and then it is passed as just a string. The function that handles this is used everywhere to make it consistent. This means that when you set a parameter with this style it will eventually default to a implied string type. For the object create functions, this means that string is passed as the object to create and it fails in remarshaling.
I'm not sure how to fix this easily without changing someone's operational pattern that might be working. It could be that we do something specific, but I'm not sure.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When an operator specifies a non-existent JSON/YAML file for parsing, the system produces the above error. This error leads the operator to believe that content may have triggered the marshalling error. Instead, the actual file does not exist.
EXAMPLE:
EXPECTED RESULT:
Something more along the lines of an error message like:
cannot access foo.yaml: no such file or directory
The text was updated successfully, but these errors were encountered: