这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ndyakov
Copy link
Member

@ndyakov ndyakov commented May 29, 2025

Update README and documentation.
There is no need to have ClientID in the CredentialsProviderOptions since it is available in the ConfidentialIdentityProviderOptions where it is actually needed.

Add additional example test with minimal configuration (without scopes) for SystemManagedIdentityProvider

@ndyakov ndyakov requested review from Copilot and htemelski May 29, 2025 15:22
@ndyakov ndyakov self-assigned this May 29, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR deprecates the top-level ClientID field in CredentialsProviderOptions, removes its usage from tests and examples, and updates documentation and examples to use the correct per-provider client ID fields. It also adds a minimal, scope-less example for system-assigned managed identity.

  • Deprecate and hide CredentialsProviderOptions.ClientID and add fallback in NewConfidentialCredentialsProvider.
  • Remove ClientID settings from tests and examples; update README to reflect new usage.
  • Introduce a new minimal example (managedidentity_systemassigned_min) demonstrating system-assigned identity without scopes.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
providers.go Mark ClientID deprecated, update doc comment, add fallback logic in NewConfidentialCredentialsProvider.
providers_test.go & credentials_provider_test.go Remove deprecated ClientID assignments from test cases.
examples/entraid/managedidentity_userassigned/main.go Remove deprecated ClientID from user-assigned identity example.
examples/entraid/managedidentity_systemassigned/main.go Switch hard-coded "SystemAssigned" string to identity.SystemAssignedIdentity.
examples/entraid/managedidentity_systemassigned_min/* Add new minimal example (code + go.mod) for system-assigned managed identity without scopes.
README.md Update all references to ClientID in examples and docs; remove top-level client ID usage.

@ndyakov ndyakov changed the title fix(provider): Mark ClientID as deprecated, use correct one in examples. refactor(provider): Mark ClientID as deprecated, use correct one in examples. May 29, 2025
- go-redis-entraid will be replaced with current implementation anyway
- the example runner (run_examples.sh) will update go-redis to the
  latest version
@ndyakov ndyakov force-pushed the ndyakov/add-min-example branch from 0781944 to 06847a5 Compare May 29, 2025 15:33
@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/redis/go-redis-entraid 93.33% (+0.15%) 👍
github.com/redis/go-redis-entraid/examples/entraid/managedidentity_systemassigned 0.00% (ø)
github.com/redis/go-redis-entraid/examples/entraid/managedidentity_systemassigned_min 0.00% (ø)
github.com/redis/go-redis-entraid/examples/entraid/managedidentity_userassigned 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/redis/go-redis-entraid/examples/entraid/managedidentity_systemassigned/main.go 0.00% (ø) 0 0 0
github.com/redis/go-redis-entraid/examples/entraid/managedidentity_systemassigned_min/main.go 0.00% (ø) 0 0 0
github.com/redis/go-redis-entraid/examples/entraid/managedidentity_userassigned/main.go 0.00% (ø) 0 0 0
github.com/redis/go-redis-entraid/providers.go 97.22% (+0.16%) 36 (+2) 35 (+2) 1 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/redis/go-redis-entraid/credentials_provider_test.go
  • github.com/redis/go-redis-entraid/providers_test.go

@ndyakov ndyakov merged commit 668586e into main May 30, 2025
7 checks passed
@ndyakov ndyakov deleted the ndyakov/add-min-example branch May 30, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants