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

fix(core): emit namespaceStatus events during provider init #6759

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

thsig
Copy link
Collaborator

@thsig thsig commented Jan 13, 2025

This was fixed by setting up the event forwarding during the initialization of the plugin event bus.

What this PR does / why we need it:

Before this fix, namespaceStatus events weren't actually being emitted during provider resolution, since the event bus on the plugin context hadn't been set up to pipe namespaceStatus events to the main event bus (this happened later in the flow).

This is the probable cause for some users experiencing dangling namespaces that weren't being cleared up by Cloud's automatic environment cleanup when module/action resolution failed (since the namespace status events that would usually be emitted by the "get status" and "deploy" handlers for those actions weren't being emitted). This still needs to be verified, but most likely fixes the issue.

Before this fix, `namespaceStatus` events weren't actually being emitted
during provider resolution, since the event bus on the plugin context
hadn't been set up to pipe `namespaceStatus` events to the main event
bus (this happened later in the flow).

This is the probable cause for some users experiencing dangling
namespaces that weren't being cleared up by Cloud's automatic
environment cleanup when module/action resolution failed
(since the namespace status events that would usually be emitted by the
"get status" and "deploy" handlers for those actions weren't being
emitted). This still needs to be verified, but most likely fixes the
issue.

This was fixed by setting up the event forwarding during the
initialization of the plugin event bus.
@thsig thsig requested a review from 10ko January 13, 2025 11:53
Copy link
Member

@10ko 10ko left a comment

Choose a reason for hiding this comment

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

I've tested both main and this branch and the latter fixes the issue we had.
Good job, LGTM!

@10ko 10ko added this pull request to the merge queue Jan 13, 2025
Merged via the queue into main with commit c704a35 Jan 13, 2025
42 checks passed
@10ko 10ko deleted the emit-ns-events-in-provider-init branch January 13, 2025 14:36
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