-
Notifications
You must be signed in to change notification settings - Fork 10
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
link to postgres database with hibernate + import job on status succe… #137
base: develop
Are you sure you want to change the base?
link to postgres database with hibernate + import job on status succe… #137
Conversation
@@ -40,6 +40,7 @@ | |||
@Component | |||
public class WorkflowConverter { | |||
private Workflow workflow; | |||
private gov.nist.itl.ssd.wipp.backend.argo.workflows.persistence.ArgoWorkflow argoWorkflow; |
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.
Is it used in this class?
<dependency> | ||
<groupId>org.json</groupId> | ||
<artifactId>json</artifactId> | ||
<version>20090211</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.json</groupId> | ||
<artifactId>json</artifactId> | ||
<version>20180813</version> | ||
<scope>compile</scope> | ||
</dependency> |
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.
Why two versions?
#spring.datasource.url= jdbc:postgresql://localhost:5432/postgres | ||
spring.datasource.url= jdbc:postgresql://localhost:7000/postgres |
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.
Could you create a new property in the pom to set the url?
Something like @postgres.url@
that in then set in the wipp-backend-application
pom for both profiles
JSONObject jsonWorkflow = new JSONObject(argoWorkflow.getWorkflow()); | ||
JSONObject jsonStatus = jsonWorkflow.getJSONObject("status"); | ||
JSONObject jsonNodes = jsonStatus.getJSONObject("nodes"); | ||
Iterator<String> keys = jsonNodes.keys(); | ||
while (keys.hasNext()){ | ||
String key = keys.next(); | ||
JSONObject job = jsonNodes.getJSONObject(key); | ||
|
||
// check that the job is neither the DAG nor the exit handler | ||
if (job.getString("type").equals("Pod") && !job.getString("templateName").equals("exit-handler")){ |
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.
Maybe we could map the object into actual java classes?
We could generate them using Swagger Codegen and the Argo OpenAPI spec
…eded
What does this PR do?
Link to Postgres database with JPA manager for argo workflow data storage
import succeeded jobs even if the whole workflow failed
Related issues
#86
@MyleneSimon