fn record_failed_deploy(&mut self) -> (bool, u8) {
        let (release, attempts) = match self.clone() {
            UpdateAgentMachineState::UpdateAvailable((r, a)) => (r, a),
            _ => unreachable!("transition not allowed: record_failed_deploy on {:?}", self,),
        };
        let fail_count = attempts.saturating_add(1);
        let persistent_err = fail_count >= MAX_DEPLOY_ATTEMPTS;

        if persistent_err {
            self.update_abandoned();
        } else {
            self.deploy_failed(release, fail_count);
        }

        (persistent_err, fail_count)
    }
/// Record a failed deploy attempt in UpdateAvailable state.
///
/// This returns a tuple containing a bool representing whether the target
/// update was abandoned and the total number of failed deployment attempts
/// (including the newly recorded failed attempt).
Record a failed deploy attempt in UpdateAvailable state.
This returns a tuple containing a bool representing whether the target
update was abandoned and the total number of failed deployment attempts
(including the newly recorded failed attempt).
Record a failed deploy attempt in UpdateAvailable state . This returns a tuple containing a bool representing whether the target update was abandoned and the total number of failed deployment attempts ( including the newly recorded failed attempt ) .
fn record_failed_deploy(&mut self) -> (bool, u8) {
        let (release, attempts) = match self.clone() {
            UpdateAgentMachineState::UpdateAvailable((r, a)) => (r, a),
            _ => unreachable!("transition not allowed: record_failed_deploy on {:?}", self,),
        };
        let fail_count = attempts.saturating_add(1);
        let persistent_err = fail_count >= MAX_DEPLOY_ATTEMPTS;
        if persistent_err {
            self.update_abandoned();
        } else {
            self.deploy_failed(release, fail_count);
        }
        (persistent_err, fail_count)
    }
fn record_failed_deploy ( & mut self ) -> ( bool , u8 ) { let ( release , attempts ) = match self . clone ( ) { UpdateAgentMachineState :: UpdateAvailable ( ( r , a ) ) => ( r , a ) , _ => unreachable ! ( " " self ) , } ; let fail_count = attempts . saturating_add ( 1 ) ; let persistent_err = fail_count >= MAX_DEPLOY_ATTEMPTS ; if persistent_err { self . update_abandoned ( ) ; } else { self . deploy_failed ( release , fail_count ) ; } ( persistent_err , fail_count ) }
Record a failed deploy attempt in UpdateAvailable state.
Record a failed deploy attempt in UpdateAvailable state .
&mut self