Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

The GetJsonValue method logs when it cannot parse versionId or lastUpdated properties from resource JSON. The inline comment indicated this occurs during normal operations like resource deletion, yet was logged at Warning level.

Changes

  • Changed LogWarning to LogInformation in two locations within SqlServerFhirDataStore.GetJsonValue
  • Updated inline comment to clarify this is expected behavior during normal operations

Rationale

Warning level should indicate unexpected but recoverable conditions. This parsing failure is expected during resource deletion and other normal operations—the method handles it gracefully by returning an empty string and continuing execution.

if (startIndex == -1)
{
-   // I think this should be a warning because it happens every time a resource is deleted. Maybe even info.
-   _logger.LogWarning($"Cannot parse {propName} value from {(isExisting ? "existing" : "input")}");
+   // This happens during normal operations (e.g., resource deletion) and is not an error condition.
+   _logger.LogInformation($"Cannot parse {propName} value from {(isExisting ? "existing" : "input")}");
    return string.Empty;
}

This reduces noise in Warning logs and properly categorizes expected operational events.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • microsofthealthoss.pkgs.visualstudio.com
    • Triggering command: dotnet build Microsoft.Health.Fhir.sln --configuration Release --no-incremental (dns block)
    • Triggering command: dotnet build src/Microsoft.Health.Fhir.SqlServer/Microsoft.Health.Fhir.SqlServer.csproj --configuration Release (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Address comments in this PR


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Address comments in pull request Change log level from Warning to Information for normal JSON parsing failures Nov 1, 2025
Copilot AI requested a review from feordin November 1, 2025 00:44
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.

2 participants