This PR adds import status feedback to topaz ds import and topaz ds restore.
The Importer service will return an ImportStatus message when a content or model validation error occurs in the return stream to the import client.
For example:
❯ topaz ds import -i -d ./assets/acmecorp
>>> importing data from ./assets/acmecorp
error : "object.id" cannot contain any spaces or other whitespace characters - InvalidArgument (3)
error : "uses": object type not found - NotFound (5)
error : "user:managers": relation not found - NotFound (5)
error : "users": object type not found - NotFound (5)
error : "relation.relation" must be all lowercase, start with a letter, can contain letters, digits, dots, underscores, and dashes, and must end with a letter or digit - InvalidArgument (3)
error : "relation.object_type" must be all lowercase, start with a letter, can contain letters, digits, dots, underscores, and dashes, and must end with a letter or digit - InvalidArgument (3)
error : "relation.relation" must be all lowercase, start with a letter, can contain letters, digits, dots, underscores, and dashes, and must end with a letter or digit - InvalidArgument (3)
error : "relation.subject_type" must be all lowercase, start with a letter, can contain letters, digits, dots, underscores, and dashes, and must end with a letter or digit - InvalidArgument (3)
error : "groups": object type not found - NotFound (5)
error : "groups": object type not found - NotFound (5)
error : "groups": object type not found - NotFound (5)
objects : 839 (set:837 delete:0 error:2)
relations : 1905 (set:1896 delete:0 error:9)
Content validation errors appear as an InvalidArgument (status code 3) error with a description of the specific failed validation condition.
Model validation errors appear as an NotFound (status code 5) error with a description detailing the object or relation type not found in the manifest.
This PR adds import status feedback to
topaz ds import
andtopaz ds restore.
The Importer service will return an ImportStatus message when a content or model validation error occurs in the return stream to the import client.
For example:
Content validation errors appear as an
InvalidArgument
(status code 3) error with a description of the specific failed validation condition.Model validation errors appear as an
NotFound
(status code 5) error with a description detailing the object or relation type not found in the manifest.The ImportStatus message contains the import request instance that caused the error, see: https://buf.build/aserto-dev/directory/docs/v0.31.6:aserto.directory.importer.v3#aserto.directory.importer.v3.ImportStatus