Skip to content
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

Add IsDeleted check in search queries #3925

Merged
merged 2 commits into from
Jun 17, 2024
Merged

Conversation

feordin
Copy link
Contributor

@feordin feordin commented Jun 14, 2024

Description

We do not have a check for resources being in the deleted state on search queries. This can result in deleted resources being returned in result sets under some conditions.

Related issues

Addresses [issue #3920]. DevOps [issue AB#121553]

Testing

New E2E test added.

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 65 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
  • Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
  • Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
  • CI is green before merge Build Status
  • Review squash-merge requirements

Semver Change (docs)

Patch|Skip|Feature|Breaking (reason)

@feordin feordin added Bug Bug bug bug. Area-Search Area related to search. Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Schema Version unchanged labels Jun 14, 2024
@feordin feordin added this to the S142 milestone Jun 14, 2024
@feordin feordin requested a review from a team as a code owner June 14, 2024 21:47
@@ -73,6 +73,19 @@ async Task<FhirClientException> ExecuteAndValidateGoneStatus(Func<Task> action)
}
}

[Fact]
public async Task GivenADeletedResource_WhenSearchWithNotModifier_ThenDeletedResourcesShouldNotBeReturned()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a way to write this test using tags? I don't like relying on us never using the Flag resource type in the future, it looks like it could cause hard to debug failures down the road.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did think about that, but I can't use the tag value later to search, because the resources will be deleted, and the tags should also be deleted at that point.

@feordin feordin merged commit 3324d72 into main Jun 17, 2024
47 checks passed
@feordin feordin deleted the personal/jaerwin/is-deleted-fix branch June 17, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Search Area related to search. Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Bug Bug bug bug. Schema Version unchanged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants