Skip to content

Make key the canonical parameter, deprecate auth_key#263

Open
Marenz wants to merge 1 commit intofrequenz-floss:v1.x.xfrom
Marenz:rename-dispatch-api-key
Open

Make key the canonical parameter, deprecate auth_key#263
Marenz wants to merge 1 commit intofrequenz-floss:v1.x.xfrom
Marenz:rename-dispatch-api-key

Conversation

@Marenz
Copy link
Contributor

@Marenz Marenz commented Feb 10, 2026

Reverses the previous rename so that key / DISPATCH_API_KEY are the canonical names again.

  • DispatchApiClient.__init__(): key is the primary parameter, auth_key emits a deprecation warning
  • CLI: --api-key / DISPATCH_API_KEY is primary, --auth-key / DISPATCH_API_AUTH_KEY is deprecated
  • Backwards compatible: both names continue to work

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>
@Marenz Marenz requested review from a team as code owners February 10, 2026 09:50
@Marenz Marenz requested review from shsms and stefan-brus-frequenz and removed request for a team February 10, 2026 09:50
@github-actions github-actions bot added part:cli Affects the command-line interface part:test-utils Affects the test utilities part:dispatcher labels Feb 10, 2026
Copy link
Contributor

@llucax llucax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would hold on this one too:

  1. 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).
  2. I would do the change top-down (i.e. change client-base first), 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
  3. 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.

@Marenz
Copy link
Contributor Author

Marenz commented Feb 10, 2026

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:cli Affects the command-line interface part:dispatcher part:test-utils Affects the test utilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants