Skip to content

fix: Remove -v in socat as in can incur in performance issues - #641

Merged
cbartz merged 10 commits into
mainfrom
fix/remove-verbose-socat
Dec 3, 2025
Merged

cbartz merged 10 commits into
mainfrom
fix/remove-verbose-socat

Conversation

@javierdelapuente

@javierdelapuente javierdelapuente commented Oct 1, 2025 •

Copy link
Copy Markdown
Collaborator

Applicable spec:

Overview

-v in socat writes transferred data to stderr, and it has been reported that it can generate network performance issues.

Rationale

Juju Events Changes

Module Changes

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.

@cbartz
cbartz enabled auto-merge (squash) October 8, 2025 08:45
@yanksyoon

Copy link
Copy Markdown
Member

The workflow is failing due to jubilant model name not valid error: https://github.com/canonical/github-runner-operator/actions/runs/19851008044/job/56893532143?pr=641#step:25:195

@yanksyoon

Copy link
Copy Markdown
Member

A passing test:

06:26:34 INFO cli: juju deploy --model microk8s:jubilant-a59c1096 prometheus-k8s --channel 1/stable

A failing test:

jubilant._juju.CLIError: Command '['juju', 'deploy', '--model', 'microk8s:microk8s:jubilant-e6d0fb47', 'prometheus-k8s', '--channel', '1/stable']' returned non-zero exit status 2.

Looks like microk8s controller name is prepended twice - not quite sure why since there weren't any changes to this test.

@cbartz
cbartz merged commit 651401f into main Dec 3, 2025
67 of 78 checks passed
@cbartz
cbartz deleted the fix/remove-verbose-socat branch December 3, 2025 08:14
cbartz added a commit that referenced this pull request Dec 5, 2025
Co-authored-by: Christopher Bartz <christopher.bartz@canonical.com>
cbartz added a commit that referenced this pull request Dec 13, 2025
* Initial plan

* Update Crashed runner alert to reduce false positives

- Change sum_over_time window from [1h] to [10m]
- Increase threshold from > 0 to > 2
- Increase for duration from 0s to 15m

This ensures we only alert if there are at least 3 crashes in a 10-minute window, and this state persists for 15 minutes.

Co-authored-by: cbartz <4182921+cbartz@users.noreply.github.com>

* ci: apply dockerhub mirror e2e (#661)

* ci: microk8s use dockerhub mirror

* ci: conditionally apply mirror if set

* ci: use dockerhub mirror for microk8s in setup (#662)

* ci: use dockerhub mirror for microk8s in setup

* restart microk8s

* chore(deps): update all non-major dependencies (#627)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: Add missing timeouts to GitHub, OpenStack, and repo policy compliance API calls (#659)

* Initial plan

* Add timeouts to GitHub, OpenStack, and repo policy compliance API calls

- Added timeout parameter to missing GitHub API calls (list_self_hosted_runners_for_repo, list_self_hosted_runners_for_org)
- Replaced hardcoded timeout value (60) with TIMEOUT_IN_SECS constant in list_jobs_for_workflow_run
- Added OPENSTACK_API_TIMEOUT constant (5 minutes) to openstack_cloud/constants.py
- Added timeout to OpenStack session.get call in _determine_max_compute_api_version_by_cloud
- Added REPO_POLICY_COMPLIANCE_TIMEOUT constant (5 minutes) to repo_policy_compliance_client.py
- Added timeout to repo policy compliance service API call

All timeouts are configured as constants at the top of files for easy maintenance as requested.

Co-authored-by: cbartz <4182921+cbartz@users.noreply.github.com>

* Fix test mock to support timeout parameter in OpenStack session.get

Updated FakeOpenstackCloud.session to return self instead of dict, and added get() method that accepts timeout parameter. This allows the timeout parameter to be properly passed through in tests.

Co-authored-by: cbartz <4182921+cbartz@users.noreply.github.com>

* Apply black formatting to fake_runner_managers.py

Co-authored-by: cbartz <4182921+cbartz@users.noreply.github.com>

* Increase GitHub API timeout from 60 seconds to 5 minutes

Changed TIMEOUT_IN_SECS from 60 to 300 (5 minutes) to be consistent with OpenStack and repo policy compliance timeouts, and to address the problem statement suggestion of using 5-minute timeouts for API calls.

Co-authored-by: cbartz <4182921+cbartz@users.noreply.github.com>

* Improve test mock implementation for consistency

- Store session response mock as instance variable for consistent behavior
- Rename 'endpoint' parameter to 'url' for clarity
- Address code review feedback

Co-authored-by: cbartz <4182921+cbartz@users.noreply.github.com>

* ci: apply dockerhub mirror e2e (#661)

* ci: microk8s use dockerhub mirror

* ci: conditionally apply mirror if set

* ci: use dockerhub mirror for microk8s in setup (#662)

* ci: use dockerhub mirror for microk8s in setup

* restart microk8s

* chore(deps): update all non-major dependencies (#627)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update changelog

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: cbartz <4182921+cbartz@users.noreply.github.com>
Co-authored-by: Yanks Yoon <37652070+yanksyoon@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christopher Bartz <christopher.bartz@canonical.com>

* test: fix jubilant controller prefix issue (#666)

* test: fix jubilant controller prefix issue

* test: update latest jubilant native syntax

* test: use model prefixed offer

* test: remove str type casting

* test: add controller name

* test: try again, unintuitive lib API design

* test: try again

* fix: Remove -v in socat as in can incur in performance issues (#641)

Co-authored-by: Christopher Bartz <christopher.bartz@canonical.com>

* feat: pre job fork check (#648)

* ci: organize secrets (#667)

* ci: use secrets from env var mapping

* test: disable github integration tests (preserve code as framework)

* ci: map secret values to env vars

* test: unify testing interface

* test: unify testing interface

* chore(deps): update all non-major dependencies (#664)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: cbartz <4182921+cbartz@users.noreply.github.com>
Co-authored-by: Yanks Yoon <37652070+yanksyoon@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christopher Bartz <christopher.bartz@canonical.com>
Co-authored-by: javierdelapuente <javier.delapuente@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants