Skip to content

fix: aproxy requirement#738

Merged
cbartz merged 5 commits intomainfrom
fix/aproxy-requirement
Feb 26, 2026
Merged

fix: aproxy requirement#738
cbartz merged 5 commits intomainfrom
fix/aproxy-requirement

Conversation

@cbartz
Copy link
Copy Markdown
Collaborator

@cbartz cbartz commented Feb 24, 2026

Applicable spec:

Overview

Fix the usage of aproxy even if no proxy configuration is set at all.

Also fix a bug with wait_for helper which doesn't work for lambdas (just returns true all the time), basically making some of our integration test useless.

Rationale

For local testing, it can be useful to not use a proxy at all. This is where I encountered the issue.

wait_for bugfix is mixed into this PR, due to long-running/flaky CI which makes splitting functionality in multiple PR's quite inefficient

Juju Events Changes

n/a

Module Changes

n/a

Library Changes

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.

aproxy_address was unconditionally accessing runner_proxy_config.proxy_address,
which fails when runner_proxy_config is None (aproxy not configured).
…elper

- Set use_aproxy based on whether openstack_proxy is configured
- Refactor wait_for to use a single async helper instead of duplicated branches
# Conflicts:
#	github-runner-manager/pyproject.toml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes two bugs: (1) improper usage of aproxy when no proxy configuration is set, and (2) a bug in the wait_for helper function that prevented it from working correctly with lambda functions that return awaitables. The version is bumped from 0.12.0 to 0.12.1 to reflect these bug fixes.

Changes:

  • Fixed wait_for helper to check if the result is awaitable rather than checking if the function is a coroutine function, enabling proper support for lambdas
  • Modified test factory to set use_aproxy based on whether openstack_proxy is not None
  • Added defensive None check for runner_proxy_config before accessing proxy_address in cloud init generation

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/integration/helpers/common.py Fixed wait_for helper to properly handle lambdas by checking if the result is awaitable instead of checking if the function is a coroutine function
github-runner-manager/tests/integration/factories.py Set use_aproxy conditionally based on whether openstack_proxy is not None to prevent using aproxy without proxy configuration
github-runner-manager/src/github_runner_manager/openstack_cloud/openstack_runner_manager.py Added None check for runner_proxy_config before accessing proxy_address to prevent AttributeError
github-runner-manager/pyproject.toml Bumped version from 0.12.0 to 0.12.1 for patch release

@cbartz cbartz enabled auto-merge (squash) February 25, 2026 14:46
@cbartz cbartz merged commit 7feb1b2 into main Feb 26, 2026
196 of 225 checks passed
@cbartz cbartz deleted the fix/aproxy-requirement branch February 26, 2026 09:18
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.

4 participants