Skip to content

TPT-3529: Handle non-existing rules for firewall updates#782

Open
ezilber-akamai wants to merge 2 commits intolinode:devfrom
ezilber-akamai:TPT-3529-fix-fw-rule-update
Open

TPT-3529: Handle non-existing rules for firewall updates#782
ezilber-akamai wants to merge 2 commits intolinode:devfrom
ezilber-akamai:TPT-3529-fix-fw-rule-update

Conversation

@ezilber-akamai
Copy link
Copy Markdown
Contributor

📝 Description

Fixed firewall update behavior to append non-existing rules.

✔️ How to Test

make test-int TEST_SUITE="firewall_update"

@ezilber-akamai ezilber-akamai requested review from a team as code owners April 17, 2026 15:34
@ezilber-akamai ezilber-akamai added the bugfix for any bug fixes in the changelog. label Apr 17, 2026
@ezilber-akamai ezilber-akamai requested review from ckulinsk, Copilot and jriddle-linode and removed request for a team April 17, 2026 15:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes linode.cloud.firewall update behavior so that user-supplied firewall rules with new labels are appended (rather than being ignored due to diffing against a mutated “remote” ruleset).

Changes:

  • Update firewall rule reconciliation to amend existing remote rules and append any local rules that don’t exist remotely.
  • Extend the firewall_update integration suite with a scenario that appends a new inbound rule via state: update.
  • Minor whitespace cleanup in the integration playbook.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
plugins/modules/firewall.py Refactors _update_rules to avoid mutating remote rules during diffing and to append missing labeled rules during updates.
tests/integration/targets/firewall_update/tasks/main.yaml Cleans up whitespace and adds an integration case asserting that a new inbound rule can be appended on update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/integration/targets/firewall_update/tasks/main.yaml
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