link to postgres database with hibernate + import job on status succe…#137
Open
Samiasa wants to merge 1 commit intousnistgov:developfrom
Open
link to postgres database with hibernate + import job on status succe…#137Samiasa wants to merge 1 commit intousnistgov:developfrom
Samiasa wants to merge 1 commit intousnistgov:developfrom
Conversation
MyleneSimon
reviewed
May 26, 2020
| @Component | ||
| public class WorkflowConverter { | ||
| private Workflow workflow; | ||
| private gov.nist.itl.ssd.wipp.backend.argo.workflows.persistence.ArgoWorkflow argoWorkflow; |
Collaborator
There was a problem hiding this comment.
Is it used in this class?
Comment on lines
+30
to
+40
| <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> |
Comment on lines
+16
to
+17
| #spring.datasource.url= jdbc:postgresql://localhost:5432/postgres | ||
| spring.datasource.url= jdbc:postgresql://localhost:7000/postgres |
Collaborator
There was a problem hiding this comment.
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
Comment on lines
+101
to
+110
| 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")){ |
Collaborator
There was a problem hiding this comment.
Maybe we could map the object into actual java classes?
We could generate them using Swagger Codegen and the Argo OpenAPI spec
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…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