Skip to content

bug: Extra node.updated events fired for artifacts/member_of_groups #9408

@lancamat1

Description

@lancamat1

Component

API Server / GraphQL

Infrahub version

1.9.6

Current Behavior

When a node that inherits CoreArtifactTarget and is the target of an artifact definition is created on the default branch (e.g. via branch → proposed change → merge), Infrahub emits — for the same node, on the default branch — one infrahub.node.created event followed by additional infrahub.node.updated events whose only changed fields are system-managed relationships:

  • fields: ["artifacts"] — the generated CoreArtifact being linked back to the node
  • fields: ["member_of_groups"] — the node being auto-added to the artifact query's CoreGraphQLQueryGroup

These fire any node.updated webhook subscribed to that node_kind on the default branch, even though no user-facing attribute or relationship changed. Reproduced deterministically: 1 created + 2 updated per node.

Expected Behavior

Creating a node should not surface internal/system relationship bookkeeping (artifacts, member_of_groups) as user-facing node.updated events — or they should be distinguishable so consumers don't treat them as data changes.

Steps to Reproduce

  1. Define a node kind inheriting CoreArtifactTarget, with an artifact definition targeting it.
  2. Subscribe a CoreCustomWebhook to infrahub.node.updated for that node_kind, branch_scope: default_branch.
  3. Create an instance on a branch, open a proposed change to the default branch, and merge it.
  4. Observe on the default branch: one node.created, then node.updated with fields: ["artifacts"] and node.updated with fields: ["member_of_groups"] for the same node.

Additional Information

  • Infrahub 1.9.6, docker compose deployment.
  • Payloads carry data.action and data.fields, so the system-only updates are identifiable.
  • Webhook config matches only node_kind/event_type/branch_scope, and a Python transformation only reshapes the payload (the send always happens) — no current way to suppress these at the Infrahub layer.
  • Companion feature request for webhook-side field filtering: feature: Filter node.updated webhooks by changed field/relationship #9409.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working as expected

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions