You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Per HL7 R4 documentation, ResourceVersionId values, when included in headers, are considered "weak ETags" (source).
In the reference FhirController implementation, the header value is simply extracted as-is (without stripping off W/" and trailing "). Reference Spark.Web source.
NOTE: This is not a bug in the Spark package itself; rather it's a problem in the reference Spark.Web implementation.
This results in errors when performing version-aware updates. Spark rejects the request because the version from the request contains the weak ETag formatting.
To Reproduce
Steps to reproduce the behavior:
Create a new FHIR resource of any desired type in your Spark FHIR server.
Retrieve its current version.
Modify it.
Use Hl7.Fhir.R4 NuGet package and its FhirClient.UpdateAsyncwith versionAware parameter set to true to HTTP PUT the updated version (requires the server to use the Spark.Web code linked above).
Receive a FHIR exception.
Expected behavior
Expectation is that the update will be accepted if the submitted resource version matches current on the server.
Spark version
Version: 2.1.0
Operating system + Database
OS: Linux and Windows tested
Database: MongoDB
Container service / Cloud infrastructure:
Container service: Docker and AWS ECS tested
Cloud provider: Local and AWS tested
Cloud infrastructure: Containers
Database as a service: local MongoDB and AWS DocumentDB with Mongo API tested
Additional context
I have successfully verified that Spark handles the version correctly if the header parsing is corrected. E.g., via use of a """^W/"(\d+)"$"""Regex to extract the id from the weak ETag.
The text was updated successfully, but these errors were encountered:
@kennethmyhra : Unfortunately, no, I don't have a PR-able fix.
However, after additional testing, I discovered that there is a problem with version-aware updates within FHIR transaction requests. (I submitted that separately, under #714 .) I mention that because there may be some aspect of that issue's resolution which might impact how this issue is resolved. I.e., my workaround of stripping the prefix and suffix from the header's value before submission to IFhirService.UpdateAsync(IKey,Resource) might conflict with whatever resolution is identified for #714 .
Describe the bug
Per HL7 R4 documentation,
Resource
VersionId
values, when included in headers, are considered "weak ETags" (source).In the reference
FhirController
implementation, the header value is simply extracted as-is (without stripping offW/"
and trailing"
). ReferenceSpark.Web
source.NOTE: This is not a bug in the Spark package itself; rather it's a problem in the reference
Spark.Web
implementation.This results in errors when performing version-aware updates. Spark rejects the request because the version from the request contains the weak ETag formatting.
To Reproduce
Steps to reproduce the behavior:
Hl7.Fhir.R4
NuGet package and itsFhirClient.UpdateAsync
withversionAware
parameter set totrue
toHTTP PUT
the updated version (requires the server to use theSpark.Web
code linked above).Expected behavior
Expectation is that the update will be accepted if the submitted resource version matches current on the server.
Spark version
2.1.0
Operating system + Database
Container service / Cloud infrastructure:
Additional context
I have successfully verified that Spark handles the version correctly if the header parsing is corrected. E.g., via use of a
"""^W/"(\d+)"$"""
Regex
to extract the id from the weak ETag.The text was updated successfully, but these errors were encountered: