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

[DPE-4224] Remove relation_{joined,changed}.emit() calls #266

Merged
merged 9 commits into from
May 1, 2024

Conversation

phvalguima
Copy link
Contributor

@phvalguima phvalguima commented Apr 26, 2024

We should replace calls to relation_{joined,changed}.emit() by their end-method's handler. Otherwise we will face situations like #265, where a deferred event constantly gets called up, generates new events which also get deferred and end in a snow ball of deferrals.

Closes #265

@phvalguima phvalguima force-pushed the DPE-4224-remove-relation-emits branch from 5bceb15 to 45339f1 Compare April 30, 2024 08:38
Copy link
Contributor

@Mehdi-Bendriss Mehdi-Bendriss left a comment

Choose a reason for hiding this comment

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

Thanks Pedro - I have one question

lib/charms/opensearch/v0/opensearch_base_charm.py Outdated Show resolved Hide resolved
lib/charms/opensearch/v0/opensearch_base_charm.py Outdated Show resolved Hide resolved
lib/charms/opensearch/v0/opensearch_base_charm.py Outdated Show resolved Hide resolved
Mehdi-Bendriss
Mehdi-Bendriss previously approved these changes Apr 30, 2024
Mehdi-Bendriss
Mehdi-Bendriss previously approved these changes Apr 30, 2024
lib/charms/opensearch/v0/opensearch_base_charm.py Outdated Show resolved Hide resolved
lib/charms/opensearch/v0/opensearch_base_charm.py Outdated Show resolved Hide resolved
lib/charms/opensearch/v0/opensearch_base_charm.py Outdated Show resolved Hide resolved
Co-authored-by: Carl Csaposs <carl.csaposs@canonical.com>
phvalguima and others added 2 commits May 1, 2024 16:52
Co-authored-by: Carl Csaposs <carl.csaposs@canonical.com>
Co-authored-by: Carl Csaposs <carl.csaposs@canonical.com>
Mehdi-Bendriss
Mehdi-Bendriss previously approved these changes May 1, 2024
@phvalguima phvalguima merged commit 5f2d6cd into main May 1, 2024
9 of 10 checks passed
@phvalguima phvalguima deleted the DPE-4224-remove-relation-emits branch May 1, 2024 14:59
carlcsaposs-canonical added a commit that referenced this pull request May 2, 2024
carlcsaposs-canonical added a commit that referenced this pull request May 2, 2024
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.

Clean-up relation_changed.emit() calls
3 participants