gcp: set cpu_idle=false on fleet-api Cloud Run service#243
Open
robbiet480 wants to merge 1 commit into
Open
Conversation
Without this, Cloud Run defaults to throttling CPU between requests, which context-cancels Fleet's background cron goroutines mid-tick. In particular, apple_mdm_dep_profile_assigner can advance the nanodep sync cursor without committing the corresponding device upserts, silently dropping DEP device events that Apple will not re-emit. Fixes fleetdm#242 Related: fleetdm/fleet#46235 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
@robbiet480 Thank you for your contribution! We'll schedule the review of your proposed changes for next sprint. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
gcp/byo-project/cloud_run.tfwas running with the Cloud Run default ofcpu_idle = true(CPU only allocated during request processing).apple_mdm_dep_profile_assignercan advance the nanodep sync cursor innano_dep_names.syncer_cursorwithout committing the corresponding device upserts tohost_dep_assignments, silently dropping DEP device events that Apple's DEP API will not re-emit. Only a manual cursor reset recovers.cpu_idle = falseon the container'sresourcesblock so the warm instance (already enforced bymin_instance_count = 1) keeps CPU allocated for cron goroutines.Test plan
terraform planshows the change as an in-place update on the existing Cloud Run service (no replacement).gcloud run services describe fleet-api --region <region> --format='yaml(spec.template.metadata.annotations)'showsrun.googleapis.com/cpu-throttling: 'false'.apple_mdm_dep_profile_assignercompleteds cleanly each tick with nocontext canceled/unlock failed/update cron stats: context canceledentries.pending job might still be running, wait 1m0sstalls.Related
apple_mdm_dep_profile_assignercron silently drops device events when context-cancelled mid-run fleet#46235🤖 Generated with Claude Code