Skip to content

chore: centralize credential logic#353

Merged
kirmar merged 9 commits intomainfrom
chore/centralize-credentials
Mar 10, 2026
Merged

chore: centralize credential logic#353
kirmar merged 9 commits intomainfrom
chore/centralize-credentials

Conversation

@kirmar
Copy link
Contributor

@kirmar kirmar commented Mar 9, 2026

This PR prepares for #352 and improves internal consistency:

  • Initializes creds, config, and credential_provider only in momento/src/main.rs (and configure_cli.rs, since it has a unique process for checking existing credentials / creating new ones)
  • Initializes creds, config, and credential_provider only once for Cache commands, once for Function commands, once for Topic commands
  • Makes CacheClient, FunctionClient, and TopicClient consistent. (Cache commands share a client as Function/Topic commands do, and Function/Topic commands have a client initialization util as Cache commands do)

How to Review

  • Help test configure and a couple other commands to ensure I didn't miss anything
  • Read code for (a) more Rust-idiomatic implementations and (b) more Momento-consistent implementations
    • To ignore CacheCommand's indentation changes, see the w=1 Files Changed or git diff main --ignore-space-change
  • Let me know if you want any commits separated into a separate PR / squash

@kirmar kirmar changed the base branch from main to chore/group-commands-by-options March 10, 2026 00:00
@kirmar kirmar requested review from kvcache and tylerburdsall March 10, 2026 00:13
@kirmar kirmar marked this pull request as ready for review March 10, 2026 00:18
@kirmar kirmar marked this pull request as draft March 10, 2026 00:18
Ref: a88448d
Co-authored-by: Kenny <kenny@momentohq.com>
@kirmar kirmar changed the base branch from chore/group-commands-by-options to main March 10, 2026 01:50
@kirmar kirmar marked this pull request as ready for review March 10, 2026 02:19
tylerburdsall
tylerburdsall previously approved these changes Mar 10, 2026
kvcache
kvcache previously approved these changes Mar 10, 2026
Copy link
Contributor

@kvcache kvcache left a comment

Choose a reason for hiding this comment

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

Looks good!

@kirmar kirmar dismissed stale reviews from kvcache and tylerburdsall via 7bdacdc March 10, 2026 16:37
@kirmar kirmar merged commit 051f71d into main Mar 10, 2026
2 checks passed
@kirmar kirmar deleted the chore/centralize-credentials branch March 10, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants