Skip to content

Commit 4b6745e

Browse files
committed
Merge pull request #128 from SeqWare/feature/messaging
Feature/messaging Former-commit-id: ce492bb
2 parents 522af08 + 7357947 commit 4b6745e

File tree

24 files changed

+624
-189
lines changed

24 files changed

+624
-189
lines changed

seqware-common/src/main/java/net/sourceforge/seqware/common/hibernate/WorkflowRunReport.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ protected Collection<Processing> collectProcessings(WorkflowRun wr) {
185185
* @return a {@link java.lang.String} object.
186186
*/
187187
public String calculateTotalTime(Collection<Processing> processings) {
188+
if (processings.isEmpty())
189+
return "";
190+
188191
Date earlyDate = new Date(Long.MAX_VALUE), lateDate = new Date(0);
189192

190193
for (Processing p : processings) {

seqware-common/src/main/java/net/sourceforge/seqware/common/util/configtools/ConfigTools.java

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,13 @@ public class ConfigTools {
2424
/** Constant <code>SEQWARE_SETTINGS_PROPERTY="SEQWARE_SETTINGS"</code> */
2525
public static final String SEQWARE_SETTINGS_PROPERTY = "SEQWARE_SETTINGS";
2626

27-
public static Map<String, String> getSettings() {
28-
return getSettings(false);
29-
}
30-
3127
/**
3228
* The output keys are always uppercase!
3329
*
3430
* @throws java.lang.Exception if any.
3531
* @return a {@link java.util.Map} object.
3632
*/
37-
public static Map<String, String> getSettings(boolean ignorePermissions) {
33+
public static Map<String, String> getSettings() {
3834

3935
// first, try to figure out the location of the settings file
4036
String settings = getSettingsFilePath();
@@ -48,23 +44,6 @@ public static Map<String, String> getSettings(boolean ignorePermissions) {
4844
throw new RuntimeException("The settings file " + settings + " is not a file!");
4945
}
5046

51-
//SEQWARE-1595 : it seems that the Java 6 File API cannot retrieve permissions separated by owner and group
52-
// will use Linux command until Java 7 NIO (hopefully)
53-
String settingPerms = FileTools.determineFilePermissions(settings);
54-
if (!ignorePermissions && !settingPerms.equals("-rw-------") && !settingPerms.equals("-rwx------")){
55-
String bigWarning = "*** SECURITY WARNING ***\nSeqWare settings file has incorrect file permissions. It should only be readable and writeable by the owner.\n In other words, run \"chmod 600 ~/.seqware/settings\"";
56-
Log.fatal(bigWarning);
57-
Log.stderr(bigWarning);
58-
}
59-
60-
// else it should be OK
61-
// make sure the permissions are OK
62-
//settingsFile.setExecutable(false, false);
63-
//settingsFile.setWritable(false, false);
64-
//settingsFile.setWritable(true, true);
65-
//settingsFile.setReadable(false, false);
66-
//settingsFile.setReadable(true, true);
67-
6847
HashMap<String, String> hm = new HashMap<String, String>();
6948

7049
// now read back the values from the settings file

seqware-common/src/test/java/net/sourceforge/seqware/common/util/configtools/ConfigToolsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void tearDown() {
8282
public void testGetSettings() throws Exception {
8383
System.setProperty(SEQWARE_SETTINGS_PROPERTY, getClass().getResource("ConfigToolsTest_settings").getPath());
8484

85-
Map<String, String> settings = ConfigTools.getSettings(true);
85+
Map<String, String> settings = ConfigTools.getSettings();
8686

8787
assertEquals(settings.get("SETTING1"), "one");
8888
assertEquals(settings.get("SETTING2"), "TWO");

seqware-distribution/docs/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ In order to publish to our unstable docs supporting the development of 1.0.0, ch
7777
cd seqware-distribution
7878
mvn site-deploy
7979

80+
If doing this in succession, you will see a git checkout error. Until we fix the maven pom, you will need to:
81+
82+
rm -Rf target/scmpublish-checkout/
83+
8084
Then you would look at the site at: http://seqware.github.io/unstable.seqware.github.com/
8185

8286

seqware-distribution/docs/site/content/docs/17-plugins.md

Lines changed: 325 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
3+
title: "Modules"
4+
toc_includes_sections: true
5+
markdown: advanced
6+
7+
---
8+
9+
10+
## GenericCommandRunner
11+
net.sourceforge.seqware.pipeline.modules.GenericCommandRunner
12+
This is a simple command runner.
13+
14+
| Command-line option | Description |
15+
|--------------------|--------------|
16+
|--gcr-algorithm|You can pass in an algorithm name that will be recorded in the metadb if you are writing back to the metadb, otherwise GenericCommandRunner is used.|
17+
|--gcr-check-output-file|Specify the path to the file.|
18+
|--gcr-command|The command being executed (quote as needed).|
19+
|--gcr-output-file|Specify this option one or more times for each output file created by the command called by this module. The argument is a '::' delimited list of type, meta_type, and file_path.|
20+
|--gcr-skip-if-missing|If the registered output files don't exist don't worry about it. Useful for workflows that can produce variable file outputs but also potentially dangerous.|
21+
|--gcr-skip-if-output-exists|If the registered output files exist then this step won't be run again. This only works if gcr-output-file is defined too since we need to be able to check the output files to see if they exist. If this step produces no output files then it's hard to say if it was run successfully before.|
22+
|--gcr-stderr|Optional: Returns stderr (stderr of the command called is normally suppressed, except in case of failure)|
23+
|--gcr-stdout|Optional: Reports stdout (stdout of the command called is normally suppressed, except in case of failure)|
24+
25+
26+
## GenericMetadataSaver
27+
net.sourceforge.seqware.pipeline.modules.GenericMetadataSaver
28+
This is a simple metadata saver.
29+
30+
| Command-line option | Description |
31+
|--------------------|--------------|
32+
|--gms-algorithm|You can pass in an algorithm name that will be recorded in the metadb if you are writing back to the metadb.|
33+
|--gms-output-file|Specify this option one or more times for each output file created by the command called by this module. The argument is a '::' delimited list of type, meta_type, and file_path.|
34+
|--gms-suppress-output-file-check|If provided, this will suppress checking that the gms-output-file options contain valid file paths. Useful if these are remote resources like HTTP or S3 file URLs.|
35+
36+
37+
## ProvisionDependenciesBundle
38+
net.sourceforge.seqware.pipeline.modules.utilities.ProvisionDependenciesBundle
39+
40+
41+
| Command-line option | Description |
42+
|--------------------|--------------|
43+
|--i, --input-file|Required: input file, multiple should be specified seperately|
44+
|--o, --output-dir|Required: output file location|
45+
46+
47+
## ProvisionFiles
48+
net.sourceforge.seqware.pipeline.modules.utilities.ProvisionFiles
49+
50+
51+
| Command-line option | Description |
52+
|--------------------|--------------|
53+
|--a, --algorithm|Optional: by default the algorithm is 'ProvisionFiles' but you can override here if you like.|
54+
|--d, --decrypt-key|Optional: if specified this key will be used to decrypt data when reading from its source.|
55+
|--decrypt-key-from-settings, --dkfs|Optional: if flag is specified then the key will be read from the SW_DECRYPT_KEY field in your SeqWare settings file and used to decrypt data as its pulled from the source. If this option is specified along with --decrypt-key the key provided by the latter will be used.|
56+
|--e, --encrypt-key|Optional: if specified this key will be used to encrypt data before writing to its destination.|
57+
|--ekfs, --encrypt-key-from-settings|Optional: if flag is specified then the key will be read from the SW_ENCRYPT_KEY field in your SeqWare settings file and used to encrypt data before writing to its destination. If this option is specified along with --encrypt-key the key provided by the latter will be used.|
58+
|--force-copy|Optional: if this is specified local to local file transfers are done with a copy rather than symlink. This is useful if you're writing to a temp area that will be deleted so you have to move the file essentially.|
59+
|--i, --input-file|Required: use this or --input-file-metadata, this is the input file, multiple should be specified seperately|
60+
|--im, --input-file-metadata|Required: use this or --input-file, this is the input file, multiple should be specified seperately|
61+
|--o, --output-dir|Required: output file location|
62+
|--of, --output-file|Optional: output file path, if this is provided than the program accepts exactly one --input-file and one --output file. If an --output-dir is also specified an error will be thrown.|
63+
|--r, --recursive|Optional: if the input-file points to a local directory then this option will cause the program to recursively copy the directory and its contents to the destination. An actual copy will be done for local to local copies rather than symlinks.|
64+
|--s3-connection-timeout|Optional: Sets the amount of time to wait (in milliseconds) when initially establishing a connection before giving up and timing out. Default is 50000|
65+
|--s3-max-connections|Optional: Sets the maximum number of allowed open HTTPS connections. Default is 50|
66+
|--s3-max-error-retries|Optional: Sets the maximum number of retry attempts for failed retryable requests (ex: 5xx error responses from services). Default is 3|
67+
|--s3-max-socket-timeout|Optional: Sets the amount of time to wait (in milliseconds) for data to be transfered over an established, open connection before the connection times out and is closed. A value of 0 means infinity, and isn't recommended. Default is 50000|
68+
|--s3-no-server-side-encryption|Optional: If specified, do not use S3 server-side encryption. Default is to use S3 server-side encryption for S3 destinations.|
69+
|--skip-if-missing|Optional: useful for workflows with variable output files, this will silently skip any missing inputs (this is a little dangerous).|
70+
|--skip-record-file|Optional: If specified, do not record new entries in the file table.|
71+
|--v, --verbose|Optional: verbose causes the S3 transfer status to display.|
72+
73+
74+
## S3CreateFileURLs
75+
net.sourceforge.seqware.pipeline.modules.utilities.S3CreateFileURLs
76+
77+
78+
| Command-line option | Description |
79+
|--------------------|--------------|
80+
|--a, --all-files|Optional: if specified, the --s3-url should take the form s3://<bucket>. This option indicates all files in that bucket should have URLs created.|
81+
|--l, --lifetime|How long (in minutes) should this URL be valid for (129600 = 90 days, 86400 = 60 days, 43200 = 30 days, 10080 = 7 days, 1440 = 1 day).|
82+
|--u, --s3-url|A URL of the form s3://<bucket>/<path>/<file> or s3://<bucket> if using the --all-files option|
83+
84+
85+
## S3DeleteFiles
86+
net.sourceforge.seqware.pipeline.modules.utilities.S3DeleteFiles
87+
88+
89+
| Command-line option | Description |
90+
|--------------------|--------------|
91+
|--f, --s3-url-file|Optional: a file containing one URL per line of the form s3://<bucket>/<path>/<file>|
92+
|--u, --s3-url|Optional: a URL of the form s3://<bucket>/<path>/<file>|
93+
94+
95+
## S3ListFiles
96+
net.sourceforge.seqware.pipeline.modules.utilities.S3ListFiles
97+
98+
99+
| Command-line option | Description |
100+
|--------------------|--------------|
101+
|--in-bytes|Optional: flag, if set values print in bytes rather than human friendsly|
102+
|--l, --list-buckets|Optional: list all the buckets you own.|
103+
|--reset-owner-permissions|Optional: this will give the bucket owner full read/write permissions, useful if many different people have been writing to the same bucket.|
104+
|--s, --search-local-dir|Optional: attempt to match files in S3 with files in this local directory.|
105+
|--u, --s3-url|Optional: a URL of the form s3://<bucket>/<path>/<file>|
106+
|--t, --tab-output-file|Optional: tab-formated output file.|
107+
108+
109+
## S3UploadDirectory
110+
net.sourceforge.seqware.pipeline.modules.utilities.S3UploadDirectory
111+
112+
113+
| Command-line option | Description |
114+
|--------------------|--------------|
115+
|--b, --output-bucket|Required: the output bucket name in S3|
116+
|--i, --input-dir|Required: the directory to copy recursively|
117+
|--p, --output-prefix|Required: the prefix to add after the bucket name.|

seqware-distribution/docs/site/content/docs/3-getting-started/admin-tutorial.md

Lines changed: 9 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -36,70 +36,35 @@ By the end of these tutorials you will:
3636
## How to Install a Workflow
3737

3838
<!-- make this install from a zip for the admin guide -->
39-
When provided with a tested workflow from a workflow developer, the next step
39+
When provided with a tested workflow bundle from a workflow developer, the next step
4040
is to install it, this means it will be inserted into the MetaDB via a running
41-
web service. During this process it will copy the bundle and put it into your
42-
released-bundles directory and provision it into your provisioned bundles
41+
web service. During this process it will copy the bundle into your
42+
released-bundles directory and provision it into your provisioned-bundles
4343
directory. The provisioned bundles directory is where running workflows will
4444
access their files.
4545

4646
Here is an example showing how this process works on the VM and what is
4747
happening in the database and your released-bundles directory as you do this.
48-
You may want to delete the zip file that is in the released-bundles directory
49-
before you do this step below (or back it up somewhere first).
5048

5149
See the [Developer Tutorial](/docs/3-getting-started/developer-tutorial/) for
5250
how to make the zipped workflow bundle. After the zip bundle is created, the
5351
bundle can be provided to the admin for install as below.
5452

5553
$ seqware bundle install --zip ~/packaged-bundles/Workflow_Bundle_MyHelloWorld_1.0-SNAPSHOT_SeqWare_<%= seqware_release_version %>.zip
56-
Installing Bundle
57-
Bundle: /home/seqware/packaged-bundles/Workflow_Bundle_MyHelloWorld_1.0-SNAPSHOT_SeqWare_<%= seqware_release_version %>.zip
58-
Now packaging /home/seqware/packaged-bundles/Workflow_Bundle_MyHelloWorld_1.0-SNAPSHOT_SeqWare_<%= seqware_release_version %>.zip to a zip file and transferring to the directory: /home/seqware/released-bundles Please be aware, this process can take hours if the bundle is many GB in size.
59-
PROCESSING INPUT: /home/seqware/packaged-bundles/Workflow_Bundle_MyHelloWorld_1.0-SNAPSHOT_SeqWare_<%= seqware_release_version %>.zip OUTPUT: /home/seqware/released-bundles OUTPUT FILE: null
54+
Now transferring /home/seqware/packaged-bundles/Workflow_Bundle_MyHelloWorld_1.0-SNAPSHOT_SeqWare_<%= seqware_release_version %>.zip to the directory: /home/seqware/released-bundles Please be aware, this process can take hours if the bundle is many GB in size.
55+
Processing input: /home/seqware/packaged-bundles/Workflow_Bundle_MyHelloWorld_1.0-SNAPSHOT_SeqWare_<%= seqware_release_version %>.zip
56+
output-dir: /home/seqware/released-bundles
57+
58+
WORKFLOW_ACCESSION: 16
59+
Bundle Has Been Installed to the MetaDB and Provisioned to /home/seqware/packaged-bundles/Workflow_Bundle_MyHelloWorld_1.0-SNAPSHOT_SeqWare_<%= seqware_release_version %>.zip!
6060

61-
WORKFLOW_ACCESSION: 17
62-
Bundle Has Been Installed to the MetaDB and Provisioned to /home/seqware/packaged-bundles/Workflow_Bundle_MyHelloWorld_1.0-SNAPSHOT_SeqWare_<%= seqware_release_version %>.zip!
6361

6462
What happens here is the <code>Workflow_Bundle_MyHelloWorld_1.0-SNAPSHOT_SeqWare_<%= seqware_release_version %>.zip</code> copied to your released-bundles directory and unzip'd into your provisioned-bundles directory. The metadata about the workflow is then saved to the database.
6563

6664
<%= render '/includes/monitor_workflows/' %>
6765

6866
For more information see the [Monitor Configuration](/docs/6-pipeline/monitor_configuration/) documentation.
6967

70-
## How to Cancel Workflows
71-
72-
After launching a workflow, you can cancel it in order to stop further execution. This will set the status of the workflow run to `submitted_cancel`, and after the next status propagation, will set the status to `cancelled`.
73-
74-
$ seqware workflow-run cancel --accession 28
75-
$ seqware workflow-run report --accession 28
76-
-[ RECORD 0 ]------------------+-------------------------------------
77-
Workflow | HelloWorld 1.0-SNAPSHOT
78-
Workflow Run SWID | 28
79-
Workflow Run Status | cancelled
80-
Workflow Run Create Timestamp | 2013-08-23 14:58:35.374
81-
Workflow Run Host | master
82-
Workflow Run Status Command | 0000000-130823144527997-oozie-oozi-W
83-
Library Sample Names |
84-
Library Sample SWIDs |
85-
Identity Sample Names |
86-
Identity Sample SWIDs |
87-
Input File Meta-Types |
88-
Input File SWIDs |
89-
Input File Paths |
90-
Immediate Input File Meta-Types|
91-
Immediate Input File SWIDs |
92-
Immediate Input File Paths |
93-
Output File Meta-Types |
94-
Output File SWIDs |
95-
Output File Paths |
96-
Workflow Run Time | 33.0s
97-
98-
99-
## How to Retry Failed and Cancelled Workflows
100-
101-
<%= render '/includes/debug/oozie_restart/' %>
102-
10368
## See Also
10469

10570
<p class="warning"><strong>Note:</strong>

0 commit comments

Comments
 (0)