Added debug info for bug with workflow deletions

This commit is contained in:
frikky
2021-07-30 19:53:13 +02:00
parent 4010258c37
commit 575b0bb297
5 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
### DEFAULT ### DEFAULT
NAME=shuffle-app_sdk NAME=shuffle-app_sdk
VERSION=0.8.104 VERSION=0.9.02
docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force
docker build . -f Dockerfile -t frikky/shuffle:app_sdk -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION docker build . -f Dockerfile -t frikky/shuffle:app_sdk -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION
+2 -2
View File
@@ -2,7 +2,7 @@ module shuffle
go 1.13 go 1.13
replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared //replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi //replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
@@ -22,7 +22,7 @@ require (
github.com/docker/go-units v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect
github.com/elastic/go-elasticsearch/v7 v7.13.1 // indirect github.com/elastic/go-elasticsearch/v7 v7.13.1 // indirect
github.com/frikky/kin-openapi v0.39.0 github.com/frikky/kin-openapi v0.39.0
github.com/frikky/shuffle-shared v0.0.74 github.com/frikky/shuffle-shared v0.0.76
github.com/fsouza/go-dockerclient v1.7.2 github.com/fsouza/go-dockerclient v1.7.2
github.com/ghodss/yaml v1.0.0 github.com/ghodss/yaml v1.0.0
github.com/go-git/go-billy/v5 v5.0.0 github.com/go-git/go-billy/v5 v5.0.0
+3 -2
View File
@@ -1190,12 +1190,12 @@ func deleteWorkflow(resp http.ResponseWriter, request *http.Request) {
// FIXME - maybe delete workflow executions // FIXME - maybe delete workflow executions
err = shuffle.DeleteKey(ctx, "workflow", fileId) err = shuffle.DeleteKey(ctx, "workflow", fileId)
if err != nil { if err != nil {
log.Printf("Failed deleting key %s", fileId) log.Printf("[DEBUG]] Failed deleting key %s", fileId)
resp.WriteHeader(401) resp.WriteHeader(401)
resp.Write([]byte(`{"success": false, "reason": "Failed deleting key"}`)) resp.Write([]byte(`{"success": false, "reason": "Failed deleting key"}`))
return return
} }
log.Printf("[INFO] Should have deleted workflow %s", fileId) log.Printf("[INFO] Should have deleted workflow %s (%s)", workflow.Name, fileId)
//memcacheName := fmt.Sprintf("%s_%s", user.Username, fileId) //memcacheName := fmt.Sprintf("%s_%s", user.Username, fileId)
//memcache.Delete(ctx, memcacheName) //memcache.Delete(ctx, memcacheName)
@@ -1204,6 +1204,7 @@ func deleteWorkflow(resp http.ResponseWriter, request *http.Request) {
//cacheKey := fmt.Sprintf("%s_workflows", user.Id) //cacheKey := fmt.Sprintf("%s_workflows", user.Id)
cacheKey := fmt.Sprintf("%s_workflows", user.Id) cacheKey := fmt.Sprintf("%s_workflows", user.Id)
shuffle.DeleteCache(ctx, cacheKey) shuffle.DeleteCache(ctx, cacheKey)
log.Printf("[DEBUG] Cleared workflow cache for %s (%s)", user.Username, user.Id)
resp.WriteHeader(200) resp.WriteHeader(200)
resp.Write([]byte(`{"success": true}`)) resp.Write([]byte(`{"success": true}`))
+1 -1
View File
@@ -1,7 +1,7 @@
version: '3' version: '3'
services: services:
frontend: frontend:
build: ./frontend #build: ./frontend
image: ghcr.io/frikky/shuffle-frontend:nightly image: ghcr.io/frikky/shuffle-frontend:nightly
container_name: shuffle-frontend container_name: shuffle-frontend
hostname: shuffle-frontend hostname: shuffle-frontend
+1 -1
View File
@@ -1979,7 +1979,7 @@ const Workflows = (props) => {
//backgroundColor: inputColor, //backgroundColor: inputColor,
}, },
}} }}
placeholder="Filter Your Workflows" placeholder="Add Filter"
color="primary" color="primary"
fullWidth fullWidth
value={filters} value={filters}