Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valid topics maps fail to build intermittently depending on size and/or location of maps #165

Open
gabriel-ocp opened this issue Apr 27, 2022 · 3 comments

Comments

@gabriel-ocp
Copy link

Using the map in https://github.com/gabriel-ocp/ocp-bare-bones/blob/main/_topic_map.yml:

  • Render the bare bones OCP repo using asciibinder build with top level _topic_map.yml - build works
  • Move map into separate _topic_maps folder on its own and re-render - build fails
  • Copy OSD topic map into folder and re-render OCP topic map - build works
  • Remove chunk of OSD map and re-render OCP topic map - build fails
  • Restore chunk of OSD map and re-render OCP topic map - build works

The exact steps for reproducing the problem are available at:

https://source.redhat.com/groups/public/gabrielocp/videos/ab_part01_reproducing_build_issuesmp4~1

@gabriel-ocp
Copy link
Author

The problem seems to how the temporary file, which is used for combining multiple maps, is written and read.

https://stackoverflow.com/questions/18052966/ruby-how-to-write-to-tempfile recommends .close or .rewind

https://ruby-doc.org/stdlib-2.5.3/libdoc/tempfile/rdoc/Tempfile.html recommends .rewind

So the solution seems to be to add a tf.rewind after writing to the tmp file, before trying to read from it.

@vikram-redhat
Copy link
Contributor

@gabriel-ocp I assume you have been able to test this?

@rohennes
Copy link

rohennes commented Aug 4, 2022

I have replicated the issue with my local asciibinder build. Using @gabriel-ocp's container image with his updated version of asciibinder, I verified the fixes worked as expected.

vikram-redhat added a commit that referenced this issue Jan 16, 2023
#165 Valid topics maps fail to build intermittently depending on size and/or location of maps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants