-
Notifications
You must be signed in to change notification settings - Fork 20
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
chore: image bulider match style #329
base: main
Are you sure you want to change the base?
Conversation
logger.exception("Missing integration") | ||
self.unit.status = BlockedStatus(str(err)) | ||
except IntegrationDataNotReadyError as err: | ||
logger.exception("Missing integration data") |
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.
This is the same msg as in line 143. Is this intentional? Otherwise, why don't you catch both exceptions together?
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 think @gregory-schiano did not like the abstract name (I also originally had MissingIntegrationDataError
but then changed it to MissingMongoDBError
). I am fine with using the abstract name and merging this with lines 142-144, but perhaps confirm with @gregory-schiano .
Test coverage for 71155ca
Static code analysis report
|
Applicable spec: N/A
Overview
From previous discussion, a charm state should raise an error if not valid and be caught, rather than returning validation result. This PR follows the pattern discussed.
Rationale
To have consistent code styles.
Juju Events Changes
None.
Module Changes
_get_set_image_ready_status
which sets charm states if image relation is not ready/ not provided.Library Changes
None.
Checklist
src-docs
urgent
,trivial
,complex
)