Skip to content

Commit abbec4b

Browse files
authored
Merge branch 'develop' into CTM-133-cache
2 parents 552a2fb + 530307d commit abbec4b

File tree

10 files changed

+190
-108
lines changed

10 files changed

+190
-108
lines changed

.github/workflows/chart_update_on_merge.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,16 @@ jobs:
5858
password: ${{ secrets.DSDEJENKINS_PASSWORD }}
5959
# Build & push `cromwell`, `womtool`, `cromiam`, and `cromwell-drs-localizer`
6060
# This step is validated in the GHA 'docker_build_test.yml' without the accompanying docker push
61-
- name: Build Cromwell Docker
61+
- name: Build & push all images
6262
run: |
6363
set -e
6464
cd cromwell
6565
sbt -Dproject.isSnapshot=false dockerBuildAndPush
66+
- name: Build & push server debug image
67+
run: |
68+
set -e
69+
cd cromwell
70+
sbt -Dproject.isDebug=true server/dockerBuildAndPush
6671
- name: Deploy to dev and board release train (Cromwell)
6772
uses: broadinstitute/repository-dispatch@master
6873
with:

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22

33
## 92 Release Notes
44

5+
### Migration of PK to BIGINT
6+
The PK of the JOB_KEY_VALUE_ENTRY table will be migrated from INT to BIGINT.
7+
8+
### AWS ECR Docker Remote Hashing
9+
* Fixed an issue where ECR images without an explicit repository prefix
10+
(e.g., `123456789012.dkr.ecr.us-east-1.amazonaws.com/example-tool`) would fail during remote hash computation due to incorrect manifest URI construction.
11+
The Docker registry implementation now correctly handles ECR's support for repository-less image paths.
12+
513
### AWS Batch
14+
* Fixed an issue where job failures before all outputs were written would cause delocalization to fail, preventing the upload of return code, stdout, and stderr files needed for debugging.
615
* Split the option to tag resources between AWS Batch jobs vs. EC2 and EBS volumes hardware
716
* Moved the option to tag job resources from runtime attributes to backend config.
817
* Appended the custom labels to the list of resource tags to propagate

database/migration/src/main/resources/changelog.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
<include file="changesets/workflow_store_drop_state_index.xml" relativeToChangelogFile="true" />
9494
<include file="changesets/add_group_metrics_table.xml" relativeToChangelogFile="true" />
9595
<include file="changesets/add_group_metrics_unique_constraint.xml" relativeToChangelogFile="true" />
96+
<include file="changesets/enlarge_job_key_value_entry_id.xml" relativeToChangelogFile="true" />
9697
<include file="changesets/add_timestamp_in_call_caching.xml" relativeToChangelogFile="true" />
9798
<!-- WARNING!
9899
This changeset should always be last.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<databaseChangeLog objectQuotingStrategy="QUOTE_ALL_OBJECTS"
3+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">
6+
7+
<!-- BEGIN JOB_KEY_VALUE_ENTRY PK widening -->
8+
<!-- For Postgresql there are 2 changesets: one for modifying the table column type, and another one for altering the autoincrementing sequence.
9+
The other DBs can be refactored similarly with a single addAutoIncrement changeset. -->
10+
<changeSet author="lbaldo" id="enlarge_job_key_value_entry_id" dbms="mysql,hsqldb,mariadb">
11+
<addAutoIncrement
12+
columnName="JOB_KEY_VALUE_ENTRY_ID"
13+
columnDataType="BIGINT"
14+
incrementBy="1"
15+
tableName="JOB_KEY_VALUE_ENTRY"
16+
/>
17+
</changeSet>
18+
19+
<changeSet author="lbaldo" id="postgresql_enlarge_job_key_value_entry_id" dbms="postgresql">
20+
<modifyDataType
21+
columnName="JOB_KEY_VALUE_ENTRY_ID"
22+
tableName="JOB_KEY_VALUE_ENTRY"
23+
newDataType="BIGINT"
24+
/>
25+
</changeSet>
26+
27+
<changeSet author="lbaldoh" id="postgresql_enlarge_job_key_value_entry_id_seq" dbms="postgresql">
28+
<preConditions onFail="MARK_RAN">
29+
<!-- idempotency check (noop if the sequence is present and already consistent what the alter would do) -->
30+
<sqlCheck expectedResult="0">
31+
SELECT count(*)
32+
FROM information_schema.sequences
33+
WHERE sequence_name = 'JOB_KEY_VALUE_ENTRY_JOB_KEY_VALUE_ENTRY_ID_seq'
34+
AND data_type = 'bigint';
35+
</sqlCheck>
36+
</preConditions>
37+
<sql>alter sequence "JOB_KEY_VALUE_ENTRY_JOB_KEY_VALUE_ENTRY_ID_seq" as bigint;</sql>
38+
</changeSet>
39+
<!-- END JOB_KEY_VALUE_ENTRY PK widening -->
40+
41+
</databaseChangeLog>

database/sql/src/main/scala/cromwell/database/slick/tables/JobKeyValueEntryComponent.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ trait JobKeyValueEntryComponent {
99
import driver.api._
1010

1111
class JobKeyValueEntries(tag: Tag) extends Table[JobKeyValueEntry](tag, "JOB_KEY_VALUE_ENTRY") {
12-
def jobKeyValueEntryId = column[Int]("JOB_KEY_VALUE_ENTRY_ID", O.PrimaryKey, O.AutoInc)
12+
def jobKeyValueEntryId = column[Long]("JOB_KEY_VALUE_ENTRY_ID", O.PrimaryKey, O.AutoInc)
1313

1414
def workflowExecutionUuid = column[String]("WORKFLOW_EXECUTION_UUID", O.Length(255))
1515

database/sql/src/main/scala/cromwell/database/sql/tables/JobKeyValueEntry.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ case class JobKeyValueEntry(
77
jobAttempt: Int,
88
storeKey: String,
99
storeValue: String,
10-
jobKeyValueEntryId: Option[Int] = None
10+
jobKeyValueEntryId: Option[Long] = None
1111
)

dockerHashing/src/main/scala/cromwell/docker/registryv2/DockerRegistryV2Abstract.scala

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ abstract class DockerRegistryV2Abstract(override val config: DockerRegistryConfi
192192
*/
193193
protected def serviceName: Option[String] = None
194194

195+
/**
196+
* Returns the repository path to use in manifest and token URIs.
197+
* Default behavior adds "library" repository for images without an explicit repository.
198+
* Registries can override this for custom behavior (e.g., ECR doesn't need "library").
199+
*/
200+
protected def getRepositoryPath(dockerImageID: DockerImageIdentifier): String =
201+
dockerImageID.nameWithDefaultRepository
202+
195203
/**
196204
* Builds the token URI to be queried based on a DockerImageID
197205
*/
@@ -201,7 +209,7 @@ abstract class DockerRegistryV2Abstract(override val config: DockerRegistryConfi
201209
scheme = Option(Scheme.https),
202210
authority = Option(Authority(host = Uri.RegName(authorizationServerHostName(dockerImageID)))),
203211
path = "/token",
204-
query = Query.fromString(s"${service}scope=repository:${dockerImageID.nameWithDefaultRepository}:pull")
212+
query = Query.fromString(s"${service}scope=repository:${getRepositoryPath(dockerImageID)}:pull")
205213
)
206214
}
207215

@@ -233,7 +241,7 @@ abstract class DockerRegistryV2Abstract(override val config: DockerRegistryConfi
233241
Uri.apply(
234242
scheme = Option(Scheme.https),
235243
authority = Option(Authority(host = Uri.RegName(registryHostName(dockerImageID)))),
236-
path = s"/v2/${dockerImageID.nameWithDefaultRepository}/manifests/${dockerImageID.reference}"
244+
path = s"/v2/${getRepositoryPath(dockerImageID)}/manifests/${dockerImageID.reference}"
237245
)
238246

239247
/**

dockerHashing/src/main/scala/cromwell/docker/registryv2/flows/aws/AmazonEcrAbstract.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ import org.slf4j.{Logger, LoggerFactory}
1111
abstract class AmazonEcrAbstract(override val config: DockerRegistryConfig) extends DockerRegistryV2Abstract(config) {
1212
private val logger: Logger = LoggerFactory.getLogger(this.getClass)
1313

14+
/**
15+
* ECR supports images with no repository (e.g., 123456789012.dkr.ecr.us-east-1.amazonaws.com/example-tool)
16+
* so we don't add the default "library" repository prefix
17+
*/
18+
override protected def getRepositoryPath(dockerImageID: DockerImageIdentifier): String =
19+
dockerImageID.name
20+
1421
/**
1522
* Not used as getToken is overridden
1623
*/

0 commit comments

Comments
 (0)