Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Multiple tokens not combined correctly when computing service fallback #1117

Open
DaoWen opened this issue Jun 9, 2020 · 0 comments
Open

Comments

@DaoWen
Copy link
Contributor

DaoWen commented Jun 9, 2020

When computing fallback-period-secs and stale-timeout-mins for a service that has multiple source tokens, the current implementation just grabs these values from the last token in the list that sets them. The fallback logic should be more robust, e.g., taking the maximum value.

(let [{:strs [fallback-period-secs stale-timeout-mins]}
(->> source-tokens
(map #(some-> % :token token->token-parameters))
(reduce merge {})
(attach-token-defaults-fn))]

Alternatively, simply dropping support for combining tokens like this would also solve the problem. The biggest reason we haven't actually seen this bug in production is that no one uses this feature now that we support parameterized services.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant