Skip to content

Commit

Permalink
Merge pull request #109 from icgc-argo/RC/2.4.0
Browse files Browse the repository at this point in the history
Rc/2.4.0
  • Loading branch information
lepsalex authored Dec 8, 2020
2 parents f4ea3bf + 2f3c6a1 commit 06de1f3
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 21 deletions.
24 changes: 12 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def dockerHubRepo = "icgcargo/workflow-relay"
def dockerHub = "ghcr.io/icgc-argo/workflow-relay"
def gitHubRepo = "icgc-argo/workflow-relay"
def chartVersion = "0.3.0"
def chartVersion = "0.4.0"
def commit = "UNKNOWN"
def version = "UNKNOWN"

Expand Down Expand Up @@ -69,15 +69,15 @@ spec:
}
steps {
container('docker') {
withCredentials([usernamePassword(credentialsId:'argoDockerHub', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh 'docker login -u $USERNAME -p $PASSWORD'
withCredentials([usernamePassword(credentialsId:'argoContainers', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh 'docker login ghcr.io -u $USERNAME -p $PASSWORD'
}

// DNS error if --network is default
sh "docker build --network=host . -t ${dockerHubRepo}:edge -t ${dockerHubRepo}:${version}-${commit}"
sh "docker build --network=host . -t ${dockerHub}:edge -t ${dockerHub}:${version}-${commit}"

sh "docker push ${dockerHubRepo}:${version}-${commit}"
sh "docker push ${dockerHubRepo}:edge"
sh "docker push ${dockerHub}:${version}-${commit}"
sh "docker push ${dockerHub}:edge"
}
}
}
Expand Down Expand Up @@ -122,15 +122,15 @@ spec:
sh "git push https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/${gitHubRepo} --tags"
}

withCredentials([usernamePassword(credentialsId:'argoDockerHub', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh 'docker login -u $USERNAME -p $PASSWORD'
withCredentials([usernamePassword(credentialsId:'argoContainers', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh 'docker login ghcr.io -u $USERNAME -p $PASSWORD'
}

// DNS error if --network is default
sh "docker build --network=host . -t ${dockerHubRepo}:latest -t ${dockerHubRepo}:${version}"
sh "docker build --network=host . -t ${dockerHub}:latest -t ${dockerHub}:${version}"

sh "docker push ${dockerHubRepo}:${version}"
sh "docker push ${dockerHubRepo}:latest"
sh "docker push ${dockerHub}:${version}"
sh "docker push ${dockerHub}:latest"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>org.icgc_argo</groupId>
<artifactId>workflow-relay</artifactId>
<version>2.3.0</version>
<version>2.4.0</version>
<name>workflow-relay</name>
<description>Demo project for Spring Boot</description>

Expand Down Expand Up @@ -91,7 +91,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public enum WorkflowState {

EXECUTOR_ERROR("EXECUTOR_ERROR"),

FAILED("FAILED");
FAILED("FAILED"),

ERROR("ERROR");

@NonNull private final String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,13 @@ public void indexTask(JsonNode event) {
request.version(doc.getState().ordinal());
try {
val indexResponse = esClient.index(request, RequestOptions.DEFAULT);
log.trace(indexResponse.toString());
log.debug(indexResponse.toString());
} catch (ElasticsearchStatusException e) {
log.trace(
"Out of order, already have newer version for task {} in run {}",
log.error(
"Out of order, already have newer version for task {} in run {}, exception: {}",
doc.getTaskId(),
doc.getRunId());
doc.getRunId(),
e.getLocalizedMessage());
}
}

Expand Down Expand Up @@ -164,9 +165,12 @@ private void indexWorkflowDocIfNewVersion(WorkflowDocument doc) {
request.version(doc.getState().ordinal());
try {
val indexResponse = esClient.index(request, RequestOptions.DEFAULT);
log.trace(indexResponse.toString());
log.debug(indexResponse.toString());
} catch (ElasticsearchStatusException e) {
log.trace("Out of order, already have newer version for run {}", doc.getRunId());
log.error(
"Out of order, already have newer version for run {}, exception: {}",
doc.getRunId(),
e.getLocalizedMessage());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.springframework.stereotype.Service;

import static java.lang.String.format;
import static org.icgc_argo.workflow.relay.model.index.WorkflowState.ERROR;
import static org.icgc_argo.workflow.relay.model.index.WorkflowState.FAILED;

@Profile("splitter")
Expand Down Expand Up @@ -102,6 +103,12 @@ public void split(JsonNode event) {
// workflow topic key == nextflow runName (our wes id ... e.g. wes-1234567890abcdefg)
.setHeader(KafkaHeaders.MESSAGE_KEY, runName.getBytes())
.build());
} else if (event.has("event") && event.path("event").asText().equals(ERROR.toString())) {
// Error logs already handled above so we can ignore these raw error messages as they have
// almost no context past just letting you know that an error has occurred, which we can infer
// by looking at the detailed log
log.debug(
"Received raw error event, no handler specified at this time: {}", event.toString());
} else {
log.error("Unhandled event: {}", event.toString());
throw new RuntimeException("Cannot handle event, please see DLQ for event information");
Expand Down

0 comments on commit 06de1f3

Please sign in to comment.