Closed hansena closed 8 months ago
Totally open to this being entirely on me missing something obvious but I've done more than a few laps on this and can't seem to turn up anything that seems like it would cause this to fail. Any direction will be greatly appreciated.
Hi, sorry for late reply.
One thing that I'm unsure of is the validation. I know we have it in the code, but the noNamespaceSchemaLocation needs to be updated (possibly).
But that might be an issue after the parsing has passed.
I'll try to test a bit if I get time tonight. But some common problem that I've experienced with different parsers are.
File has switched encoding and there is a non printable char in the beginning of the file.
File isn't actually UTF-8 encoded.
As far as SchemaSpy goes it seems to think that the file exist and it runs in problems when trying to parse.
Secondly, which I think might be a typo either in command or when added to GitHub is the mount argument which might get treated as a volume and folder.
I checked the code last night and we might only look if it exists and not if it's a volume.
But as I wrote earlier I don't think that the mount works
-v "$PWD/.schemaspy/discovery_apic4e.meta.xml"
Since it's missing target/destination in container.
Totally unrelated to the issue, but I saw you are using MacOS, if your using Apple Silicon, you can use tag snapshot and get better performance since it has an arm64 image.
I've also verified that if the mount is wrong. SchemaSpy will try to parse a folder and that's wrong.
Need to add som validation that we are actually trying to read a file and that we are able to read it. So that is something we can do in regards to error handling.
As for the validation that I mentioned, it must be relaxed and ignore the defined one.
I copied the meta xml above and added it to folder and specified the folder as meta. I was able to parse it without issues.
So either it's the file encoding issue or you mount is not correct.
You can add to nerdctl -ti --rm --entrypoint sh
and remove alla arguments after schemaspy/schemaspy:latest
this will drop you into a shell with in the container and you can validate the mounts and also run vi
and check the contents.
@npetzall you’re 100% right on the bad mount. Thanks a ton for the quick response
Expected Behavior
SchemaMeta should be processed and generate a foreign key relationship.
Current Behavior
Steps to Reproduce
Configure
discovery_apic4e.meta.xml
as:Configure
schemaspy.properties
as:Run schemaspy in a docker container using the command:
Review stdout
Context
N/A
N/A
Your Environment
schemaspy/schemaspy:latest
N/A
MacOS 14.3.1