cyverse / gocommands

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

add metadata results in irods error #42

Closed jjkoehorst closed 2 weeks ago

jjkoehorst commented 1 month ago

This might be an iRODS issue and not a gocmd issue but just in case

gocmd addmeta type study -P /unlock/home/wur.gutbrain_axis/stu_impact2
ERRO[2024-07-18 14:16:36.780] failed to add metadata to path /unlock/home/wur.gutbrain_axis/stu_impact2 (attr type, value study, unit ):
    github.com/cyverse/gocommands/cmd/subcmd.addMetaToPath
        /github/workspace/cmd/subcmd/addmeta.go:103
  - received add collection meta error:
    github.com/cyverse/go-irodsclient/irods/fs.AddCollectionMeta
        /go/pkg/mod/github.com/cyverse/go-irodsclient@v0.14.11/irods/fs/collection.go:926
  - SYS_PACK_INSTRUCT_FORMAT_ERR  function=main package=main
iRODS Error (code: '-15000', message: 'SYS_PACK_INSTRUCT_FORMAT_ERR')

Error Trace:
  - failed to add metadata to path /unlock/home/wur.gutbrain_axis/stu_impact2 (attr type, value study, unit ):
    github.com/cyverse/gocommands/cmd/subcmd.addMetaToPath
        /github/workspace/cmd/subcmd/addmeta.go:103
  - received add collection meta error:
    github.com/cyverse/go-irodsclient/irods/fs.AddCollectionMeta
        /go/pkg/mod/github.com/cyverse/go-irodsclient@v0.14.11/irods/fs/collection.go:926
  - SYS_PACK_INSTRUCT_FORMAT_ERR

There is an email going around in the irods chat group in 'google mail' subject Re: [iROD-Chat:22045] jargon 4.3.3.0 add metadata error for iRODS 4.3.2

iychoi commented 1 month ago

I just tested the same command against iRODS 4.2.9 and it worked. So it only occurs on iRODS 4.3.x. The error was caused by update on iRODS ModAVUMetadataInp_PI struct recently made. I just pushed a commit to add the missing field to go-irodsclient package. And iRODS guys said it also work against 4.2.x. A new release of GoCommands will be also ready in few days.

Ref: https://github.com/DICE-UNC/jargon/pull/417

Commit: c5ce73f

iychoi commented 2 weeks ago

This is fixed in the new release. https://github.com/cyverse/gocommands/releases/tag/v0.9.11