Merge ~mthaddon/charm-k8s-ingress/+git/charm-k8s-ingress:document-init-requires into charm-k8s-ingress:master

Proposed by Tom Haddon
Status: Merged
Approved by: Jon Seager
Approved revision: eda7700ea14993c9a3c361d19bb4930164e88c27
Merged at revision: 4b507f07402a1ac49c761705b3622c296965ba21
Proposed branch: ~mthaddon/charm-k8s-ingress/+git/charm-k8s-ingress:document-init-requires
Merge into: charm-k8s-ingress:master
Diff against target: 24 lines (+6/-1)
1 file modified
lib/charms/nginx_ingress_integrator/v0/ingress.py (+6/-1)
Reviewer Review Type Date Requested Status
🤖 prod-jenkaas-is (community) continuous-integration Approve
Benjamin Allot Approve
ingress-charmers Pending
Review via email: mp+403034@code.launchpad.net

Commit message

Clarify that the IngressRequires class must be instantiated in __init__

To post a comment you must log in.
Revision history for this message
🤖 prod-jenkaas-is (prod-jenkaas-is) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
Benjamin Allot (ballot) wrote :

+1

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 prod-jenkaas-is (prod-jenkaas-is) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-is (prod-jenkaas-is) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-is (prod-jenkaas-is) wrote :
review: Approve (continuous-integration)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 4b507f07402a1ac49c761705b3622c296965ba21

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/charms/nginx_ingress_integrator/v0/ingress.py b/lib/charms/nginx_ingress_integrator/v0/ingress.py
2index 4d98ee5..780458e 100644
3--- a/lib/charms/nginx_ingress_integrator/v0/ingress.py
4+++ b/lib/charms/nginx_ingress_integrator/v0/ingress.py
5@@ -41,6 +41,11 @@ requires:
6 ingress:
7 interface: ingress
8 ```
9+You _must_ register the IngressRequires class as part of the `__init__` method
10+rather than, for instance, a config-changed event handler. This is because
11+doing so won't get the current relation changed event, because it wasn't
12+registered to handle the event (because it wasn't created in `__init__` when
13+the event was fired).
14 """
15
16 import logging
17@@ -57,7 +62,7 @@ LIBAPI = 0
18
19 # Increment this PATCH version before using `charmcraft publish-lib` or reset
20 # to 0 if you are raising the major API version
21-LIBPATCH = 7
22+LIBPATCH = 8
23
24 logger = logging.getLogger(__name__)
25

Subscribers

People subscribed via source and target branches

to all changes: