-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fixes #29 changed IN-CORE Dataset DAO and FileStorage implementation with latest API #30
base: develop
Are you sure you want to change the base?
Conversation
…to use latest data service API
…s to IN-CORE Dataset DAO and file storage
@@ -369,11 +376,11 @@ public void execute(File cwd) throws AbortException, FailedException { | |||
ds.setTitle(step.getTool().getOutput(impl.getCaptureStdOut()).getTitle()); | |||
ds.setCreator(execution.getCreator()); | |||
|
|||
ds = datasetDao.save(ds); |
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.
For external file storage like IN-CORE where the dataset is created and then files are attached in a separate operation, we need to save the dataset first. Otherwise, the dataset won't exist yet and file storage will fail.
...dline/src/main/java/edu/illinois/ncsa/datawolf/executor/commandline/CommandLineExecutor.java
Outdated
Show resolved
Hide resolved
String bearerToken = null; | ||
try { | ||
String userHome = System.getProperty("user.home"); | ||
byte[] encoded = Files.readAllBytes(Paths.get(userHome + "/.incore/.a0309ff368531845cbeef9a617fcf11361da600ec8cc1467b2a579cb52890f85_token")); |
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.
will this file always exist? Would it make sense to see if there is a file in ~/.incore that ends with _token?
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.
You are right, it may not exist if the user didn't log into the server, let me fix that. I can also make this more generalized if I use the same method pyincore uses to create the token name. pyincore takes the sha 256 of the server URL and use that to create the token name in the ".incore" folder. Since the user needs to set the server URL as a parameter in datawolf.properties if I they are using the IN-CORE file storage, I can look for the file with the 256 sha of that name.
Updated IN-CORE Dataset DAO and FileStorage with the latest Data service API