Skip to content

Fix stale formattedMessage.message when StatusState transitions to Error#371

Merged
srikrishnaveturi merged 1 commit into
Azure:devfrom
srikrishnaveturi:fix-stale-formatted-message-on-error
Jul 8, 2026
Merged

Fix stale formattedMessage.message when StatusState transitions to Error#371
srikrishnaveturi merged 1 commit into
Azure:devfrom
srikrishnaveturi:fix-stale-formatted-message-on-error

Conversation

@srikrishnaveturi

@srikrishnaveturi srikrishnaveturi commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

StatusObj.formattedMessage.message was initialized once as 'Started ProxyAgent Extension Monitoring thread.' and never updated on failure. After 20 consecutive failures the state machine flipped to Error, producing status=Error, code=0, message='Started ProxyAgent Extension Monitoring thread.' -- a misleading startup string visible to CRP/VMSS operators.

Fix: Introduce two atomic helpers set_error / set_success that update status, code, formattedMessage.message, and configurationAppliedTime together. code is set to STATUS_CODE_NOT_OK only when the state machine has reached ERROR_STATUS; it stays STATUS_CODE_OK while Transitioning. Replace all raw update_state() call sites with the helpers.

@srikrishnaveturi srikrishnaveturi force-pushed the fix-stale-formatted-message-on-error branch from 9c4b0b3 to 83934bd Compare July 7, 2026 17:16
@srikrishnaveturi srikrishnaveturi merged commit b858fb2 into Azure:dev Jul 8, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants