diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index 77ccdb4c..23c695eb 100644 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -601,7 +601,7 @@ class AppBase: self.full_execution = fullexecution - self.logger.info("AFTER FULLEXEC stream result") + self.logger.info("AFTER FULLEXEC stream result (init)") # Gets the value at the parenthesis level you want def parse_nested_param(string, level): diff --git a/backend/go-app/codegen.go b/backend/go-app/codegen.go index 2c7c64d7..ee182ef6 100644 --- a/backend/go-app/codegen.go +++ b/backend/go-app/codegen.go @@ -412,8 +412,8 @@ func makePythoncode(swagger *openapi3.Swagger, name, url, method string, paramet fileBalance, ) - //log.Printf("FUNCTION: %s", data) - if strings.Contains(functionname, "filescan") { + if strings.Contains(functionname, "get_list_rulesssss") { + //log.Printf("FUNCTION: %s", data) log.Println(data) log.Printf("Queries: %s", queryString) } diff --git a/backend/go-app/docker.go b/backend/go-app/docker.go index f05e4d38..0a0b4bae 100644 --- a/backend/go-app/docker.go +++ b/backend/go-app/docker.go @@ -190,7 +190,7 @@ func fixTags(tags []string) []string { */ // Custom Docker image builder wrapper in memory -func buildImageMemory(fs billy.Filesystem, tags []string, dockerfileFolder string) error { +func buildImageMemory(fs billy.Filesystem, tags []string, dockerfileFolder string, downloadIfFail bool) error { ctx := context.Background() client, err := client.NewEnvClient() if err != nil { diff --git a/backend/go-app/walkoff.go b/backend/go-app/walkoff.go index b8804c39..4a468d29 100644 --- a/backend/go-app/walkoff.go +++ b/backend/go-app/walkoff.go @@ -909,8 +909,6 @@ func validateNewWorkerExecution(body []byte) error { return err } - //log.Printf("LEN: %s", string(body)) - //log.Printf("LEN: %d", len(string(body))) baseExecution, err := getWorkflowExecution(ctx, execution.ExecutionId) if err != nil { log.Printf("[ERROR] Failed getting execution (workflowqueue) %s: %s", execution.ExecutionId, err) @@ -6421,7 +6419,7 @@ func iterateAppGithubFolders(fs billy.Filesystem, dir []os.FileInfo, extra strin if len(extra) == 0 { log.Printf("[INFO] Starting build of %d containers (FIRST)", len(buildLaterFirst)) for _, item := range buildLaterFirst { - err = buildImageMemory(fs, item.Tags, item.Extra) + err = buildImageMemory(fs, item.Tags, item.Extra, true) if err != nil { log.Printf("Failed image build memory: %s", err) } else { @@ -6435,7 +6433,7 @@ func iterateAppGithubFolders(fs billy.Filesystem, dir []os.FileInfo, extra strin log.Printf("[INFO] Starting build of %d skipped docker images", len(buildLaterList)) for _, item := range buildLaterList { - err = buildImageMemory(fs, item.Tags, item.Extra) + err = buildImageMemory(fs, item.Tags, item.Extra, true) if err != nil { log.Printf("[INFO] Failed image build memory: %s", err) } else { @@ -6647,15 +6645,19 @@ func getAllSchedules(ctx context.Context, orgId string) ([]ScheduleOld, error) { return schedules, nil } +//FIXME: Add cursor func getAllWorkflowApps(ctx context.Context) ([]WorkflowApp, error) { var allworkflowapps []WorkflowApp - q := datastore.NewQuery("workflowapp").Order("-edited").Limit(50) + q := datastore.NewQuery("workflowapp").Order("-edited").Limit(40) + //Activated bool `json:"activated" yaml:"activated" required:false datastore:"activated"` //Activated bool `json:"activated" yaml:"activated" required:false datastore:"activated"` _, err := dbclient.GetAll(ctx, q, &allworkflowapps) if err != nil { if strings.Contains(fmt.Sprintf("%s", err), "ResourceExhausted") { - q := datastore.NewQuery("workflowapp").Limit(40).Order("-edited") + //datastore.NewQuery("workflowapp").Limit(30).Order("-edited") + q = datastore.NewQuery("workflowapp").Order("-edited").Limit(27) + //q := q.Limit(25) _, err := dbclient.GetAll(ctx, q, &allworkflowapps) if err != nil { return []WorkflowApp{}, err diff --git a/docker-compose.yml b/docker-compose.yml index 9dec03cb..1ce245a3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: depends_on: - backend backend: - #build: ./backend + build: ./backend image: ghcr.io/frikky/shuffle-backend:0.8.54 container_name: shuffle-backend hostname: ${BACKEND_HOSTNAME} diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index d860d561..6605e386 100644 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -153,6 +153,7 @@ const AngularWorkflow = (props) => { const [requiresAuthentication, setRequiresAuthentication] = React.useState(false) const [rightSideBarOpen, setRightSideBarOpen] = React.useState(false) const [showSkippedActions, setShowSkippedActions] = React.useState(false) + const [lastExecution, setLastExecution] = React.useState("") const [selectedResult, setSelectedResult] = React.useState({}) const [codeModalOpen, setCodeModalOpen] = React.useState(false); @@ -6380,13 +6381,14 @@ const AngularWorkflow = (props) => { - + {workflowExecutions.length > 0 ?
{workflowExecutions.map((data, index) => { @@ -6405,6 +6407,7 @@ const AngularWorkflow = (props) => { } return ( + {}} onMouseOut={() => {}} onClick={() => { if (data.result === undefined || data.result === null || data.result.length === 0) { @@ -6420,7 +6423,7 @@ const AngularWorkflow = (props) => { setExecutionData(data) }}>
-
+
{getExecutionSourceImage(data)}
@@ -6436,9 +6439,14 @@ const AngularWorkflow = (props) => { : null}
- + {lastExecution === data.execution_id ? + + : + + } + ) return })} @@ -6457,6 +6465,7 @@ const AngularWorkflow = (props) => { stop() getWorkflowExecution(props.match.params.key) setExecutionModalView(0) + setLastExecution(executionData.execution_id) }}> {}}> @@ -6617,6 +6626,21 @@ const AngularWorkflow = (props) => { validate.result = JSON.parse(validate.result) } + //if (codeModalOpen && selectedResult.result.includes("file_id")) { + // console.log("SHOW RESULT WITH FILES: ", selectedResult.result) + // //const regex = "\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b" + // //const regex = /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}/i + // const regex = /^[A-F\d]{8}-[A-F\d]{4}-4[A-F\d]{3}-[89AB][A-F\d]{3}-[A-F\d]{12}$/i + // //const found = selectedResult.result.match(regex) + // const found = "hello how are you cf80fa70-65cf-4963-b474-b459a6dead81 what".match(regex) + // const regex = /\${(\w{8}-\w{4}-\w{3}-\w{3}-\w)}/g + // const found = placeholder.match(regex) + + // console.log("FOUND: ", found) + + // //cf80fa70-65cf-4963-b474-b459a6dead81 + //} + const codePopoutModal = !codeModalOpen ? null : { diff --git a/frontend/src/views/AppCreator.jsx b/frontend/src/views/AppCreator.jsx index a4fabc8e..82c28446 100644 --- a/frontend/src/views/AppCreator.jsx +++ b/frontend/src/views/AppCreator.jsx @@ -479,11 +479,12 @@ const AppCreator = (props) => { for (let [path, pathvalue] of Object.entries(data.paths)) { for (let [method, methodvalue] of Object.entries(pathvalue)) { if (methodvalue === null) { - alert.info("Skipped method "+method) + alert.info("Skipped method (null)"+method) continue } if (!allowedfunctions.includes(method.toUpperCase())) { + alert.info("Skipped method (not allowed) "+method) continue } @@ -556,7 +557,7 @@ const AppCreator = (props) => { } // HAHAHA wtf is this. - if (methodvalue.responses !== undefined) { + if (methodvalue.responses !== undefined && methodvalue.responses !== null) { if (methodvalue.responses.default !== undefined) { if (methodvalue.responses.default.content !== undefined) { if (methodvalue.responses.default.content["text/plain"] !== undefined) { @@ -1818,7 +1819,7 @@ const AppCreator = (props) => { addPathQuery() }}>New query {currentActionMethod === "POST" ? -