Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…rator into feat/upgrade-pydantic-v2
  • Loading branch information
alithethird committed Sep 5, 2024
2 parents 4fc911e + 5b8c99a commit c342a92
Show file tree
Hide file tree
Showing 39 changed files with 1,297 additions and 3,199 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ omit = [
]

[tool.coverage.report]
fail_under = 83
fail_under = 85
show_missing = true

[tool.pytest.ini_options]
Expand Down
10 changes: 5 additions & 5 deletions src-docs/charm.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Charm for creating and managing GitHub self-hosted runner instances.

---

<a href="../src/charm.py#L102"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/charm.py#L109"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>function</kbd> `catch_charm_errors`

Expand All @@ -46,7 +46,7 @@ Catch common errors in charm.

---

<a href="../src/charm.py#L148"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/charm.py#L155"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>function</kbd> `catch_action_errors`

Expand All @@ -72,7 +72,7 @@ Catch common errors in actions.

---

<a href="../src/charm.py#L95"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/charm.py#L102"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `ReconcileRunnersEvent`
Event representing a periodic check to ensure runners are ok.
Expand All @@ -83,7 +83,7 @@ Event representing a periodic check to ensure runners are ok.

---

<a href="../src/charm.py#L186"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/charm.py#L193"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `GithubRunnerCharm`
Charm for managing GitHub self-hosted runners.
Expand All @@ -100,7 +100,7 @@ Charm for managing GitHub self-hosted runners.
- <b>`ram_pool_path`</b>: The path to memdisk storage.
- <b>`kernel_module_path`</b>: The path to kernel modules.

<a href="../src/charm.py#L209"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/charm.py#L216"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `__init__`

Expand Down
65 changes: 38 additions & 27 deletions src-docs/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ Error for setting up aproxy.

<a href="../src/errors.py#L42"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `MissingServerConfigError`
Error for unable to create runner due to missing server configurations.





---

<a href="../src/errors.py#L46"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `MissingRunnerBinaryError`
Error for missing runner binary.

Expand All @@ -108,7 +119,7 @@ Error for missing runner binary.

---

<a href="../src/errors.py#L46"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L50"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `ConfigurationError`
Error for juju configuration.
Expand All @@ -119,7 +130,7 @@ Error for juju configuration.

---

<a href="../src/errors.py#L50"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L54"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `MissingMongoDBError`
Error for missing integration data.
Expand All @@ -130,7 +141,7 @@ Error for missing integration data.

---

<a href="../src/errors.py#L54"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L58"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `LxdError`
Error for executing LXD actions.
Expand All @@ -141,7 +152,7 @@ Error for executing LXD actions.

---

<a href="../src/errors.py#L58"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L62"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `SubprocessError`
Error for Subprocess calls.
Expand All @@ -155,7 +166,7 @@ Error for Subprocess calls.
- <b>`stdout`</b>: Content of stdout of the subprocess.
- <b>`stderr`</b>: Content of stderr of the subprocess.

<a href="../src/errors.py#L68"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L72"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `__init__`

Expand Down Expand Up @@ -185,7 +196,7 @@ Construct the subprocess error.

---

<a href="../src/errors.py#L91"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L95"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `IssueMetricEventError`
Represents an error when issuing a metric event.
Expand All @@ -196,7 +207,7 @@ Represents an error when issuing a metric event.

---

<a href="../src/errors.py#L95"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L99"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `LogrotateSetupError`
Represents an error raised when logrotate cannot be setup.
Expand All @@ -207,7 +218,7 @@ Represents an error raised when logrotate cannot be setup.

---

<a href="../src/errors.py#L99"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L103"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `MetricsStorageError`
Base class for all metrics storage errors.
Expand All @@ -218,7 +229,7 @@ Base class for all metrics storage errors.

---

<a href="../src/errors.py#L103"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L107"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `SharedFilesystemError`
Base class for all shared filesystem errors.
Expand All @@ -229,7 +240,7 @@ Base class for all shared filesystem errors.

---

<a href="../src/errors.py#L107"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L111"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `CreateMetricsStorageError`
Represents an error when the metrics storage could not be created.
Expand All @@ -240,7 +251,7 @@ Represents an error when the metrics storage could not be created.

---

<a href="../src/errors.py#L111"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L115"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `DeleteMetricsStorageError`
Represents an error when the metrics storage could not be deleted.
Expand All @@ -251,7 +262,7 @@ Represents an error when the metrics storage could not be deleted.

---

<a href="../src/errors.py#L115"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L119"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `GetMetricsStorageError`
Represents an error when the metrics storage could not be retrieved.
Expand All @@ -262,7 +273,7 @@ Represents an error when the metrics storage could not be retrieved.

---

<a href="../src/errors.py#L119"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L123"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `QuarantineMetricsStorageError`
Represents an error when the metrics storage could not be quarantined.
Expand All @@ -273,7 +284,7 @@ Represents an error when the metrics storage could not be quarantined.

---

<a href="../src/errors.py#L123"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L127"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `SharedFilesystemMountError`
Represents an error related to the mounting of the shared filesystem.
Expand All @@ -284,7 +295,7 @@ Represents an error related to the mounting of the shared filesystem.

---

<a href="../src/errors.py#L127"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L131"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `RunnerMetricsError`
Base class for all runner metrics errors.
Expand All @@ -295,7 +306,7 @@ Base class for all runner metrics errors.

---

<a href="../src/errors.py#L131"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L135"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `CorruptMetricDataError`
Represents an error with the data being corrupt.
Expand All @@ -306,7 +317,7 @@ Represents an error with the data being corrupt.

---

<a href="../src/errors.py#L135"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L139"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `GithubMetricsError`
Base class for all github metrics errors.
Expand All @@ -317,7 +328,7 @@ Base class for all github metrics errors.

---

<a href="../src/errors.py#L139"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L143"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `GithubClientError`
Base class for all github client errors.
Expand All @@ -328,7 +339,7 @@ Base class for all github client errors.

---

<a href="../src/errors.py#L143"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L147"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `GithubApiError`
Represents an error when the GitHub API returns an error.
Expand All @@ -339,7 +350,7 @@ Represents an error when the GitHub API returns an error.

---

<a href="../src/errors.py#L147"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L151"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `TokenError`
Represents an error when the token is invalid or has not enough permissions.
Expand All @@ -350,7 +361,7 @@ Represents an error when the token is invalid or has not enough permissions.

---

<a href="../src/errors.py#L151"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L155"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `JobNotFoundError`
Represents an error when the job could not be found on GitHub.
Expand All @@ -361,7 +372,7 @@ Represents an error when the job could not be found on GitHub.

---

<a href="../src/errors.py#L155"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L159"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `RunnerLogsError`
Base class for all runner logs errors.
Expand All @@ -372,7 +383,7 @@ Base class for all runner logs errors.

---

<a href="../src/errors.py#L159"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L163"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `OpenStackError`
Base class for OpenStack errors.
Expand All @@ -383,7 +394,7 @@ Base class for OpenStack errors.

---

<a href="../src/errors.py#L163"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L167"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `OpenStackInvalidConfigError`
Represents an invalid OpenStack configuration.
Expand All @@ -394,7 +405,7 @@ Represents an invalid OpenStack configuration.

---

<a href="../src/errors.py#L167"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L171"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `OpenStackUnauthorizedError`
Represents an unauthorized connection to OpenStack.
Expand All @@ -405,7 +416,7 @@ Represents an unauthorized connection to OpenStack.

---

<a href="../src/errors.py#L171"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L175"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `SSHError`
Represents an error while interacting with SSH.
Expand All @@ -416,7 +427,7 @@ Represents an error while interacting with SSH.

---

<a href="../src/errors.py#L175"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/errors.py#L179"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `KeyfileError`
Represents missing keyfile for SSH.
Expand Down
12 changes: 6 additions & 6 deletions src-docs/github_client.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Instantiate the GiHub API client.
### <kbd>method</kbd> `delete_runner`

```python
delete_runner(path: GithubOrg | GithubRepo, runner_id: int) → None
delete_runner(path: GitHubOrg | GitHubRepo, runner_id: int) → None
```

Delete the self-hosted runner from GitHub.
Expand All @@ -87,7 +87,7 @@ Delete the self-hosted runner from GitHub.

```python
get_job_info(
path: GithubRepo,
path: GitHubRepo,
workflow_run_id: str,
runner_name: str
) → JobStats
Expand Down Expand Up @@ -123,7 +123,7 @@ Get information about a job for a specific workflow run.

```python
get_runner_application(
path: GithubOrg | GithubRepo,
path: GitHubOrg | GitHubRepo,
arch: Arch,
os: str = 'linux'
) → RunnerApplication
Expand Down Expand Up @@ -157,7 +157,7 @@ Get runner application available for download for given arch.
### <kbd>method</kbd> `get_runner_github_info`

```python
get_runner_github_info(path: GithubOrg | GithubRepo) → list[SelfHostedRunner]
get_runner_github_info(path: GitHubOrg | GitHubRepo) → list[SelfHostedRunner]
```

Get runner information on GitHub under a repo or org.
Expand All @@ -180,7 +180,7 @@ Get runner information on GitHub under a repo or org.
### <kbd>method</kbd> `get_runner_registration_token`

```python
get_runner_registration_token(path: GithubOrg | GithubRepo) → str
get_runner_registration_token(path: GitHubOrg | GitHubRepo) → str
```

Get token from GitHub used for registering runners.
Expand All @@ -203,7 +203,7 @@ Get token from GitHub used for registering runners.
### <kbd>method</kbd> `get_runner_remove_token`

```python
get_runner_remove_token(path: GithubOrg | GithubRepo) → str
get_runner_remove_token(path: GitHubOrg | GitHubRepo) → str
```

Get token from GitHub used for removing runners.
Expand Down
5 changes: 4 additions & 1 deletion src-docs/openstack_cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ Module for managing Openstack cloud.

**Global Variables**
---------------
- **openstack_manager**: # Copyright 2024 Canonical Ltd.
- **openstack_cloud**: # Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

- **openstack_runner_manager**: # Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.


Expand Down
4 changes: 2 additions & 2 deletions src-docs/openstack_cloud.openstack_manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ create_instance_config(
app_name: str,
unit_num: int,
image_id: str,
path: GithubOrg | GithubRepo,
path: GitHubOrg | GitHubRepo,
labels: Iterable[str],
registration_token: str
) → InstanceConfig
Expand Down Expand Up @@ -75,7 +75,7 @@ The configuration values for creating a single runner instance.

```python
__init__(
github_path: GithubOrg | GithubRepo,
github_path: GitHubOrg | GitHubRepo,
image_id: str,
labels: Iterable[str],
name: str,
Expand Down
Loading

0 comments on commit c342a92

Please sign in to comment.