You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try:
self.write_file(CONFIG_PATH, yaml.dump(config))
# FIXME: change this to self._reload_config when #19 is fixed
# Restart the service to pick up the new config
self.restart()
except GrafanaAgentReloadError as e:
logger.error(str(e))
self.status.update_config = BlockedStatus(str(e))
except APIError as e:
logger.warning(str(e))
self.status.update_config = WaitingStatus(str(e))
Firstly, the code in question can not raise GrafanaAgentReloadError but instead would raise GrafanaAgentServiceError. So this should be switched until canonical/grafana-agent-k8s-operator#19 is fixed (but in this repo).
Secondly, if we get the above mentioned exception, there is no known user intervention that could fix it, so it should be an error and not a BlockedStatus.
Thirdly, APIError can never be raised by this code. It is left over from the k8s charm.
To Reproduce
Environment
Relevant log output
-
Additional context
No response
The text was updated successfully, but these errors were encountered:
Bug Description
The following code has issues.
Firstly, the code in question can not raise
GrafanaAgentReloadError
but instead would raiseGrafanaAgentServiceError
. So this should be switched until canonical/grafana-agent-k8s-operator#19 is fixed (but in this repo).Secondly, if we get the above mentioned exception, there is no known user intervention that could fix it, so it should be an error and not a
BlockedStatus
.Thirdly, APIError can never be raised by this code. It is left over from the k8s charm.
To Reproduce
Environment
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: