Skip to content

Fix DeleteHostGroupAssignmentClonesJob deleting all hostgroups - #139

Open
light-foot wants to merge 1 commit into
OpensourceICTSolutions:mainfrom
light-foot:bugfix/configgroup-hostgroup-delete-all
Open

light-foot wants to merge 1 commit into
OpensourceICTSolutions:mainfrom
light-foot:bugfix/configgroup-hostgroup-delete-all

Conversation

@light-foot

Copy link
Copy Markdown

When a ZabbixHostgroupAssignment assigned to a ConfigurationGroup was deleted, the cleanup job deleted ALL hostgroup assignment clones for every member of that config group instead of only the clones of the one hostgroup that was removed. Matches the bug pattern already correctly handled by DeleteTagAssignmentClonesJob and DeleteTemplateAssignmentClonesJob.

Two missing pieces:

  • signal: .delay() omitted zabbixhostgroup_pk, so the job never knew which specific hostgroup was deleted
  • job: _delete() filter omitted zabbixhostgroup_id=self.zabbixhostgroup_pk, so it matched and wiped all (object, configgroup) hostgroup rows

When a ZabbixHostgroupAssignment assigned to a ConfigurationGroup was
deleted, the cleanup job deleted ALL hostgroup assignment clones for
every member of that config group instead of only the clones of the
one hostgroup that was removed. Matches the bug pattern already
correctly handled by DeleteTagAssignmentClonesJob and
DeleteTemplateAssignmentClonesJob.

Two missing pieces:
- signal: .delay() omitted zabbixhostgroup_pk, so the job never
  knew which specific hostgroup was deleted
- job: _delete() filter omitted zabbixhostgroup_id=self.zabbixhostgroup_pk,
  so it matched and wiped all (object, configgroup) hostgroup rows

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants