Skip to content

Conversation

@t-vvidyasaga
Copy link
Contributor

Overview
Adds Snapshot References to the .NET configuration provider for dynamic updates via the cloud portal, with automatic resolution and no code changes.

Key Changes
AzureAppConfigurationProvider.cs

  • Detects snapshot references via custom content type.
  • Implements ParseSnapshotReference() for JSON parsing.
  • Adds Resolve() for snapshot resolution.
  • Updates LoadSelected() to auto-resolve references.
  • Triggers refreshAll for snapshot references.

SnapshotReference.cs (New)
Model for snapshot reference: name, client, cancellation token.
SnapshotReferenceConstants.cs (New)
Shared constants for content type and JSON fields.

Test Coverage
Includes unit and integration tests for resolution, refresh behavior, and edge cases.

Key Callouts
Resolution: Auto-detected by content type; lexicographic “last wins” for duplicates.
Exceptions:

  • Invalid JSON → FormatException
  • Invalid composition → InvalidOperationException

Refresh: Always triggers refreshAll, regardless of settings.
JSON Handling: Ignores extra fields, validates snapshot_name, handles empty values.
Edge Cases: Non-existent references and empty names return empty config without exceptions.

This was referenced Oct 1, 2025
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.

5 participants