Fix issues with processes_sync #4809
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes two issues with the process syncer:
Docker App LRPs are not deleted from Diego when diego_docker is disabled
This was a feature that was broken in this PR: #3503
Originally, disabling
diego_dockerwas meant to stop all docker apps from being included in the process sync query, resulting them in being removed by the syncer.This feature is documented here: https://docs.cloudfoundry.org/adminguide/docker.html#feature-flag
During #3503's performance improvement, this clause was moved out of the main query into the new subquery that happens when fetching processes for updates/desires. This meant the docker processes were never added to the array of LRPs
to_delete, although they still were not considered for update/desire syncs.ensure CNB apps are still synced if diego_docker is disabled
If
diego_dockerwas disabled, then the query selected 'non_docker_type' processes. This queried for Buildpack processes, but excluded CNB processes.I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranch[] I have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests