Make key the canonical parameter, deprecate auth_key#263
Make key the canonical parameter, deprecate auth_key#263Marenz wants to merge 1 commit intofrequenz-floss:v1.x.xfrom
key the canonical parameter, deprecate auth_key#263Conversation
Reverse the previous rename: `key` and `DISPATCH_API_KEY` are now the canonical names. `auth_key` and `DISPATCH_API_AUTH_KEY` remain supported but emit deprecation warnings. The CLI option --api-key/DISPATCH_API_KEY is now primary, while --auth-key/DISPATCH_API_AUTH_KEY is deprecated. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
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
Reverses the previous rename so that
key/DISPATCH_API_KEYare the canonical names again.DispatchApiClient.__init__():keyis the primary parameter,auth_keyemits a deprecation warning--api-key/DISPATCH_API_KEYis primary,--auth-key/DISPATCH_API_AUTH_KEYis deprecated