Skip to content
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

Improve exceptions handling and add can_connect guards #433

Merged
merged 10 commits into from
Jul 26, 2024

Conversation

Abuelodelanada
Copy link
Contributor

Issue

This PR add some missing can_connect() guards in loki_push_api lib, and improves exception handling in Loki charm.

See #390

Testing Instructions

  • Run the test suite (unit, scenario, integration) and verify everything is green.
  • Alternatively you can manually:
    • juju add-model apps
    • juju deploy grafana-agent-k8s agent --channel latest/edge
    • juju deploy sdcore-udr-k8s --channel 1.5/edge
    • Copy the new version of the lib into the sdcore-udr-k8s repo
    • Sync repo with running charm: jhack utils sync sdcore-udr-k8s/0
    • Relate both charms: juju relate sdcore-udr-k8s:logging agent:logging-provider
    • Check there are no errors like these ones in juju debug-log like

src/charm.py Fixed Show fixed Hide fixed
lib/charms/loki_k8s/v1/loki_push_api.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
@Abuelodelanada Abuelodelanada requested review from dstathis and sed-i July 18, 2024 22:45
Copy link
Contributor

@sed-i sed-i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's proceed with the assumption that pebble-ready is certainly coming after can-connect is false.

lib/charms/loki_k8s/v1/loki_push_api.py Outdated Show resolved Hide resolved
@Abuelodelanada Abuelodelanada merged commit 4fdbf25 into main Jul 26, 2024
13 checks passed
@Abuelodelanada Abuelodelanada deleted the pebble_connection_error branch July 26, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants