-
Notifications
You must be signed in to change notification settings - Fork 543
Bulk-update #5022
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
base: main
Are you sure you want to change the base?
Bulk-update #5022
Conversation
…update # Conflicts: # src/Microsoft.Health.Fhir.Core/Features/Operations/JobRecordProperties.cs
src/Microsoft.Health.Fhir.CosmosDb/Features/Storage/Queues/CosmosQueueClient.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Shared.Api/Controllers/BulkUpdateController.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Core/Data/OperationDefinition/bulk-update.json
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Core/Features/Operations/BulkUpdate/BulkUpdateOrchestratorJob.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Core/Features/Operations/BulkUpdate/BulkUpdateOrchestratorJob.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Core/Features/Operations/BulkUpdate/BulkUpdateOrchestratorJob.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Core/Features/Operations/BulkUpdate/BulkUpdateOrchestratorJob.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Core/Features/Operations/BulkUpdate/BulkUpdateProcessingJob.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Core/Features/Operations/BulkUpdate/BulkUpdateProcessingJob.cs
Show resolved
Hide resolved
|
||
namespace Microsoft.Health.Fhir.Core.Features.Operations | ||
{ | ||
public class CustomFhirJsonSerializer<T> : ICustomFhirJsonSerializer<T> |
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.
Why is this class needed instead of using the existing resource serializer and deserializer?
src/Microsoft.Health.Fhir.SqlServer/Features/Storage/SqlQueueClient.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.SqlServer/Features/Storage/SqlQueueClient.cs
Outdated
Show resolved
Hide resolved
…update # Conflicts: # src/Microsoft.Health.Fhir.Core/Resources.resx # src/Microsoft.Health.Fhir.Shared.Web/appsettings.json
src/Microsoft.Health.Fhir.Core/Features/Operations/BulkUpdate/Handlers/GetBulkUpdateHandler.cs
Show resolved
Hide resolved
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.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Target = ResourceElement | ||
.Select(Operation.Path) | ||
.RequireOneOrMoreElements() | ||
.RequireMultipleElementsInSameCollection() |
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.
What does this line do that means we have to get the target a second time?
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.
I checked in new code. But this line will only allow multiple elements if they are a collection and are from the same collection
...icrosoft.Health.Fhir.Core/Features/Operations/BulkUpdate/Handlers/CancelBulkUpdateHandler.cs
Outdated
Show resolved
Hide resolved
...ft.Health.Fhir.Core.UnitTests/Features/Operations/BulkUpdate/CancelBulkUpdateHandlerTests.cs
Show resolved
Hide resolved
...osoft.Health.Fhir.Core.UnitTests/Features/Operations/BulkUpdate/GetBulkUpdateHandlerTests.cs
Show resolved
Hide resolved
} | ||
}); | ||
} | ||
else if (definition.IsParallel) |
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.
This case isn't rerun safe. If the orchestrator job crashes in the middle of executing it may create multiple identical processing jobs.
src/Microsoft.Health.Fhir.Core/Features/Operations/BulkUpdate/BulkUpdateProcessingJob.cs
Show resolved
Hide resolved
test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/BulkUpdateTests.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/BulkUpdateTests.cs
Outdated
Show resolved
Hide resolved
…update # Conflicts: # src/Microsoft.Health.Fhir.Core/Features/Operations/JobRecordProperties.cs
Description
Adds the $bulk-update operation. PATCH$bulk-update
This operation can be called at the system level or the resource type level.
As with our other async jobs it returned a Content-Location header showing the endpoint where the job record can be retrieved from. This endpoint can be used to get the current status of the job (GET) or to cancel it (DELETE).
This job is limited by the integer max value due to reporting the ids of deleted resources. This means that jobs should be limited to impact no more than ~2 billion resources, probably less than 500 million to be safe.
Added to capabilities statement.
Added notification on job competition.
Added unit tests.
Rest examples added
Supports the following parameters:
_isParallel: Flag for whether to run subjobs parallely. Default true.
: Any parameters used for a normal search operation can be added.
Related issues
Addresses AB146980.
Testing
Describe how this change was tested.
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)