Skip to content

fix flaky prometheus metrics by removing await pylib-juju calls - #763

Merged
cbartz merged 1 commit into
mainfrom
fix/flaky-prometheus-metrics-test
Mar 23, 2026
Merged

cbartz merged 1 commit into
mainfrom
fix/flaky-prometheus-metrics-test

Conversation

@cbartz

@cbartz cbartz commented Mar 23, 2026

Copy link
Copy Markdown
Collaborator

Applicable spec: N/A

Overview

Replace python-libjuju await calls in test_prometheus_metrics with synchronous jubilant calls. The fixture now returns the app name (str) instead of the Application object, and the test uses juju.config() + polling helpers instead of instance_helper.ensure_charm_has_runner() / await app.set_config().

Rationale

The test is quite flaky, due to hanging AllWatcher hang after cross-controller integrations.

Juju Events Changes

N/A

Module Changes

N/A

Library Changes

N/A

Checklist

  • The charm style guide was applied.
  • The contributing guide was applied.
  • The changes are compliant with ISD054 - Managing Charm Complexity
  • The documentation for charmhub is updated.
  • The PR is tagged with appropriate label (urgent, trivial, complex).
  • The changelog is updated with changes that affects the users of the charm.
  • The application version number is updated in github-runner-manager/pyproject.toml.

@yanksyoon yanksyoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this!

@cbartz
cbartz enabled auto-merge (squash) March 23, 2026 09:07
@cbartz
cbartz merged commit 3b1b0f3 into main Mar 23, 2026
91 of 95 checks passed
@cbartz
cbartz deleted the fix/flaky-prometheus-metrics-test branch March 23, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants