Skip to content

Cached host security and bugfix update counts are not refreshed after PackageUpdate security classification changes #857

Description

@sr-rossanderson

Patchman stores cached host counters such as sec_updates_count and bug_updates_count.

These are recalculated when the host's updates many-to-many relation changes.

However, errata processing can later modify PackageUpdate.security using queryset .update().

Changing a field on the related PackageUpdate object does not trigger the host M2M signal, leaving cached host counters stale even though the underlying update records are correctly classified.

Expected behaviour:

After security classification completes, host-level security and bugfix counters should reflect current PackageUpdate.security values.

Suggested fix:

Recalculate affected hosts after security classification, conceptually:

scan_package_updates_for_affected_packages()
mark_errata_security_updates(...)
refresh_host_update_counts()

Impact:

The Patchman UI can display incorrect security-patch counts even though the underlying update data is correct.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions