-
Notifications
You must be signed in to change notification settings - Fork 5
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
[MISC] Bugfixes #252
[MISC] Bugfixes #252
Conversation
8dbe59e
to
a271b6d
Compare
@pytest.mark.group(1) | ||
@pytest.mark.unstable | ||
async def test_relation_with_openldap(ops_test: OpsTest): |
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.
The image for the charm cannot be downloaded.
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.
Which image? I deployed OpenLDAP through juju deploy openldap-charmers-openldap --channel edge
and got it in the Waiting for database relation
state.
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.
I got errors pulling the image for the same charm last week. Will recheck.
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.
Looking deeper, it looks like this is the podspec charm and the pull failure seems to originate from the image pulled by the podspec.
@@ -237,7 +237,7 @@ def _on_relation_joined(self, join_event: RelationJoinedEvent): | |||
return | |||
|
|||
dbs = self.charm.generate_relation_databases() | |||
dbs[join_event.relation.id] = {"name": database, "legacy": True} | |||
dbs[str(join_event.relation.id)] = {"name": database, "legacy": True} |
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.
JSON keys are string
if dbs := self.get_relation_databases(): | ||
return dbs |
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.
Regenerating should be fast enough and if the mapping is wrong for whatever reason, always using the cache will never fix it.
@@ -335,7 +335,6 @@ def _on_relation_departed(self, event: RelationDepartedEvent): | |||
return | |||
|
|||
self.postgres.delete_user(self.auth_user) | |||
self.charm.peers.remove_user(self.auth_user) |
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.
Doesn't exist any more
@pytest.mark.group(1) | ||
@pytest.mark.unstable | ||
async def test_relation_with_openldap(ops_test: OpsTest): |
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.
Which image? I deployed OpenLDAP through juju deploy openldap-charmers-openldap --channel edge
and got it in the Waiting for database relation
state.
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.
Nice stabilisation!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #252 +/- ##
==========================================
+ Coverage 71.90% 72.24% +0.34%
==========================================
Files 8 8
Lines 1075 1081 +6
Branches 182 185 +3
==========================================
+ Hits 773 781 +8
+ Misses 235 230 -5
- Partials 67 70 +3 ☔ View full report in Codecov by Sentry. |
Fixing bugs noticed during switching the VM charm to templates.