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
[IPU] Make sure revoked
is emitted
#80
Conversation
Libraries are not up to date with their remote counterparts. If this was stdout
stderr
|
@PietroPasotti I am having trouble with the utest but I'm not sure if it's because of a test bug, lib bug or harness behavior: The relation is removed with harness, but "removed" is always blank:
and |
Libraries are not up to date with their remote counterparts. If this was stdout
stderr
|
|
@@ -682,7 +682,7 @@ def _handle_relation(self, event: RelationEvent): | |||
# we calculate the diff between the urls we were aware of | |||
# before and those we know now | |||
previous_urls = self._stored.current_urls or {} # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rbarry82 would you use _type_convert_stored
here?
Libraries are not up to date with their remote counterparts. If this was stdout
stderr
|
64bfc64
to
7dbd2aa
Compare
Libraries are not up to date with their remote counterparts. If this was stdout
stderr
|
7dbd2aa
to
2638c16
Compare
Libraries are not up to date with their remote counterparts. If this was stdout
stderr
|
Libraries are not up to date with their remote counterparts. If this was stdout
stderr
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
- Update _stored before events are emitted - Get urls from stored instead of relation data
Libraries are not up to date with their remote counterparts. If this was stdout
stderr
|
1 similar comment
Libraries are not up to date with their remote counterparts. If this was stdout
stderr
|
5b39af0
to
da4d7c8
Compare
Libraries are not up to date with their remote counterparts. If this was stdout
stderr
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested manually
@sed-i it seems I didn't pay enough attention while reviewing, or actually, that some changes slipped in that I didn't have a chance to review as they came in after I approved: ce32bd3 either way, there's a problem with these changes:
|
Agreed. I noticed that later too. In the IPA PR it is not a property.
Hmm. The change itself still seems correct to me logically. Can you post the link to the failing test? I'm curious. |
It wasn't a CI failure, it was local, so no links, but essentially what happened was: class MyCharm(CharmBase):
def __init__...
self.unit.status=Blocked()
ingress = IPURequirer()
if ingress.is_ready(ingress.relation):
self.unit.status=Active() This test was passing before this PR got merged. However, events are processed AFTER the charm is initialized, so at charm-init-time, that branch wouldn't be selected. Took me a long time to figure that one out :) |
Interesting. I wonder why at charm init time the old |
Issue
Closes #79 .
Solution
Context
self.ingress.url
was returning old (non-falsey) value even after relation and/or app was removed.