Add generic API credential fallbacks to dispatch CLI - #263
Conversation
llucax
left a comment
There was a problem hiding this comment.
I would hold on this one too:
- We need to make sure we agree on whatever name you want to propose, to avoid having to change everything again (including CLI args, constructor parameters and env variables, I would align them ideally, so either
--api-key/api_key=/_API_KEYor--key/key=/_KEY`, but not a mix of both). - I would do the change top-down (i.e. change
client-basefirst), so it gets more visibility and all projects get updated, otherwise it only adds more confusion if some projects use one and others the other - Unrelated, but I would consider removing the env var support, at least for the client library (we can keep it as a CLI-only feature, it makes more sense there). Even when "automatic auth" can be convenient, I guess making auth explicit in code is not a crazy requirement.
It is a CLI only feature, the client/library itself knows nothing about env vars :) |
key the canonical parameter, deprecate auth_keykey the canonical parameter, deprecate auth_key, and raise on invalid start_time
|
@cwasicki This includes the fix for the epoch timestamp bug you discovered in frequenz-io/frequenz-actor-electricity-trading#570 — passing a |
cwasicki
left a comment
There was a problem hiding this comment.
The start time fix LGTM, thank you!
9c3c455 to
44e7bdf
Compare
key the canonical parameter, deprecate auth_key, and raise on invalid start_timekey the canonical parameter, deprecate auth_key
44e7bdf to
51a8844
Compare
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
51a8844 to
07b1c97
Compare
key the canonical parameter, deprecate auth_key
Adds
FREQUENZ_API_KEY/FREQUENZ_API_SECRETfallbacks todispatch-cli, following frequenz-io/rnd#187.Explicit options take precedence over the Dispatch-specific environment pair, which takes precedence over the generic pair. Keys and signing secrets are never mixed across sources.