diff --git a/CHANGELOG.md b/CHANGELOG.md index 280d85fff..093025e36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# Release 0.14.0 +- [GH-1607] wfl.log/stdout-logger should handle JSON-incompatible edn ([#569](https://github.com/broadinstitute/wfl/pull/569)) +- [DDO-1920] Configure GKE LB Backend Service timeout in Helm ([#564](https://github.com/broadinstitute/wfl/pull/564)) +- [GH-1598] Update TerraExecutor documentation ([#566](https://github.com/broadinstitute/wfl/pull/566)) + # Release 0.13.0 - [GH-1539] Stop started workloads in system tests ([#562](https://github.com/broadinstitute/wfl/pull/562)) - [GH-1563] [GH-1573] TerraDataRepoSource polls row metadata table ([#559](https://github.com/broadinstitute/wfl/pull/559)) diff --git a/api/src/wfl/log.clj b/api/src/wfl/log.clj index 6eafb0b1c..5718ed6d3 100644 --- a/api/src/wfl/log.clj +++ b/api/src/wfl/log.clj @@ -53,11 +53,18 @@ (def stdout-logger "A logger to write to standard output" (reify Logger - (-write [logger edn] - (-> edn - (json/write-str :escape-slash false - :key-fn key-fn) - println)))) + (-write [_logger edn] + (let [json-write-str + #(json/write-str + % + :escape-slash false + :key-fn key-fn) + to-log + (try (json-write-str edn) + (catch Throwable t + (json-write-str {:tried-to-log (str edn) + :cause (str t)})))] + (println to-log))))) (def ^:dynamic *logger* "The logger now." diff --git a/api/test/wfl/unit/logging_test.clj b/api/test/wfl/unit/logging_test.clj index 42937e5c6..5319b7fa0 100644 --- a/api/test/wfl/unit/logging_test.clj +++ b/api/test/wfl/unit/logging_test.clj @@ -52,4 +52,17 @@ (is (= "INFO" (get-in log [:severity]))) (is (= "I did it again." (get-in log [:message :via 0 :data :why]))) (is (= "Oh baby, baby." (get-in log [:message :cause]))) - (is (= "I'm sent from above." (get-in log [:message :data :that])))))) + (is (= "I'm sent from above." (get-in log [:message :data :that]))))) + (testing "JSON-incompatible input is stringified" + (let [x + (ex-info "Try to log non-JSON" {:bad (tagged-literal 'object :fnord)}) + {:keys [tried-to-log cause] :as _log} + (json/read-str (with-out-str (log/info x)) :key-fn keyword)] + (is (string? tried-to-log)) + (is (str/includes? tried-to-log ":cause \"Try to log non-JSON\"")) + (is (str/includes? tried-to-log ":data {:bad #object :fnord}")) + (is (string? cause)) + (is (= (str/join \space ["java.lang.Exception:" + "Don't know how to write JSON" + "of class clojure.lang.TaggedLiteral"]) + cause))))) diff --git a/docs/md/executor.md b/docs/md/executor.md index 9554d1c8e..fdcdd7e96 100644 --- a/docs/md/executor.md +++ b/docs/md/executor.md @@ -62,7 +62,7 @@ in the Terra UI. Prerequisites: - The workspace must exist prior to workload creation. -- `workflow-launcher@firecloud.org` must be a workspace "Owner" in order to +- `workflow-launcher@firecloud.org` must be a workspace "Writer" in order to import snapshots to the workspace. - The workspace must be compatible with any downstream processing stage that consumes its workflows. diff --git a/helm/wfl/Chart.yaml b/helm/wfl/Chart.yaml index dc93c5409..5b8725ef1 100644 --- a/helm/wfl/Chart.yaml +++ b/helm/wfl/Chart.yaml @@ -4,7 +4,7 @@ description: A Helm chart for deploy WorkFlow Launcher on Kubernetes type: application -version: 0.3.36 +version: 0.3.37 home: https://github.com/broadinstitute/wfl appVersion: 0.5.2 diff --git a/helm/wfl/templates/ingress.yaml b/helm/wfl/templates/ingress.yaml index 4448debb8..ae065c774 100644 --- a/helm/wfl/templates/ingress.yaml +++ b/helm/wfl/templates/ingress.yaml @@ -3,6 +3,15 @@ {{- $fullName := include "wfl.fullname" . -}} {{- $servicePort := .Values.ingress.servicePort -}} +apiVersion: cloud.google.com/v1 +kind: BackendConfig +metadata: + name: {{ $fullName }}-backend-config +spec: + timeoutSec: {{ .Values.ingress.backendTimeout }} + +--- + {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1beta1 {{- else -}} @@ -15,6 +24,7 @@ metadata: {{- include "wfl.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: + cloud.google.com/backend-config: '{"default": "{{ $fullName }}-backend-config"}' {{ toYaml . | indent 4 }} {{- end }} spec: diff --git a/helm/wfl/values.yaml b/helm/wfl/values.yaml index 1cb927a1a..d9c822c4b 100644 --- a/helm/wfl/values.yaml +++ b/helm/wfl/values.yaml @@ -125,3 +125,5 @@ ingress: annotations: {} hosts: [] tls: [] + # -- Seconds to use for the backend service's timeout, see GH-1601 + backendTimeout: 60 diff --git a/version b/version index 54d1a4f2a..a803cc227 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.13.0 +0.14.0