LightGuard / asciidoc-splitter

A splitter utility for helping create modular docs from chapter files.
BSD 2-Clause "Simplified" License
8 stars 8 forks source link

Splitter fails to run a subsequent time, due to symlinks generation issue #75

Closed sterobin closed 3 years ago

sterobin commented 3 years ago

Steps to reproduce:

  1. Run the splitter with the following command:
target/asciidoc-splitter-1.0-SNAPSHOT-bin/bin/asciidoc-splitter.sh -sr git@github.com:sterobin/kie-docs.git -sb master-kogito-test-source-B -or git@gitlab.cee.redhat.com:red-hat-jboss-bxms-documentation/kie-docs-translator.git -ob master-kogito-test-split-B-LIVE -i index.adoc

Splitter is successful with the following output:

Cloning origin...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/home/sterobin/repos/asciidoc-splitter/target/asciidoc-splitter-1.0-SNAPSHOT-bin/lib/backport9-1.3.jar) to method sun.nio.ch.NativeThread.signal(long)
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
13:10:03,118 INFO  [] (main) Pushing content (if applicable)
13:10:03,126 WARNING [] (main) Found 0 issues. 0 Errors.
Committing work and pushing...
  1. Re-run the same command, with no changes at all. The splitter fails to run, not changes are pushed to the output repo, and the following output is displayed:
Cloning origin...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/home/sterobin/repos/asciidoc-splitter/target/asciidoc-splitter-1.0-SNAPSHOT-bin/lib/backport9-1.3.jar) to method sun.nio.ch.NativeThread.signal(long)
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
13:14:41,911 SEVERE [] (main) ERROR: null: java.nio.file.FileAlreadyExistsException: /tmp/tmp.yiX0ieDUjW/titles-enterprise/kogito-creating-running/_artifacts
13:14:41,917 SEVERE [] (main) Failed creating symlinks: /tmp/tmp.yiX0ieDUjW/assemblies/_artifacts
13:14:41,917 INFO  [] (main) Pushing content (if applicable)
13:14:41,923 WARNING [] (main) Found 1 issues. 1 Errors.
Committing work and pushing...

Issue occurs for me whether pushing to GitHub or GitLab, so seems unrelated to the repo location.

sterobin commented 3 years ago

@LightGuard , this is what I now see today when I run it. I see the same "already exists" issue is there for artifacts and images, and will basically always do that, but you changed it from a severe error to severe warning, and the build can continue instead of fail.

sterobin@sterobin ~/repos/asciidoc-splitter  (master) $ target/asciidoc-splitter-1.0-SNAPSHOT-bin/bin/asciidoc-splitter.sh -sr git@github.com:sterobin/kie-docs.git -sb master-kogito-test-source-B -or git@gitlab.cee.redhat.com:red-hat-jboss-bxms-documentation/kie-docs-translator.git -ob master-kogito-test-split-B-LIVE -i index.adoc
Cloning origin...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/home/sterobin/repos/asciidoc-splitter/target/asciidoc-splitter-1.0-SNAPSHOT-bin/lib/backport9-1.3.jar) to method sun.nio.ch.NativeThread.signal(long)
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
10:13:18,327 SEVERE [] (main) WARNING: null: File already exists, please verify output: /tmp/tmp.NZ799Yc37e/titles-enterprise/kogito-creating-running/_artifacts
10:13:18,335 INFO  [] (main) Symlink '_artifacts' already exists, continuing, please verify.
10:13:18,335 INFO  [] (main) Symlink '_images' already exists, continuing, please verify.
10:13:18,344 WARNING [] (main) Found 1 issues. 0 Errors.
Committing work and pushing...

I suppose that's fine then from a functionality perspective, so not a blocker since all can still proceed no prob, I just wonder if we even want that in the log, since the folder names and symlinks etc. for artifacts and images will always "already exist". It creates some noise and might mislead new tool users. I don't know, maybe fine as is.

Btw, I think this error even before was just a red herring and maybe wasn't blocking the split on subsequent runs (?). GitHub/Lab just doesn't reflect any subsequent runs of the splitter even now unless you actually change something, which I suppose makes sense. I'm just used to our translate script that does a force push and updates no matter what, and thus reflects the new run on every subsequent time, regardless of whether anything changed. Anyway, how it commits is fine, just not what I expected.