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

Metadata not shown #234

Closed
fh-afk opened this issue May 7, 2021 · 13 comments
Closed

Metadata not shown #234

fh-afk opened this issue May 7, 2021 · 13 comments
Assignees
Labels
Milestone

Comments

@fh-afk
Copy link

fh-afk commented May 7, 2021

I have a test file called 0 with a little nonsense Text and see this:

image

There should be some metadata, as I can verify with "imeta ls -d 0" on the iRODS server:

image

Of course the values do not make much sense, but this is not the point, I would still expect it to work.

@trel
Copy link
Contributor

trel commented May 7, 2021

Hmm, that is curious. You're logged into Metalnx as the same user who is doing the imeta ls -d 0?

@trel
Copy link
Contributor

trel commented May 7, 2021

I haven't been able to reproduce it yet... What version of Metalnx is this?

@trel
Copy link
Contributor

trel commented May 7, 2021

Upon closer inspection of what you've got in your database, I see that often... your attribute or value are empty. This is not allowed, in general - AVUs must have at least the attribute and value filled in. The unit is optional.

How did your metadata get to this state?

@fh-afk
Copy link
Author

fh-afk commented May 7, 2021

It is the same user. I have tried reproducing it with another file, but failed as well. Metadata works fine for other data. It is version 2.2.0-RELEASE.

The value is not empty, it is space - you do not see that in the command line interface. This is probably not the issue, I tried that for reproducing this, too.

@trel
Copy link
Contributor

trel commented May 7, 2021

Okay, I confirm that spaces work - still seeing them list correctly locally.

Can you share the text version of the imeta ls -d 0 output? I'm interested in the attribute you have for 'Datum'.

Please also look for a clue or error in the Metalnx logs (via docker logs -f <containername>).

@trel
Copy link
Contributor

trel commented May 7, 2021

Can you confirm the database you're using is Postgres?

We know that some of the queries used by Metalnx were not tested on other databases.

@fh-afk
Copy link
Author

fh-afk commented May 7, 2021

Yes, I use Postgres for metalnx and also for iRODS.

imeta ls -d 0 for 'Datum'

attribute: Datum
value: 48095tzß
units:

From the log for the Postgres Docker, I find this a bit suspicious:

ERROR: column t1.tgconstrname does not exist at character 113

I will investigate further on monday.

@trel
Copy link
Contributor

trel commented May 7, 2021

I agree with your assessment of 'suspicious'.

I confirm Datum with 48095tzß is rendering correctly locally, so that doesn't appear to be the problem, directly.

@fh-afk
Copy link
Author

fh-afk commented May 10, 2021

I managed to reproduce that behavior. There really was an empty attribute (instead of space). I do not see an obvious way to create this with metalnx or the iRODS CLI. However, I was also testing the python-irodsclient on the same iRODS server. Apparently, you can write empty attributes via metadata.apply_atomic_operations into iCAT and then you get

image

which is indistinguishable from space in the command line, but in my python GUI it shows None, which is indistinguishable from the string "None", but both can't be true simultaneously.
In my understanding, this is not really a metalnx issue nor is it a python-irodsclient issue, this looks like something that should not be allowed in iRODS iCAT and hence get rejected by the server itself. Sorry for the false alarm.

@trel
Copy link
Contributor

trel commented May 10, 2021

Ah, very good. I agree the server should enforce this more tightly. I'm transferring this issue into irods/irods and will track it there. Thanks!

Edit: Just learned transfers are not allowed across GitHub organizations. So... will box it in and follow up here.

@trel
Copy link
Contributor

trel commented May 10, 2021

New issue in the server (irods/irods#5618).

We'll use this one to make sure Metalnx itself still displays even if the server does have an empty string.

@fh-afk
Copy link
Author

fh-afk commented May 18, 2021

I can cause a similar issue with iRODS rule engine using msiApplyDCMetadataTemplate - this microservice creates attribute names and leaves values empty which also causes metalnx to not show the metadata. I may have used that microservice incorrectly, since I am just looking into this, but then again, I think iRODS should probably reject this.

Edit: Looks like using it incorrectly is not the issue here, this microservice is documented exactly that way: https://docs.irods.org/4.2.8/doxygen/miscMS_8cpp.html#a109caab5c02c547ba0ebb07cdcacfcb5

@trel trel modified the milestones: 2.4.0, 2.5.0 May 20, 2021
@korydraughn
Copy link
Collaborator

korydraughn commented Jun 30, 2021

New issue in the server (irods/irods#5618).

We'll use this one to make sure Metalnx itself still displays even if the server does have an empty string.

The following line explains why the metadata is not shown.
https://github.com/DICE-UNC/jargon/blob/b033be98ea9383762184ccd166bcdf8ac68a5dbf/jargon-core/src/main/java/org/irods/jargon/core/query/MetaDataAndDomainData.java#L187

Removing the check for an empty string allows the metadata to be shown. If the server is enforcing non-empty attribute names, then it should be safe to remove the check.

See the following PRs for the necessary changes:

@korydraughn korydraughn self-assigned this Jun 30, 2021
korydraughn added a commit to korydraughn/jargon that referenced this issue Jul 14, 2021
korydraughn added a commit to korydraughn/jargon-irods-ext that referenced this issue Jul 14, 2021
trel pushed a commit to DICE-UNC/jargon-irods-ext that referenced this issue Jul 14, 2021
trel pushed a commit to DICE-UNC/jargon that referenced this issue Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants