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

Ensure all jobs complete before disposing parent scope #3987

Merged
merged 5 commits into from
Jul 27, 2024

Conversation

mikaelweave
Copy link
Contributor

@mikaelweave mikaelweave commented Jul 26, 2024

Description

Changes JobHosting to wait for all jobs to complete before starting disposal. We have been getting ObjectDisposedExceptions after the HostingBackgroundService exist. This tells me that the background service is exiting before all jobs are done.

This PR changes the JobHosting error logic to request cancellation before returning, thus delaying the HostingBackgroundService exit until jobs are complete.

Related issues

AB#121830

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)

@mikaelweave mikaelweave requested a review from a team as a code owner July 26, 2024 05:59
Copy link

azure-boards bot commented Jul 26, 2024

✅ Successfully linked to Azure Boards work item(s):

@mikaelweave mikaelweave added the Bug Bug bug bug. label Jul 26, 2024
@mikaelweave mikaelweave added this to the S145 milestone Jul 26, 2024
@mikaelweave mikaelweave added Azure API for FHIR Label denotes that the issue or PR is relevant to the Azure API for FHIR Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs labels Jul 26, 2024
@mikaelweave mikaelweave merged commit 5aeb75f into main Jul 27, 2024
47 checks passed
@mikaelweave mikaelweave deleted the personal/mikaelw/fix-jobs-early-disposal branch July 27, 2024 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure API for FHIR Label denotes that the issue or PR is relevant to the Azure API for FHIR 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants