event-catalog / eventcatalog

An open source documentation tool to bring discoverability to your event-driven architectures
https://eventcatalog.dev
MIT License
1.81k stars 152 forks source link

Files are only partly copied in 2.9.1 #892

Closed otbe closed 1 month ago

otbe commented 1 month ago

I tried this:

After upgrading from 2.8.12 to 2.9.1 we receive a new error during build of the catalog.

This happened:

@mdx-js/rollup] Expected a closing tag for `<Accordion>` (7:1-7:35)
file: /builds/eventcatalog/.eventcatalog-core/src/content/events/foo/bar/index.mdx:undefined:undefined

After looking into .eventcatalog-core/src/content/events/foo/bar/index.mdx and its source events/foo/bar/index.md I noticed that half of the file content is just missing. The mdx version stops a t a certain point which explains the missing closing tag. Looks llke the copy script is not waiting for the file being written successful/flushed or something like this?

I expected this:

It should still work after upgrade :)

Is there a workaround?

None yet

Anything else?

No response

EventCatalog Version

2.9.1

Node.js Version

20 LTS

Platform(s)

Linux

Community Notes

boyney123 commented 1 month ago

Thanks @otbe , that's odd, will take a look! Any idea how to replicate?

otbe commented 1 month ago

Actually @boyney123 I dont have an idea how to reproduce. We have a lot of events and its reproducable locally (mac, m2) and on CI (al2023).

otbe commented 1 month ago

@boyney123 I think I tracked down the issue to this method: https://github.com/otbe/eventcatalog/blob/70d27a72751222fecdec5fe2f718156e179340ce/scripts/eventcatalog-config-file-utils.js#L84

As soon as your file contains '---' somewhere everything after this is lost.