Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Activity log created for each upsert operation even when there is no change #5760

Closed
BaptisteGi opened this issue Feb 14, 2025 · 2 comments
Assignees
Labels
type/bug Something isn't working as expected

Comments

@BaptisteGi
Copy link
Contributor

Component

API Server / GraphQL

Infrahub version

1.2.0

Current Behavior

When I run multiple times a script containing some upsert operation it creates empty activity logs

Image

Expected Behavior

If nothing changed in my object I don't think it's useful to have an activity log

Steps to Reproduce

  • Spin infrahub
  • Run multiple times this code
tag = client.create(kind="BuiltinTag", name="test")
tag.save(allow_upsert=True)

Additional Information

No response

@BaptisteGi BaptisteGi added the type/bug Something isn't working as expected label Feb 14, 2025
@ogenstad ogenstad self-assigned this Feb 14, 2025
@ogenstad
Copy link
Contributor

I will look at this once #5734 has been merged as i want to use some features from that one for the fix. I'm pretty sure we'd see the same for an update mutation that didn't actually change anything either so we have to check if the node_changelog contains any changes before sending out an event.

@ogenstad
Copy link
Contributor

Fixed in #5763.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants