-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for duplicate search parameters #3790
base: main
Are you sure you want to change the base?
Conversation
8d40931
to
5ed7eb5
Compare
...ealth.Fhir.Shared.Core/Features/Search/Parameters/SearchParameterConflictingCodeValidator.cs
Fixed
Show fixed
Hide fixed
...ealth.Fhir.Shared.Core/Features/Search/Parameters/SearchParameterConflictingCodeValidator.cs
Fixed
Show fixed
Hide fixed
...ealth.Fhir.Shared.Core/Features/Search/Parameters/SearchParameterConflictingCodeValidator.cs
Fixed
Show fixed
Hide fixed
...ealth.Fhir.Shared.Core/Features/Search/Parameters/SearchParameterConflictingCodeValidator.cs
Fixed
Show fixed
Hide fixed
catch (Exception exp) | ||
{ | ||
_output.WriteLine($"Attempt {retryCount} of {MaxRetryCount}: CustomSearchParameter test experienced issue attempted to clean up SearchParameter {searchParam.Url}. The exception is {exp}"); | ||
if (exp is FhirClientException fhirException && fhirException.OperationOutcome?.Issue != null) | ||
{ | ||
foreach (OperationOutcome.IssueComponent issueComponent in fhirException.OperationOutcome.Issue) | ||
{ | ||
_output.WriteLine("FhirException OperationOutome message from trying to delete SearchParameter is CustomSearchParam test: {0}", issueComponent.Diagnostics); | ||
} | ||
} | ||
|
||
success = false; | ||
await Task.Delay(TimeSpan.FromSeconds(10)); | ||
} |
Check notice
Code scanning / CodeQL
Generic catch clause Note test
...ealth.Fhir.Shared.Core/Features/Search/Parameters/SearchParameterConflictingCodeValidator.cs
Fixed
Show fixed
Hide fixed
...ealth.Fhir.Shared.Core/Features/Search/Parameters/SearchParameterConflictingCodeValidator.cs
Fixed
Show fixed
Hide fixed
...ealth.Fhir.Shared.Core/Features/Search/Parameters/SearchParameterConflictingCodeValidator.cs
Dismissed
Show dismissed
Hide dismissed
...ealth.Fhir.Shared.Core/Features/Search/Parameters/SearchParameterConflictingCodeValidator.cs
Dismissed
Show dismissed
Hide dismissed
// for the search parameter/reindex updates to propagate to all instances. Hence we are | ||
// adding some retries below to account for that delay. | ||
int retryCount = 0; | ||
bool success = true; |
Check warning
Code scanning / CodeQL
Useless assignment to local variable Warning test
success
} | ||
if (!supportedResult.Supported) | ||
{ | ||
throw new SearchParameterNotSupportedException(searchParameterInfo.Url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Customer sees this message "The search parameter with definition URL '{0}' is not supported.". I know this change is not related to this PR but in this scenario, error is thrown if definition has any issues. Do you think we can use better error message to indicate customer that something is wrong with the definition they have sent?
await _searchParameterStatusManager.AddSearchParameterStatusAsync( | ||
new List<string> { searchParameterWrapper.Url }, | ||
cancellationToken, | ||
duplicateSearchParameter ? SearchParameterStatus.Duplicate : SearchParameterStatus.Supported); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are introducing a new status Duplicate here. How is it going to impact reindex and $status operation?
Description
There are published IG's with Search Parameters that have identical code values and expression as existing Search Parameters. We want to allow these parameters without causing any reindexing or ambiguous behaviors when searching using the duplicated code values.
This PR also blocks the addition of any Search Parameter resource with a conflicting code value that has a different expression. As this is a bug that currently puts the service into an unstable state.
Related issues
Addresses [issue AB#117004].
Testing
Unit tests are added.
Manual testing using UploadFIG with USCore is done, and all SearchParameters succeeded.
Still TBD: E2E test to check reindex impact.
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)