-
Notifications
You must be signed in to change notification settings - Fork 370
Fix issues with processes_sync #4809
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
Conversation
| unless FeatureFlag.enabled?(:diego_docker) | ||
| non_docker_app_guids = BuildpackLifecycleDataModel.select(:app_guid). | ||
| union(CNBLifecycleDataModel.select(:app_guid)) | ||
| processes = processes.where(Sequel.qualify(ProcessModel.table_name, :app_guid) => non_docker_app_guids) |
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'm not sure if a this subquery or two left joins like this would be more efficient:
left_join(BuildpackLifecycleDataModel.table_name, app_guid: :app_guid).
left_join(CNBLifecycleDataModel.table_name, app_guid: :app_guid).
)).* Exclude docker apps from sync if diego_docker is disabled * ensure CNB apps are still synced if diego_docker is disabled
589765e to
87cee50
Compare
|
Should we do the same for the feature flag |
I considered that, but figured it would be best to keep this PR limited to restoring the intended behavior. Another reason I didn't implement that is I wasn't sure of the intent behind the behavior and if we should treat CNBs the same--I believe some platform admins don't want to allow Docker apps for security reasons. Is that also true for CNBs? To me, it seemed like it was more likely we would eventually enable CNBs by default, but again I don't have a lot of context there. |
Changes in cloud_controller_ng:
- Fix issues with processes_sync:
PR: cloudfoundry/cloud_controller_ng#4809
Author: Seth Boyles <seth.boyles@broadcom.com>
- Add buildpack upload audit event
PR: cloudfoundry/cloud_controller_ng#4791
Author: Sam Gunaratne <385176+Samze@users.noreply.github.com>
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
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests