Skip to content

TPT-4706: Fix monitor property mutability - #744

Open
zliang-akamai wants to merge 1 commit into
linode:devfrom
zliang-akamai:fix/tpt-4706-monitor-properties
Open

zliang-akamai wants to merge 1 commit into
linode:devfrom
zliang-akamai:fix/tpt-4706-monitor-properties

Conversation

@zliang-akamai

@zliang-akamai zliang-akamai commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

📝 Description

Four monitor model properties pass enum classes to Property as positional arguments. That argument controls mutability rather than value conversion, so these read-only API fields were inadvertently writable. Use the default Property() declaration to keep their API values unchanged and prevent them from being included in update payloads.

✔️ How to Test

python -m pytest test/unit/objects/monitor_test.py -q

@zliang-akamai
zliang-akamai requested review from a team as code owners September 24, 2026 21:19
@zliang-akamai
zliang-akamai requested review from mawilk90 and yec-akamai and a lite review from Copilot and removed request for a team September 24, 2026 21:19
@zliang-akamai zliang-akamai added the bugfix for any bug fixes in the changelog. label Sep 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Add regression coverage confirming the fields cannot be assigned and are excluded from save() payloads.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

Fixes monitor property declarations so four API fields remain read-only and are excluded from update payloads.

Changes:

  • Replaces positional enum arguments with Property().
  • Corrects mutability for dashboard, service, and alert fields.
File Summary
linode_api4/​objects/​monitor.py Corrects mutability declarations for four monitor properties.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread linode_api4/objects/monitor.py

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix for any bug fixes in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants