Skip to content

Track original bundle state in bundle.updated event#874

Open
martastain wants to merge 1 commit into
developfrom
839-events-upon-setting-a-new-active-bundle-variant-add-the-old-active-variant-to-the-event-payload
Open

Track original bundle state in bundle.updated event#874
martastain wants to merge 1 commit into
developfrom
839-events-upon-setting-a-new-active-bundle-variant-add-the-old-active-variant-to-the-event-payload

Conversation

@martastain

Copy link
Copy Markdown
Member

This pull request refactors the event dispatch logic in the update_bundle function to provide more detailed information about bundle state changes. It introduces tracking of previous bundle states and ensures that these are included in the event summary, improving traceability for updates.

Enhancements to event dispatch and bundle state tracking:

  • Added previous state of the bundle (wasProduction, wasStaging, wasArchived) to the event summary
image

@martastain martastain self-assigned this Mar 13, 2026
@martastain martastain added the type: enhancement Improvement of existing functionality or minor addition label Mar 13, 2026
@martastain martastain requested a review from BigRoy March 13, 2026 13:54

@BigRoy BigRoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I personally preferred the newValue and originalValue payload that settings changes e.g. have because it's less duplication of is and was entries.

Also, I'm not sure this event really gives me the input I'd really be looking for quickly. Because what I'd really love to actually know is... that if this bundle is set to production - what was the previous production bundle: None or old-bundle-name.

🤔

However, other than that - this does work fine, however it does provide relatively limited data that I think you're often not too concerned about.

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

Labels

type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Events: Upon setting a new active bundle variant add the old active variant to the event payload

2 participants