-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
93 changed files
with
6,078 additions
and
3,887 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package cromwell.parser; | ||
|
||
public enum BackendType { | ||
LOCAL, JES; | ||
LOCAL, JES, SGE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/migrations/changesets/change_execution_unique_constraint.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd"> | ||
|
||
<changeSet author="tjeandet" id="change_execution_unique_constraint"> | ||
<comment> | ||
Change unique constraint for Execution Table to include IDX column. For MySQL this requires | ||
first dropping the foreign key constraint, which we then restore after adding back the enhanced | ||
unique constraint. Both the unique and foreign key constraints are added back with shorter | ||
Oracle-friendly (i.e. not more than 30 character) names. | ||
|
||
Also rename the INDEX column to IDX because some databases will have a problem with that name | ||
</comment> | ||
|
||
<dropForeignKeyConstraint baseTableName="EXECUTION" constraintName="FK_EXECUTION_WORKFLOW_EXECUTION_ID" /> | ||
|
||
<dropUniqueConstraint | ||
tableName="EXECUTION" | ||
constraintName="UK_EX_WORKFLOW_EXECUTION_ID" /> | ||
|
||
<addUniqueConstraint | ||
tableName="EXECUTION" | ||
columnNames="WORKFLOW_EXECUTION_ID, CALL_FQN, INDEX" | ||
constraintName="UK_WORKFLOW_CALL_INDEX"/> | ||
|
||
<addForeignKeyConstraint constraintName="FK_EXECUTION_WORKFLOW" | ||
baseTableName="EXECUTION" baseColumnNames="WORKFLOW_EXECUTION_ID" | ||
referencedTableName="WORKFLOW_EXECUTION" | ||
referencedColumnNames="WORKFLOW_EXECUTION_ID"/> | ||
|
||
<renameColumn tableName="EXECUTION" oldColumnName="INDEX" newColumnName="IDX" columnDataType="INT"/> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd"> | ||
<changeSet author="scottfrazer" id="sge"> | ||
|
||
<createTable tableName="SGE_JOB"> | ||
<column autoIncrement="true" name="SGE_JOB_ID" type="INT"> | ||
<constraints primaryKey="true" primaryKeyName="PK_SGE_JOB"/> | ||
</column> | ||
<column name="EXECUTION_ID" type="INT"> | ||
<constraints nullable="false"/> | ||
</column> | ||
<column name="SGE_JOB_NUMBER" type="INT"> | ||
<constraints nullable="false"/> | ||
</column> | ||
</createTable> | ||
|
||
<modifySql dbms="mysql"> | ||
<append value=" ENGINE=INNODB"/> | ||
</modifySql> | ||
</changeSet> | ||
|
||
<changeSet author="scottfrazer" id="db_schema_constraints"> | ||
<addForeignKeyConstraint constraintName="FK_SGE_JOB_EXECUTION_ID" | ||
baseTableName="SGE_JOB" baseColumnNames="EXECUTION_ID" | ||
referencedTableName="EXECUTION" referencedColumnNames="EXECUTION_ID"/> | ||
</changeSet> | ||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package cromwell.binding | ||
|
||
import cromwell.parser.{BackendType, RuntimeKey} | ||
import AttributeMap._ | ||
|
||
object AttributeMap { | ||
implicit class EnhancedBackendType(val backendType: BackendType) extends AnyVal { | ||
def supportedKeys: Set[RuntimeKey] = for { | ||
key <- RuntimeKey.values().toSet | ||
if key.supports(backendType) | ||
} yield key | ||
} | ||
} | ||
|
||
case class AttributeMap(attrs: Map[String, String]) { | ||
def get(key: RuntimeKey): Option[String] = attrs.get(key.key) | ||
|
||
def unsupportedKeys(backendType: BackendType): Seq[String] = { | ||
val supportedKeys = backendType.supportedKeys map { _.key } | ||
val unsupportedKeys = attrs.keySet -- supportedKeys | ||
|
||
if (unsupportedKeys.isEmpty) Vector.empty | ||
else Vector(s"Found unsupported keys for backend '$backendType': " + unsupportedKeys.toSeq.sorted.mkString(", ")) | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.