diff --git a/src/metabase/config.clj b/src/metabase/config.clj index fa27943410095f60f28a4f9be3d8b8137fb6f828..d8e2eae2325cd09f9c4f5bf0001a1ed19e847cb6 100644 --- a/src/metabase/config.clj +++ b/src/metabase/config.clj @@ -1,6 +1,7 @@ (ns metabase.config (:require [clojure.java.io :as io] [clojure.string :as str] + [clojure.tools.logging :as log] [environ.core :as environ] [metabase.plugins.classloader :as classloader]) (:import clojure.lang.Keyword @@ -127,3 +128,18 @@ (def ^Keyword mb-session-cookie-samesite "Value for session cookie's `SameSite` directive. Must be one of \"none\", \"lax\", or \"strict\" (case insensitive)." (mb-session-cookie-samesite*)) + +;; In 0.41.0 we switched from Leiningen to deps.edn. This warning here to keep people from being bitten in the ass by +;; the little gotcha described below. +;; +;; TODO -- after we've shipped 0.43.0, remove this warning. At that point, the last three shipped major releases will +;; all be deps.edn based. +(when (and (not is-prod?) + (.exists (io/file ".lein-env"))) + ;; don't need to i18n since this is a dev-only warning. + (log/warn + (str "Found .lein-env in the project root directory.\n" + "This file was previously created automatically by the Leiningen lein-env plugin.\n" + "Environ will use values from it in preference to env var or Java system properties you've specified.\n" + "You should delete it; it will be recreated as needed when switching to a branch still using Leiningen.\n" + "See https://github.com/metabase/metabase/wiki/Migrating-from-Leiningen-to-tools.deps#custom-env-var-values for more details."))) diff --git a/test/metabase/api/session_test.clj b/test/metabase/api/session_test.clj index 5c6195691ed00390816749e750d6dcccddb1bb88..e90d8a87d526725d31a0cf314ff986d965fb27e2 100644 --- a/test/metabase/api/session_test.clj +++ b/test/metabase/api/session_test.clj @@ -154,9 +154,9 @@ :body json/parse-string (get-in ["errors" "username"])))] - (is (re= #"^Too many attempts! You must wait 1\d seconds before trying again\.$" + (is (re= #"^Too many attempts! You must wait \d+ seconds before trying again\.$" (error))) - (is (re= #"^Too many attempts! You must wait 4\d seconds before trying again\.$" + (is (re= #"^Too many attempts! You must wait \d+ seconds before trying again\.$" (error))))))) (deftest failure-threshold-per-request-source