cyverse / gocommands

iRODS Command-line Tools written in Go
Other
29 stars 18 forks source link

`bput` and `sync` fail on Windows OS #17

Closed jnimoth closed 11 months ago

jnimoth commented 11 months ago

Upon further testing, we saw that bput and sync do not seem to work on Windows. Instead, a CAT_NO_ACCESS_PERMISSION error is displayed. This was reported by multiple of our users.

Here what we see with bput (same is observed for sync, but not for normal put):

 .\gocmd-v0.7.7-windows-amd64\gocmd.exe --config .\gocmd-v0.7.7-windows-amd64\config.yaml bput --progress .\NMR_Formats\ NMR_Upload2
bundle 0 - TAR                                     ... done! [1.72M in 25ms] 
bundle 1 - TAR                                     ... done! [2.27M in 6ms] 
bundle 2 - TAR                                     ... done! [8.31M in 9ms] 
bundle 0 - Upload                                  ... fail! [0B in 0s] 
bundle 1 - Upload                                  ... fail! [0B in 0s] 
bundle 2 - Upload                                  ... fail! [0B in 0s] 
bundle 0 - Remove Old Files                        ... done! [50 in 3.624s] 
Error: failed to perform bundle transfer: failed to upload bundle 2 to \testrug\home\[user]NMR_Upload2\.gocmd_staging\bundle_ck5gb9riufj2lh4ln150_2.tar: failed to open data object: CAT_NO_ACCESS_PERMISSION 
Error Trace:
   - failed to perform bundle transfer: 
     github.com/cyverse/gocommands/cmd/subcmd.processBputCommand         
          /github/workspace/cmd/subcmd/bput.go:158   
   - failed to upload bundle 2 to \testrug\home\[user]\NMR_Upload2\.gocmd_staging\bundle_ck5gb9riufj2lh4ln150_2.tar: 
     github.com/cyverse/gocommands/commons.(*BundleTransferManager).processBundleUpload
         /github/workspace/commons/bundle_transfer.go:893   
   - failed to open data object:
     github.com/cyverse/go-irodsclient/irods/fs.OpenDataObjectWithOperation
         /go/pkg/mod/github.com/cyverse/go-irodsclient@v0.12.9/irods/fs/data_object.go:1499
   - CAT_NO_ACCESS_PERMISSION

Additional information:

iychoi commented 11 months ago

This is a bug in gocommands in handling path delimiter \ in windows. It will be fixed in upcoming release v0.7.9.

iychoi commented 11 months ago

The release v0.7.9 is ready. https://github.com/cyverse/gocommands/releases/tag/v0.7.9

Can you give a test?

jnimoth commented 11 months ago

I can confirm that this issue was fixed in v0.7.9.