-
Notifications
You must be signed in to change notification settings - Fork 493
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
prevent label (filename) from being null #6821 #6824
Conversation
The getOriginalFileName method only works on tabular files so call it early before the file becomes non-tabular.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, Phil. Thank you.
Saw this error on develop: |
@pdurbin This is failing for me with a different error in your branch. From examining the dataset, it appears that it deletes the original file but leaves the tab file in place. [2020-04-17T08:38:55.682-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.engine.command.impl.UningestFileCommand] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)] [timeMillis: 1587127135682] [levelValue: 900] [[ [2020-04-17T08:38:55.686-0400] [glassfish 4.1] [SEVERE] [] [edu.harvard.iq.dataverse.api.AbstractApiBean] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)] [timeMillis: 1587127135686] [levelValue: 1000] [[ |
@kcondon I'm not sure what to say. Uningest is working for me. Here's how my Stata file looks before I try to uningest it: Here's how it looks after I uningest it: I'm able to download the file just fine: When I look at the file system I see a single file and the MD5 matches 50by1000.dta which is the file I'm testing with.
The only thing that is odd to me is the following message in server.log when I uningest the file: [2020-04-17T15:14:28.103-0400] [Payara 5.201] [WARNING] [] [edu.harvard.iq.dataverse.api.Files] [tid: _ThreadID=87 _ThreadName=http-thread-pool::http-listener-1(5)] [timeMillis: 1587150868103] [levelValue: 900] [[ But I don't think it's related. Any tips on how I can reproduce the error you're seeing? @sekmiller do you have any ideas on this? |
@pdurbin Do you have a storage name and label that is not the default "file" but something like "file1" ? |
@kcondon here's what I have (just "file"):
I'm also attaching my whole domain.xml in case it's helpful: domain.xml.txt I am not set up for multiple stores. I haven't even played with them yet, to be honest. |
@pdurbin, you are set up for multi store by adding type and label. so change them to be this: and -Ddataverse.files.storage-driver-id=file |
@kcondon I tried to set it up but I must have done it wrong. I got stuff like this and couldn't download files:
Do I need to get multistore working in order to move this pull request forward? |
@pdurbin Yeah, I was also trying on dataverse-internal. It had just file and uningest worked there but when I tried to name it file1 as I told you, I'm seeing the same problem. I think this might be a multistore problem. Essentially we're just changing the name of something and the code assumes a default of file. We'd encountered a number of functions that had that logic and thought we'd got them all. So this is what I think might be happening:
In summary, you probably have fixed the out of the box issue where folks do not rename their storage driver but the endpoint will not work properly in other configs. I'm off now but will pick it up again on Monday and try to tease out the above issues. |
@pdurbin, I was able to get it to work on internal with both file and file1 but it was seemingly intermittent. |
@kcondon ok. From my perspective, I picked up this issue to (hopefully) get a test passing but discovered that uningest is broken. I see above that you tested the develop branch. Would it be good for me to create an issue about uningest being broken? It failed every time for me before I made the change in this pull request. |
@pdurbin I'm working on identifying what the issue is and I will open any additional ticket. |
@pdurbin the good news is that it appears everything is working, including multistore. the better news is I am now merging this branch. Happy Monday! |
What this PR does / why we need it:
Tests are failing, but more importantly, uningest stopped working (500 errors) probably due to 786593e or other commits in pull request #6774.
Which issue(s) this PR closes:
Closes #6821
Special notes for your reviewer:
The getOriginalFileName method only works on tabular files so we need call it early before the file becomes non-tabular. For non-tabular files, null is returned which causes a ConstraintViolationException because label (filename) can't be null.
Suggestions on how to test this:
Does this PR introduce a user interface change?:
No.
Is there a release notes update needed for this change?:
No.
Additional documentation:
None.