Commit Graph

57 Commits

Author SHA1 Message Date
Aleksandr Melnikov
27d5a480a8 Using curl docker image to remove curl install. 2020-04-16 16:07:20 -07:00
Aleksandr Melnikov
5520558ef0 Removed un-needed headers from CURL request. 2020-04-16 16:04:06 -07:00
Aleksandr Melnikov
bcfa8d986d DRY Principle - Simplified if-else for insert SQL. 2020-04-16 15:48:54 -07:00
Andrey Melnikov
74f1019e76 Merge branch 'feat/core.144-workflow.stats' into feat/dev-core-144-workflow.stats 2020-04-16 14:44:11 -07:00
Aleksandr Melnikov
3410898188 Per feedback, using *time.Time to allow nil value. 2020-04-16 13:10:23 -07:00
Rush Tehrani
bdc817c14d Merge pull request #151 from onepanelio/feature/core.update.template
Feature/core.update.template
2020-04-16 11:14:40 -07:00
Aleksandr Melnikov
32ea715005 Injecting ONEPANEL_HOST to workflows. 2020-04-15 17:01:32 -07:00
Aleksandr Melnikov
01bbca6c73 Renamed WorkflowStatistics to just Stats.
Changed value types so they come back as integers in JSON.
2020-04-15 15:16:45 -07:00
Aleksandr Melnikov
72df98834c Adding code to return the WorkflowStatistics with the ListTemplates
response.
2020-04-15 15:03:07 -07:00
Aleksandr Melnikov
7574c1500f Added code to retrieve workflow execution statistics for a workflow template.
- Code will calculate expected values and attach them to the given
WorkflowTemplate.
2020-04-15 14:34:02 -07:00
Aleksandr Melnikov
059608018a Updated GetExitHandlerWorkflowStatistics to get the bearer token on the
fly, depending on the namespace.
- Updated the places this function is called to pass in the client.
2020-04-15 10:11:24 -07:00
Aleksandr Melnikov
8cdafc77cb Adjusting the JSON Body
- Since we are posting to HTTP, we do not need the surrounding pieces.
Just the "Body".
- Removing debugging statements.
2020-04-14 18:39:11 -07:00
Aleksandr Melnikov
ecb864df9a Removing todo, the new ENV VARS are present on new onepanel-core pod. 2020-04-14 18:38:35 -07:00
Aleksandr Melnikov
76ce475ae1 Passing in the workflowTemplateID, so the exitHandler can use that
information.
2020-04-14 17:56:42 -07:00
Aleksandr Melnikov
9fb1da353b Added in progress CURL JSON Post.
- Basic POST request is made
2020-04-14 12:24:59 -07:00
Aleksandr Melnikov
930cdd5d08 Added insert statements for workflow_executions table. 2020-04-14 12:24:28 -07:00
Aleksandr Melnikov
ed546be1d3 Updated exitHandler function to accept a namespace, since that
information is needed to be passed in to the statistics endpoint.
2020-04-14 10:28:30 -07:00
Andrey Melnikov
628c68c24f clean/fix: fixed issues with creating workflow template versions and labels.
Removed most of the logic from updating a workflow template version as it is currently not used.
2020-04-13 12:45:36 -07:00
Aleksandr Melnikov
e0f9b77846 Adding ENV vars for passing the host and port to the exit handler.
- Curl needs this information to properly send a POST request to the
onepanel-core endpoint.
2020-04-13 12:20:22 -07:00
Aleksandr Melnikov
89d6d626e9 Added code to add an exit handler to Cron and Workflow Execution. 2020-04-13 12:10:56 -07:00
Aleksandr Melnikov
efb28419b9 Added function to generate an exit handler template.
- In this case, it's to ping an endpoint with workflow statistics.
- The posted data is a WIP
2020-04-13 11:45:08 -07:00
Andrey Melnikov
57dcd1d399 fix: updated resources so they can be provided labels on creation. 2020-04-12 13:28:45 -07:00
Andrey Melnikov
bfb65dd1ad fix: issue with cron workflows not working and updated workflow executions to include the version of the workflow template they ran. 2020-04-10 12:04:12 -07:00
Andrey Melnikov
02815b9cf0 progress: basic workflow execution from template. 2020-04-09 15:49:03 -07:00
Andrey Melnikov
a520f3c6c3 Prototyping removing workflow versions and updating workflow templates to always create a k8 resources. 2020-04-09 15:49:03 -07:00
Aleksandr Melnikov
b668b54fd6 Added code to pass identifying Workflow labels.
- CronWorkflow will pass these labels into any Workflow Executions that
are created.
- This means those Workflows will show up under the correct Workflow Template
page.
Fixed some code related to argo update.
2020-04-03 16:52:01 -07:00
Andrey Melnikov
4c3c3549a8 Merge branch 'feature/core.16-add.argo.cronworkflow' into develop 2020-04-03 10:18:46 -07:00
Andrey Melnikov
b8e37aca73 Merge branch 'feature/namespaces' into develop 2020-04-03 10:18:17 -07:00
Aleksandr Melnikov
f71eb9d6ad Adding a fix for deleting labels from CronWorklows and WorkflowExecutions.
- WorkflowTemplates appears to be un-affected
2020-04-02 17:16:31 -07:00
Aleksandr Melnikov
bcf4400aac Using exposed function. 2020-03-27 12:31:13 -07:00
Aleksandr Melnikov
96fd279189 Exposing UnmarshalWorkflows.
- So CronWorkflows can use them
2020-03-27 12:22:01 -07:00
Aleksandr Melnikov
a5fc6b238c Renaming create() to createWorkflow(), to help show what the func.
is doing.
2020-03-27 12:20:58 -07:00
Aleksandr Melnikov
4a08971f46 Updated onepanelApiUrl and providerType 2020-03-27 12:17:39 -07:00
Aleksandr Melnikov
52b430dca2 Adding onepanelApiUrl and providerType to templates as ENV vars. 2020-03-27 12:17:39 -07:00
Aleksandr Melnikov
5c3009c6f6 Added helper function to add ENVs to a Template. 2020-03-27 12:17:39 -07:00
Andrey Melnikov
d293a85cd0 feat: added label support for workflow executions and templates.
Also updated workflow templates to create a workflow template k8 resource so we can easily work with labels.
2020-03-25 12:46:55 -07:00
Aleksandr Melnikov
d42a360ec9 Updated onepanelApiUrl and providerType 2020-03-24 17:43:05 -07:00
Aleksandr Melnikov
6c6e7fadb0 Adding onepanelApiUrl and providerType to templates as ENV vars. 2020-03-24 17:43:05 -07:00
Aleksandr Melnikov
a7ce4bd1ae Added helper function to add ENVs to a Template. 2020-03-24 17:43:05 -07:00
Andrey Melnikov
0e100b83d0 feat: updated workflow parameters to ignore values without a default. 2020-03-20 12:38:38 -07:00
Andrey Melnikov
cc7f5678d2 feat: Added function to strip out form field types. 2020-03-19 16:31:28 -07:00
Aleksandr Melnikov
72b162c52f Added an extra error check to GetWorkflowExecutionMetrics.
- If the error is unknown, check to see if S3 says the specified key
does not exist.
This can mean the workflow does not generate any metrics,
or there aren't any generated yet.
Thus, return 404.
2020-03-18 18:02:14 -07:00
Andrey Melnikov
ab938d7312 clean: removed debugging logging from code 2020-03-10 11:12:45 -07:00
Andrey Melnikov
8cbbf585b3 Added logging for extra testing. 2020-03-10 10:38:55 -07:00
Andrey Melnikov
3f5f68e302 Testing sending extra data back to client after channel is closed. 2020-03-09 16:44:50 -07:00
Andrey Melnikov
6e3cb8bdfd Testing catching issue with workflow if it does not type assert 2020-03-09 14:43:00 -07:00
Andrey Melnikov
ea04a661b3 Fixed issue where dates were not being set on workflow executions 2020-03-02 15:19:39 -08:00
Andrey Melnikov
262b32895c Removed name requirements for listing files 2020-03-02 11:41:27 -08:00
Andrey Melnikov
9f06daad60 Separated out parsing extension and added it to api response as it was not being set. 2020-02-29 11:39:18 -08:00
Andrey Melnikov
202e6c6613 Added extension and parentPath to files responses 2020-02-29 11:31:41 -08:00