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

Intermitent publish corruption only on Linux #29

Closed
prettydiff opened this issue Jan 20, 2017 · 4 comments
Closed

Intermitent publish corruption only on Linux #29

prettydiff opened this issue Jan 20, 2017 · 4 comments
Labels

Comments

@prettydiff
Copy link
Owner

The problem is intermittent and I have only experienced it on my remote Linux webserver. I cannot produce this problem on Windows or OSX.

The problem is present when attempting to publish Pretty Diff:

biddle publish prettydiff

The problem is evident when prettydiff_latest.zip and prettydiff_2.1.15.zip (latest version number) are different sizes. I will need to create a local Linux partition on my Windows computer to investigate this further. I can work around this by unpublishing and republishing until the problem is no longer present, which eventually works but is still not an acceptable solution. This is further not acceptable because the unpublish command will destroy all prior published versions.

A strange side-effect was observed. When attempting to republish from the same current working directory (CWD) as the original publication the zip command was failing and further attempts to republish failed in the same way until I changed my CWD to a different directory.

@prettydiff prettydiff added the bug label Jan 20, 2017
@prettydiff
Copy link
Owner Author

This Linux causing problems is (Red Hat 4.4.7-17) 64bit.

@prettydiff
Copy link
Owner Author

prettydiff commented Jan 21, 2017

How I am noticing the corruption. When the publish command executes it writes 8 zip files:

  • prettydiff_latest.zip
  • prettydiff_2.1.15.zip
  • prettydiff_browser_latest.zip
  • prettydiff_browser_2.1.15.zip
  • prettydiff_browserNoAce_latest.zip
  • prettydiff_browserNoAce_2.1.15.zip
  • prettydiff_cli_latest.zip
  • prettydiff_cli_2.1.15.zip

The latest named files should be identical to their similarly named companion file, but each zip file is independently created from scratch. The prettydiff_latest.zip and prettydiff_2.1.15.zip are just under 4mb and contain hundreds of files. Occasionally the prettydiff_latest.zip file is a tiny bit smaller than its companion prettydiff_2.1.15.zip file. Upon investigation into the Zip files the latest one is missing files. I need to discover if this is an error in file copy (my code) or zip (the Red Hat code).

The process works by copying all files unless specifically excluded by name (the big difference between the variants) to a temporary directory and then zips all contents of that temporary directory. A copy process and then a following zip file creation process, but the operations for the 8 files happens simultaneously. I am not sure if this simultaneousness is part of the problem. This is something that should be handled by Node, but there is only 1 file system accepting of these instructions.

@prettydiff
Copy link
Owner Author

prettydiff commented Jan 21, 2017

Node version is 5.4.1. Removing and upgrading.

Upgraded node to current 7.4.0 and the problem remains.

@prettydiff
Copy link
Owner Author

The actual file read and write is https://github.com/prettydiff/biddle/blob/master/biddle.js#L240-L271

prettydiff pushed a commit that referenced this issue Jan 21, 2017
@prettydiff prettydiff mentioned this issue Jan 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant