From 52a8bdfd787b80e66ff694f223eb554fd30f39e3 Mon Sep 17 00:00:00 2001 From: Christopher Bartz Date: Wed, 15 Jan 2025 19:18:10 +0100 Subject: [PATCH 1/3] Update copyright year (#427) --- .github/workflows/e2e_test_run.yaml | 2 +- .github/workflows/integration_test.yaml | 8 +++++--- .github/workflows/workflow_dispatch_ssh_debug.yaml | 2 +- actions.yaml | 2 +- charmcraft.yaml | 2 +- config.yaml | 2 +- generate-src-docs.sh | 2 +- github-runner-manager/LICENSE | 2 +- github-runner-manager/pyproject.toml | 2 +- .../src/github_runner_manager/__init__.py | 2 +- .../src/github_runner_manager/errors.py | 2 +- .../src/github_runner_manager/github_client.py | 2 +- .../src/github_runner_manager/manager/__init__.py | 2 +- .../manager/cloud_runner_manager.py | 2 +- .../manager/github_runner_manager.py | 2 +- .../github_runner_manager/manager/runner_manager.py | 2 +- .../github_runner_manager/manager/runner_scaler.py | 2 +- .../src/github_runner_manager/metrics/__init__.py | 2 +- .../src/github_runner_manager/metrics/events.py | 2 +- .../src/github_runner_manager/metrics/github.py | 2 +- .../src/github_runner_manager/metrics/runner.py | 2 +- .../src/github_runner_manager/metrics/runner_logs.py | 2 +- .../src/github_runner_manager/metrics/storage.py | 2 +- .../src/github_runner_manager/metrics/type.py | 2 +- .../openstack_cloud/__init__.py | 2 +- .../openstack_cloud/constants.py | 2 +- .../openstack_cloud/health_checks.py | 2 +- .../openstack_cloud/openstack_cloud.py | 2 +- .../openstack_cloud/openstack_runner_manager.py | 2 +- .../src/github_runner_manager/reactive/__init__.py | 2 +- .../src/github_runner_manager/reactive/consumer.py | 2 +- .../reactive/process_manager.py | 2 +- .../src/github_runner_manager/reactive/runner.py | 2 +- .../github_runner_manager/reactive/runner_manager.py | 2 +- .../src/github_runner_manager/reactive/types_.py | 2 +- .../repo_policy_compliance_client.py | 2 +- .../src/github_runner_manager/types_/__init__.py | 2 +- .../src/github_runner_manager/types_/github.py | 2 +- .../src/github_runner_manager/utilities.py | 2 +- github-runner-manager/tests/__init__.py | 2 +- github-runner-manager/tests/conftest.py | 2 +- github-runner-manager/tests/integration/__init__.py | 2 +- .../tests/integration/test_charm.py | 2 +- github-runner-manager/tests/unit/__init__.py | 2 +- .../tests/unit/factories/openstack_factory.py | 2 +- github-runner-manager/tests/unit/metrics/__init__.py | 2 +- .../tests/unit/metrics/test_events.py | 2 +- .../tests/unit/metrics/test_github.py | 2 +- .../tests/unit/metrics/test_runner.py | 2 +- .../tests/unit/metrics/test_runner_logs.py | 2 +- .../tests/unit/metrics/test_storage.py | 2 +- .../tests/unit/mock_runner_managers.py | 2 +- .../tests/unit/openstack_cloud/__init__.py | 2 +- .../tests/unit/openstack_cloud/test_health_checks.py | 2 +- .../unit/openstack_cloud/test_openstack_cloud.py | 2 +- .../openstack_cloud/test_openstack_runner_manager.py | 2 +- .../tests/unit/reactive/__init__.py | 2 +- .../tests/unit/reactive/test_consumer.py | 2 +- .../tests/unit/reactive/test_process_manager.py | 2 +- .../tests/unit/reactive/test_runner_manager.py | 2 +- .../tests/unit/test_github_client.py | 2 +- .../tests/unit/test_runner_scaler.py | 2 +- github-runner-manager/tests/unit/test_types_.py | 2 +- github-runner-manager/tests/unit/types_/__init__.py | 2 +- github-runner-manager/tox.ini | 2 +- metadata.yaml | 2 +- pyproject.toml | 2 +- scripts/build-lxd-image.sh | 2 +- scripts/build-openstack-image.sh | 2 +- scripts/pre-integration-test.sh | 2 +- scripts/repo_policy_compliance_service.py | 2 +- scripts/setup-lxd.sh | 2 +- src/charm.py | 2 +- src/charm_state.py | 2 +- src/errors.py | 2 +- src/event_timer.py | 2 +- src/firewall.py | 2 +- src/github_client.py | 2 +- src/logrotate.py | 2 +- src/lxd.py | 2 +- src/lxd_type.py | 2 +- src/runner.py | 2 +- src/runner_manager.py | 2 +- src/runner_manager_type.py | 2 +- src/runner_type.py | 2 +- src/shared_fs.py | 2 +- src/utilities.py | 2 +- tests/__init__.py | 2 +- tests/conftest.py | 2 +- tests/integration/__init__.py | 2 +- tests/integration/conftest.py | 12 +++++++----- tests/integration/data/clouds.yaml.tmpl | 2 +- tests/integration/helpers/__init__.py | 2 +- tests/integration/helpers/charm_metrics.py | 2 +- tests/integration/helpers/common.py | 2 +- tests/integration/helpers/lxd.py | 2 +- tests/integration/helpers/openstack.py | 2 +- tests/integration/test_charm_base_image.py | 2 +- tests/integration/test_charm_fork_repo.py | 2 +- tests/integration/test_charm_lxd_runner.py | 2 +- tests/integration/test_charm_metrics_failure.py | 2 +- tests/integration/test_charm_metrics_success.py | 2 +- tests/integration/test_charm_no_runner.py | 2 +- tests/integration/test_charm_runner.py | 2 +- tests/integration/test_charm_scheduled_events.py | 2 +- tests/integration/test_charm_upgrade.py | 2 +- tests/integration/test_charm_with_juju_storage.py | 2 +- tests/integration/test_charm_with_proxy.py | 2 +- tests/integration/test_debug_ssh.py | 2 +- tests/integration/test_e2e.py | 2 +- tests/integration/test_reactive.py | 2 +- tests/integration/test_runner_manager_openstack.py | 2 +- tests/integration/test_self_hosted_runner.py | 2 +- tests/status_name.py | 2 +- tests/unit/__init__.py | 2 +- tests/unit/conftest.py | 2 +- tests/unit/factories.py | 2 +- tests/unit/mock.py | 2 +- tests/unit/mock_runner_managers.py | 2 +- tests/unit/test_charm.py | 2 +- tests/unit/test_charm_state.py | 2 +- tests/unit/test_event_timer.py | 2 +- tests/unit/test_firewall.py | 2 +- tests/unit/test_logrotate.py | 2 +- tests/unit/test_lxd_runner_manager.py | 2 +- tests/unit/test_runner.py | 2 +- tests/unit/test_runner_scaler.py | 2 +- tests/unit/test_shared_fs.py | 2 +- tests/unit/test_utilities.py | 2 +- tox.ini | 2 +- 130 files changed, 140 insertions(+), 136 deletions(-) diff --git a/.github/workflows/e2e_test_run.yaml b/.github/workflows/e2e_test_run.yaml index 7abfa10f5..1182e86b5 100644 --- a/.github/workflows/e2e_test_run.yaml +++ b/.github/workflows/e2e_test_run.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. name: Run End-to-End test diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 3577dba13..8ee7b432c 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -2,9 +2,11 @@ name: integration-tests on: pull_request: - schedule: - # Trigger at 6:00 AM and 6:00 PM UTC - - cron: "0 6,18 * * *" + + # Disabled until we get more resources for the actions + # schedule: + # # Trigger at 6:00 AM and 6:00 PM UTC + # - cron: "0 6,18 * * *" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/workflow_dispatch_ssh_debug.yaml b/.github/workflows/workflow_dispatch_ssh_debug.yaml index 7dbc9a79a..edbfb3920 100644 --- a/.github/workflows/workflow_dispatch_ssh_debug.yaml +++ b/.github/workflows/workflow_dispatch_ssh_debug.yaml @@ -13,5 +13,5 @@ jobs: runs-on: [self-hosted, linux, "${{ inputs.runner }}"] steps: - name: Setup tmate session - uses: canonical/action-tmate@chore/env_var_change + uses: canonical/action-tmate@main timeout-minutes: 5 diff --git a/actions.yaml b/actions.yaml index 7839a68e5..dfb2e5c4c 100644 --- a/actions.yaml +++ b/actions.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. check-runners: diff --git a/charmcraft.yaml b/charmcraft.yaml index a395fac8b..19c203ad9 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. type: charm diff --git a/config.yaml b/config.yaml index a3036c0f1..34e7ff054 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. options: diff --git a/generate-src-docs.sh b/generate-src-docs.sh index 8de8b14cc..9dd1ea53f 100644 --- a/generate-src-docs.sh +++ b/generate-src-docs.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. lazydocs --no-watermark --output-path src-docs src/*.py diff --git a/github-runner-manager/LICENSE b/github-runner-manager/LICENSE index c4a371b81..4b8b005b4 100644 --- a/github-runner-manager/LICENSE +++ b/github-runner-manager/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2024 Canonical Ltd. + Copyright 2025 Canonical Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/github-runner-manager/pyproject.toml b/github-runner-manager/pyproject.toml index cabf67b5d..4e3f3837b 100644 --- a/github-runner-manager/pyproject.toml +++ b/github-runner-manager/pyproject.toml @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. [project] diff --git a/github-runner-manager/src/github_runner_manager/__init__.py b/github-runner-manager/src/github_runner_manager/__init__.py index c360d9c7e..09af0ed6e 100644 --- a/github-runner-manager/src/github_runner_manager/__init__.py +++ b/github-runner-manager/src/github_runner_manager/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Package for runner manager related code.""" diff --git a/github-runner-manager/src/github_runner_manager/errors.py b/github-runner-manager/src/github_runner_manager/errors.py index 3aa229df9..1c1bab90d 100644 --- a/github-runner-manager/src/github_runner_manager/errors.py +++ b/github-runner-manager/src/github_runner_manager/errors.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Errors used by the charm.""" diff --git a/github-runner-manager/src/github_runner_manager/github_client.py b/github-runner-manager/src/github_runner_manager/github_client.py index 5f8473966..40bfeab17 100644 --- a/github-runner-manager/src/github_runner_manager/github_client.py +++ b/github-runner-manager/src/github_runner_manager/github_client.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """GitHub API client. diff --git a/github-runner-manager/src/github_runner_manager/manager/__init__.py b/github-runner-manager/src/github_runner_manager/manager/__init__.py index 70308177b..cf106a012 100644 --- a/github-runner-manager/src/github_runner_manager/manager/__init__.py +++ b/github-runner-manager/src/github_runner_manager/manager/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Package for abstract manager related code.""" diff --git a/github-runner-manager/src/github_runner_manager/manager/cloud_runner_manager.py b/github-runner-manager/src/github_runner_manager/manager/cloud_runner_manager.py index a8d9eacb0..18b721a63 100644 --- a/github-runner-manager/src/github_runner_manager/manager/cloud_runner_manager.py +++ b/github-runner-manager/src/github_runner_manager/manager/cloud_runner_manager.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Interface of manager of runner instance on clouds.""" diff --git a/github-runner-manager/src/github_runner_manager/manager/github_runner_manager.py b/github-runner-manager/src/github_runner_manager/manager/github_runner_manager.py index c588f513f..60a9d799f 100644 --- a/github-runner-manager/src/github_runner_manager/manager/github_runner_manager.py +++ b/github-runner-manager/src/github_runner_manager/manager/github_runner_manager.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Client for managing self-hosted runner on GitHub side.""" diff --git a/github-runner-manager/src/github_runner_manager/manager/runner_manager.py b/github-runner-manager/src/github_runner_manager/manager/runner_manager.py index 74815b7e3..828f89461 100644 --- a/github-runner-manager/src/github_runner_manager/manager/runner_manager.py +++ b/github-runner-manager/src/github_runner_manager/manager/runner_manager.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Class for managing the GitHub self-hosted runners hosted on cloud instances.""" diff --git a/github-runner-manager/src/github_runner_manager/manager/runner_scaler.py b/github-runner-manager/src/github_runner_manager/manager/runner_scaler.py index a0e529533..fe2f542c3 100644 --- a/github-runner-manager/src/github_runner_manager/manager/runner_scaler.py +++ b/github-runner-manager/src/github_runner_manager/manager/runner_scaler.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Module for scaling the runners amount.""" diff --git a/github-runner-manager/src/github_runner_manager/metrics/__init__.py b/github-runner-manager/src/github_runner_manager/metrics/__init__.py index d2a48eaed..3b1039ac9 100644 --- a/github-runner-manager/src/github_runner_manager/metrics/__init__.py +++ b/github-runner-manager/src/github_runner_manager/metrics/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Package for common metrics-related code.""" diff --git a/github-runner-manager/src/github_runner_manager/metrics/events.py b/github-runner-manager/src/github_runner_manager/metrics/events.py index cd2d2cc90..5991335dd 100644 --- a/github-runner-manager/src/github_runner_manager/metrics/events.py +++ b/github-runner-manager/src/github_runner_manager/metrics/events.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Models and functions for the metric events.""" diff --git a/github-runner-manager/src/github_runner_manager/metrics/github.py b/github-runner-manager/src/github_runner_manager/metrics/github.py index 1afc2948d..5eb266e3c 100644 --- a/github-runner-manager/src/github_runner_manager/metrics/github.py +++ b/github-runner-manager/src/github_runner_manager/metrics/github.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Functions to calculate metrics from data retrieved from GitHub.""" diff --git a/github-runner-manager/src/github_runner_manager/metrics/runner.py b/github-runner-manager/src/github_runner_manager/metrics/runner.py index e7c05f7e7..52a1891ee 100644 --- a/github-runner-manager/src/github_runner_manager/metrics/runner.py +++ b/github-runner-manager/src/github_runner_manager/metrics/runner.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Classes and function to extract the metrics from storage and issue runner metrics events.""" diff --git a/github-runner-manager/src/github_runner_manager/metrics/runner_logs.py b/github-runner-manager/src/github_runner_manager/metrics/runner_logs.py index ec7923c9c..b56479aa6 100644 --- a/github-runner-manager/src/github_runner_manager/metrics/runner_logs.py +++ b/github-runner-manager/src/github_runner_manager/metrics/runner_logs.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Functions to pull and remove the logs of the crashed runners.""" diff --git a/github-runner-manager/src/github_runner_manager/metrics/storage.py b/github-runner-manager/src/github_runner_manager/metrics/storage.py index acd1ea8e9..1db805813 100644 --- a/github-runner-manager/src/github_runner_manager/metrics/storage.py +++ b/github-runner-manager/src/github_runner_manager/metrics/storage.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Classes and functions defining the metrics storage. diff --git a/github-runner-manager/src/github_runner_manager/metrics/type.py b/github-runner-manager/src/github_runner_manager/metrics/type.py index 3d642094e..66f117d95 100644 --- a/github-runner-manager/src/github_runner_manager/metrics/type.py +++ b/github-runner-manager/src/github_runner_manager/metrics/type.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. # Copyright 2023 Canonical Ltd. diff --git a/github-runner-manager/src/github_runner_manager/openstack_cloud/__init__.py b/github-runner-manager/src/github_runner_manager/openstack_cloud/__init__.py index 0d03b744c..9252b5e67 100644 --- a/github-runner-manager/src/github_runner_manager/openstack_cloud/__init__.py +++ b/github-runner-manager/src/github_runner_manager/openstack_cloud/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Module for managing Openstack cloud.""" diff --git a/github-runner-manager/src/github_runner_manager/openstack_cloud/constants.py b/github-runner-manager/src/github_runner_manager/openstack_cloud/constants.py index 3d1d387a3..941f3e07d 100644 --- a/github-runner-manager/src/github_runner_manager/openstack_cloud/constants.py +++ b/github-runner-manager/src/github_runner_manager/openstack_cloud/constants.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Common constants for the Openstack cloud module.""" diff --git a/github-runner-manager/src/github_runner_manager/openstack_cloud/health_checks.py b/github-runner-manager/src/github_runner_manager/openstack_cloud/health_checks.py index 4a241dc51..75796b14d 100644 --- a/github-runner-manager/src/github_runner_manager/openstack_cloud/health_checks.py +++ b/github-runner-manager/src/github_runner_manager/openstack_cloud/health_checks.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Collection of functions related to health checks for a runner VM.""" diff --git a/github-runner-manager/src/github_runner_manager/openstack_cloud/openstack_cloud.py b/github-runner-manager/src/github_runner_manager/openstack_cloud/openstack_cloud.py index c58d8c4e2..583397c11 100644 --- a/github-runner-manager/src/github_runner_manager/openstack_cloud/openstack_cloud.py +++ b/github-runner-manager/src/github_runner_manager/openstack_cloud/openstack_cloud.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Class for accessing OpenStack API for managing servers.""" diff --git a/github-runner-manager/src/github_runner_manager/openstack_cloud/openstack_runner_manager.py b/github-runner-manager/src/github_runner_manager/openstack_cloud/openstack_runner_manager.py index 964d98ee5..a91977323 100644 --- a/github-runner-manager/src/github_runner_manager/openstack_cloud/openstack_runner_manager.py +++ b/github-runner-manager/src/github_runner_manager/openstack_cloud/openstack_runner_manager.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Manager for self-hosted runner on OpenStack.""" diff --git a/github-runner-manager/src/github_runner_manager/reactive/__init__.py b/github-runner-manager/src/github_runner_manager/reactive/__init__.py index 1c7b82dda..912be5858 100644 --- a/github-runner-manager/src/github_runner_manager/reactive/__init__.py +++ b/github-runner-manager/src/github_runner_manager/reactive/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Package for code implementing reactive scheduling.""" diff --git a/github-runner-manager/src/github_runner_manager/reactive/consumer.py b/github-runner-manager/src/github_runner_manager/reactive/consumer.py index 3106739b0..cbe3c5a46 100644 --- a/github-runner-manager/src/github_runner_manager/reactive/consumer.py +++ b/github-runner-manager/src/github_runner_manager/reactive/consumer.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Module responsible for consuming jobs from the message queue.""" diff --git a/github-runner-manager/src/github_runner_manager/reactive/process_manager.py b/github-runner-manager/src/github_runner_manager/reactive/process_manager.py index ad119da69..7b7cb28e8 100644 --- a/github-runner-manager/src/github_runner_manager/reactive/process_manager.py +++ b/github-runner-manager/src/github_runner_manager/reactive/process_manager.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Module for managing processes which spawn runners reactively.""" diff --git a/github-runner-manager/src/github_runner_manager/reactive/runner.py b/github-runner-manager/src/github_runner_manager/reactive/runner.py index 4e496e237..83919021e 100644 --- a/github-runner-manager/src/github_runner_manager/reactive/runner.py +++ b/github-runner-manager/src/github_runner_manager/reactive/runner.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Script to spawn a reactive runner process.""" diff --git a/github-runner-manager/src/github_runner_manager/reactive/runner_manager.py b/github-runner-manager/src/github_runner_manager/reactive/runner_manager.py index f6ec2924e..6eeef8952 100644 --- a/github-runner-manager/src/github_runner_manager/reactive/runner_manager.py +++ b/github-runner-manager/src/github_runner_manager/reactive/runner_manager.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Module for reconciling amount of runner and reactive runner processes.""" diff --git a/github-runner-manager/src/github_runner_manager/reactive/types_.py b/github-runner-manager/src/github_runner_manager/reactive/types_.py index e5380bf7b..05bc0e487 100644 --- a/github-runner-manager/src/github_runner_manager/reactive/types_.py +++ b/github-runner-manager/src/github_runner_manager/reactive/types_.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Module containing reactive scheduling related types.""" diff --git a/github-runner-manager/src/github_runner_manager/repo_policy_compliance_client.py b/github-runner-manager/src/github_runner_manager/repo_policy_compliance_client.py index 6dbc1d919..e93dedc26 100644 --- a/github-runner-manager/src/github_runner_manager/repo_policy_compliance_client.py +++ b/github-runner-manager/src/github_runner_manager/repo_policy_compliance_client.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Client for requesting repo policy compliance service.""" diff --git a/github-runner-manager/src/github_runner_manager/types_/__init__.py b/github-runner-manager/src/github_runner_manager/types_/__init__.py index 2d079d619..6ea1901c3 100644 --- a/github-runner-manager/src/github_runner_manager/types_/__init__.py +++ b/github-runner-manager/src/github_runner_manager/types_/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Package containing modules with type definitions.""" diff --git a/github-runner-manager/src/github_runner_manager/types_/github.py b/github-runner-manager/src/github_runner_manager/types_/github.py index d0198d84d..12255f172 100644 --- a/github-runner-manager/src/github_runner_manager/types_/github.py +++ b/github-runner-manager/src/github_runner_manager/types_/github.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Module containing GitHub API related types.""" diff --git a/github-runner-manager/src/github_runner_manager/utilities.py b/github-runner-manager/src/github_runner_manager/utilities.py index e2a7ab50b..911bd2dd5 100644 --- a/github-runner-manager/src/github_runner_manager/utilities.py +++ b/github-runner-manager/src/github_runner_manager/utilities.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Utilities used by the charm.""" diff --git a/github-runner-manager/tests/__init__.py b/github-runner-manager/tests/__init__.py index 188515554..97bca57b0 100644 --- a/github-runner-manager/tests/__init__.py +++ b/github-runner-manager/tests/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/github-runner-manager/tests/conftest.py b/github-runner-manager/tests/conftest.py index ad7716b2c..09a84dda8 100644 --- a/github-runner-manager/tests/conftest.py +++ b/github-runner-manager/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Fixtures for charm tests.""" diff --git a/github-runner-manager/tests/integration/__init__.py b/github-runner-manager/tests/integration/__init__.py index e3979c0f6..dddb292a2 100644 --- a/github-runner-manager/tests/integration/__init__.py +++ b/github-runner-manager/tests/integration/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/github-runner-manager/tests/integration/test_charm.py b/github-runner-manager/tests/integration/test_charm.py index f212ec1a4..d03d0c6c9 100644 --- a/github-runner-manager/tests/integration/test_charm.py +++ b/github-runner-manager/tests/integration/test_charm.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests.""" diff --git a/github-runner-manager/tests/unit/__init__.py b/github-runner-manager/tests/unit/__init__.py index e3979c0f6..dddb292a2 100644 --- a/github-runner-manager/tests/unit/__init__.py +++ b/github-runner-manager/tests/unit/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/github-runner-manager/tests/unit/factories/openstack_factory.py b/github-runner-manager/tests/unit/factories/openstack_factory.py index ab6391036..8f36d1ced 100644 --- a/github-runner-manager/tests/unit/factories/openstack_factory.py +++ b/github-runner-manager/tests/unit/factories/openstack_factory.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Factories for OpenStack objects.""" diff --git a/github-runner-manager/tests/unit/metrics/__init__.py b/github-runner-manager/tests/unit/metrics/__init__.py index 188515554..97bca57b0 100644 --- a/github-runner-manager/tests/unit/metrics/__init__.py +++ b/github-runner-manager/tests/unit/metrics/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/github-runner-manager/tests/unit/metrics/test_events.py b/github-runner-manager/tests/unit/metrics/test_events.py index ef7bdab34..54d62627c 100644 --- a/github-runner-manager/tests/unit/metrics/test_events.py +++ b/github-runner-manager/tests/unit/metrics/test_events.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import json from pathlib import Path diff --git a/github-runner-manager/tests/unit/metrics/test_github.py b/github-runner-manager/tests/unit/metrics/test_github.py index 44ce86dae..db4ef10a2 100644 --- a/github-runner-manager/tests/unit/metrics/test_github.py +++ b/github-runner-manager/tests/unit/metrics/test_github.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import secrets from datetime import datetime, timedelta, timezone diff --git a/github-runner-manager/tests/unit/metrics/test_runner.py b/github-runner-manager/tests/unit/metrics/test_runner.py index d5e11932c..023212c8d 100644 --- a/github-runner-manager/tests/unit/metrics/test_runner.py +++ b/github-runner-manager/tests/unit/metrics/test_runner.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import json import secrets diff --git a/github-runner-manager/tests/unit/metrics/test_runner_logs.py b/github-runner-manager/tests/unit/metrics/test_runner_logs.py index 77ee06cf8..e6595870c 100644 --- a/github-runner-manager/tests/unit/metrics/test_runner_logs.py +++ b/github-runner-manager/tests/unit/metrics/test_runner_logs.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. from pathlib import Path diff --git a/github-runner-manager/tests/unit/metrics/test_storage.py b/github-runner-manager/tests/unit/metrics/test_storage.py index c7bee1841..4e7041a74 100644 --- a/github-runner-manager/tests/unit/metrics/test_storage.py +++ b/github-runner-manager/tests/unit/metrics/test_storage.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import os import secrets diff --git a/github-runner-manager/tests/unit/mock_runner_managers.py b/github-runner-manager/tests/unit/mock_runner_managers.py index dc22a5627..1bbd5cb6f 100644 --- a/github-runner-manager/tests/unit/mock_runner_managers.py +++ b/github-runner-manager/tests/unit/mock_runner_managers.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import hashlib import random diff --git a/github-runner-manager/tests/unit/openstack_cloud/__init__.py b/github-runner-manager/tests/unit/openstack_cloud/__init__.py index 188515554..97bca57b0 100644 --- a/github-runner-manager/tests/unit/openstack_cloud/__init__.py +++ b/github-runner-manager/tests/unit/openstack_cloud/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/github-runner-manager/tests/unit/openstack_cloud/test_health_checks.py b/github-runner-manager/tests/unit/openstack_cloud/test_health_checks.py index f4117060a..717724c34 100644 --- a/github-runner-manager/tests/unit/openstack_cloud/test_health_checks.py +++ b/github-runner-manager/tests/unit/openstack_cloud/test_health_checks.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. from datetime import datetime, timedelta from unittest.mock import MagicMock diff --git a/github-runner-manager/tests/unit/openstack_cloud/test_openstack_cloud.py b/github-runner-manager/tests/unit/openstack_cloud/test_openstack_cloud.py index 152663d95..5f43149f3 100644 --- a/github-runner-manager/tests/unit/openstack_cloud/test_openstack_cloud.py +++ b/github-runner-manager/tests/unit/openstack_cloud/test_openstack_cloud.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. from typing import Any from unittest.mock import MagicMock diff --git a/github-runner-manager/tests/unit/openstack_cloud/test_openstack_runner_manager.py b/github-runner-manager/tests/unit/openstack_cloud/test_openstack_runner_manager.py index 1000ce8d7..2037667ad 100644 --- a/github-runner-manager/tests/unit/openstack_cloud/test_openstack_runner_manager.py +++ b/github-runner-manager/tests/unit/openstack_cloud/test_openstack_runner_manager.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Module for unit-testing OpenStack runner manager.""" diff --git a/github-runner-manager/tests/unit/reactive/__init__.py b/github-runner-manager/tests/unit/reactive/__init__.py index 188515554..97bca57b0 100644 --- a/github-runner-manager/tests/unit/reactive/__init__.py +++ b/github-runner-manager/tests/unit/reactive/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/github-runner-manager/tests/unit/reactive/test_consumer.py b/github-runner-manager/tests/unit/reactive/test_consumer.py index 697da7dd3..d4d18c42f 100644 --- a/github-runner-manager/tests/unit/reactive/test_consumer.py +++ b/github-runner-manager/tests/unit/reactive/test_consumer.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import secrets diff --git a/github-runner-manager/tests/unit/reactive/test_process_manager.py b/github-runner-manager/tests/unit/reactive/test_process_manager.py index f5864b894..38afa39ff 100644 --- a/github-runner-manager/tests/unit/reactive/test_process_manager.py +++ b/github-runner-manager/tests/unit/reactive/test_process_manager.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import os import secrets diff --git a/github-runner-manager/tests/unit/reactive/test_runner_manager.py b/github-runner-manager/tests/unit/reactive/test_runner_manager.py index 02c405f4f..187eeba94 100644 --- a/github-runner-manager/tests/unit/reactive/test_runner_manager.py +++ b/github-runner-manager/tests/unit/reactive/test_runner_manager.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. from random import randint from unittest.mock import MagicMock diff --git a/github-runner-manager/tests/unit/test_github_client.py b/github-runner-manager/tests/unit/test_github_client.py index 74567f5f5..c1be1f71f 100644 --- a/github-runner-manager/tests/unit/test_github_client.py +++ b/github-runner-manager/tests/unit/test_github_client.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import http import json diff --git a/github-runner-manager/tests/unit/test_runner_scaler.py b/github-runner-manager/tests/unit/test_runner_scaler.py index 835a3c510..529df1d87 100644 --- a/github-runner-manager/tests/unit/test_runner_scaler.py +++ b/github-runner-manager/tests/unit/test_runner_scaler.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/github-runner-manager/tests/unit/test_types_.py b/github-runner-manager/tests/unit/test_types_.py index 8784ba9e5..8827f85e5 100644 --- a/github-runner-manager/tests/unit/test_types_.py +++ b/github-runner-manager/tests/unit/test_types_.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Module for testing the general types.""" import pytest diff --git a/github-runner-manager/tests/unit/types_/__init__.py b/github-runner-manager/tests/unit/types_/__init__.py index e3979c0f6..dddb292a2 100644 --- a/github-runner-manager/tests/unit/types_/__init__.py +++ b/github-runner-manager/tests/unit/types_/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/github-runner-manager/tox.ini b/github-runner-manager/tox.ini index d248a913c..f89dce9bf 100644 --- a/github-runner-manager/tox.ini +++ b/github-runner-manager/tox.ini @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. [tox] diff --git a/metadata.yaml b/metadata.yaml index d1e0ce9f3..87851b881 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. name: github-runner diff --git a/pyproject.toml b/pyproject.toml index 8a430a2e7..d6182ce17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. [tool.bandit] diff --git a/scripts/build-lxd-image.sh b/scripts/build-lxd-image.sh index 4feabc0a6..b37032dd9 100755 --- a/scripts/build-lxd-image.sh +++ b/scripts/build-lxd-image.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. set -e diff --git a/scripts/build-openstack-image.sh b/scripts/build-openstack-image.sh index 76362d46f..8df568c55 100755 --- a/scripts/build-openstack-image.sh +++ b/scripts/build-openstack-image.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. set -euo pipefail diff --git a/scripts/pre-integration-test.sh b/scripts/pre-integration-test.sh index 04540449d..779046b35 100755 --- a/scripts/pre-integration-test.sh +++ b/scripts/pre-integration-test.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. # Enable kernel module br_netfilter diff --git a/scripts/repo_policy_compliance_service.py b/scripts/repo_policy_compliance_service.py index 5e914233c..7868144a9 100644 --- a/scripts/repo_policy_compliance_service.py +++ b/scripts/repo_policy_compliance_service.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Flask application for repo policy compliance. diff --git a/scripts/setup-lxd.sh b/scripts/setup-lxd.sh index 5b2a5a6cb..180ded09f 100644 --- a/scripts/setup-lxd.sh +++ b/scripts/setup-lxd.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. # Script to setup LXD for testing diff --git a/src/charm.py b/src/charm.py index 7cd8785ae..da88ead0f 100755 --- a/src/charm.py +++ b/src/charm.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. # TODO: 2024-03-12 The module contains too many lines which are scheduled for refactoring. diff --git a/src/charm_state.py b/src/charm_state.py index ba4e8731b..0fb8357cb 100644 --- a/src/charm_state.py +++ b/src/charm_state.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. # TODO: 2024-06-26 The charm contains a lot of states and configuration. The upcoming refactor will diff --git a/src/errors.py b/src/errors.py index 7212b4642..f9701a0d1 100644 --- a/src/errors.py +++ b/src/errors.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Errors used by the charm.""" diff --git a/src/event_timer.py b/src/event_timer.py index ab94c5736..660aeef91 100644 --- a/src/event_timer.py +++ b/src/event_timer.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """EventTimer for scheduling dispatch of juju event on regular intervals.""" diff --git a/src/firewall.py b/src/firewall.py index b4bf07c00..bdcfd3132 100644 --- a/src/firewall.py +++ b/src/firewall.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """The runner firewall manager.""" diff --git a/src/github_client.py b/src/github_client.py index b14d3b799..11e0ed75c 100644 --- a/src/github_client.py +++ b/src/github_client.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """GitHub API client. diff --git a/src/logrotate.py b/src/logrotate.py index 9894c55c4..18cd7e8ed 100644 --- a/src/logrotate.py +++ b/src/logrotate.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Logrotate setup and configuration.""" diff --git a/src/lxd.py b/src/lxd.py index 8d7cef1e9..26e75cafc 100644 --- a/src/lxd.py +++ b/src/lxd.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Low-level LXD client interface. diff --git a/src/lxd_type.py b/src/lxd_type.py index 77a3b3cb6..45c27be12 100644 --- a/src/lxd_type.py +++ b/src/lxd_type.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Types used by Lxd class. diff --git a/src/runner.py b/src/runner.py index a1b64fcfc..3c56acc7f 100644 --- a/src/runner.py +++ b/src/runner.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Manage the lifecycle of runners. diff --git a/src/runner_manager.py b/src/runner_manager.py index 727fc6782..62dd6fbf0 100644 --- a/src/runner_manager.py +++ b/src/runner_manager.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Runner Manager manages the runners on LXD and GitHub.""" diff --git a/src/runner_manager_type.py b/src/runner_manager_type.py index 4c5ca9820..9537e180c 100644 --- a/src/runner_manager_type.py +++ b/src/runner_manager_type.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Types used by RunnerManager class.""" diff --git a/src/runner_type.py b/src/runner_type.py index eec8793ee..4a9662daf 100644 --- a/src/runner_type.py +++ b/src/runner_type.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Types used by Runner class.""" diff --git a/src/shared_fs.py b/src/shared_fs.py index e8af848c1..f411c5966 100644 --- a/src/shared_fs.py +++ b/src/shared_fs.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Classes and functions to operate on the shared filesystem between the charm and the runners.""" diff --git a/src/utilities.py b/src/utilities.py index 86c32c4d2..b152a9cdf 100644 --- a/src/utilities.py +++ b/src/utilities.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Utilities used by the charm.""" diff --git a/tests/__init__.py b/tests/__init__.py index e3979c0f6..dddb292a2 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/tests/conftest.py b/tests/conftest.py index c07f2e872..68052d139 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Fixtures for github runner charm.""" diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index 188515554..97bca57b0 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index cb41d84a5..672d5d79d 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Fixtures for github runner charm integration tests.""" @@ -570,11 +570,13 @@ async def tmate_ssh_server_unit_ip_fixture( tmate_ssh_server_app: Application, ) -> bytes | str: """tmate-ssh-server charm unit ip.""" - status: FullStatus = await model.get_status([tmate_ssh_server_app.name]) + app_name = tmate_ssh_server_app.name + status: FullStatus = await model.get_status([app_name]) + app_status = status.applications[app_name] + assert app_status is not None, f"Application {app_name} not found in status" try: - unit_status: UnitStatus = next( - iter(status.applications[tmate_ssh_server_app.name].units.values()) - ) + # mypy does not recognize that app_status is of type ApplicationStatus + unit_status: UnitStatus = next(iter(app_status.units.values())) # type: ignore assert unit_status.public_address, "Invalid unit address" return unit_status.public_address except StopIteration as exc: diff --git a/tests/integration/data/clouds.yaml.tmpl b/tests/integration/data/clouds.yaml.tmpl index 8eba28e82..8736e2060 100644 --- a/tests/integration/data/clouds.yaml.tmpl +++ b/tests/integration/data/clouds.yaml.tmpl @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. clouds: testcloud: diff --git a/tests/integration/helpers/__init__.py b/tests/integration/helpers/__init__.py index 188515554..97bca57b0 100644 --- a/tests/integration/helpers/__init__.py +++ b/tests/integration/helpers/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/tests/integration/helpers/charm_metrics.py b/tests/integration/helpers/charm_metrics.py index 6baea6990..c3a06a0d4 100644 --- a/tests/integration/helpers/charm_metrics.py +++ b/tests/integration/helpers/charm_metrics.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Utilities for charm metrics integration tests.""" diff --git a/tests/integration/helpers/common.py b/tests/integration/helpers/common.py index fcc0731fa..0ff1dae4a 100644 --- a/tests/integration/helpers/common.py +++ b/tests/integration/helpers/common.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Utilities for integration test.""" diff --git a/tests/integration/helpers/lxd.py b/tests/integration/helpers/lxd.py index aee139ca4..355b1175c 100644 --- a/tests/integration/helpers/lxd.py +++ b/tests/integration/helpers/lxd.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import json import logging diff --git a/tests/integration/helpers/openstack.py b/tests/integration/helpers/openstack.py index 9696f5d10..2816338ee 100644 --- a/tests/integration/helpers/openstack.py +++ b/tests/integration/helpers/openstack.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import logging import secrets diff --git a/tests/integration/test_charm_base_image.py b/tests/integration/test_charm_base_image.py index ceee4a6b7..7110a3bf6 100644 --- a/tests/integration/test_charm_base_image.py +++ b/tests/integration/test_charm_base_image.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests for github-runner charm containing one runner.""" diff --git a/tests/integration/test_charm_fork_repo.py b/tests/integration/test_charm_fork_repo.py index 925387778..62229118a 100644 --- a/tests/integration/test_charm_fork_repo.py +++ b/tests/integration/test_charm_fork_repo.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests for github-runner charm with a fork repo. diff --git a/tests/integration/test_charm_lxd_runner.py b/tests/integration/test_charm_lxd_runner.py index c656f724d..3dfdbe412 100644 --- a/tests/integration/test_charm_lxd_runner.py +++ b/tests/integration/test_charm_lxd_runner.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests for github-runner charm containing one runner.""" diff --git a/tests/integration/test_charm_metrics_failure.py b/tests/integration/test_charm_metrics_failure.py index 6ce23fa0d..32ab93145 100644 --- a/tests/integration/test_charm_metrics_failure.py +++ b/tests/integration/test_charm_metrics_failure.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests for metrics/logs assuming Github workflow failures or a runner crash.""" diff --git a/tests/integration/test_charm_metrics_success.py b/tests/integration/test_charm_metrics_success.py index 283d7eba1..7c3d93fcd 100644 --- a/tests/integration/test_charm_metrics_success.py +++ b/tests/integration/test_charm_metrics_success.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests for metrics/logs assuming no Github workflow failures.""" diff --git a/tests/integration/test_charm_no_runner.py b/tests/integration/test_charm_no_runner.py index 52891a768..e25633cd4 100644 --- a/tests/integration/test_charm_no_runner.py +++ b/tests/integration/test_charm_no_runner.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests for github-runner charm with no runner.""" diff --git a/tests/integration/test_charm_runner.py b/tests/integration/test_charm_runner.py index 3fd587200..d29cea9a2 100644 --- a/tests/integration/test_charm_runner.py +++ b/tests/integration/test_charm_runner.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests for github-runner charm containing one runner.""" diff --git a/tests/integration/test_charm_scheduled_events.py b/tests/integration/test_charm_scheduled_events.py index 6e2224f85..145b3614d 100644 --- a/tests/integration/test_charm_scheduled_events.py +++ b/tests/integration/test_charm_scheduled_events.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests for github-runner charm with scheduled events. diff --git a/tests/integration/test_charm_upgrade.py b/tests/integration/test_charm_upgrade.py index 2f9fb3caf..d4d6cdc04 100644 --- a/tests/integration/test_charm_upgrade.py +++ b/tests/integration/test_charm_upgrade.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests for charm upgrades.""" diff --git a/tests/integration/test_charm_with_juju_storage.py b/tests/integration/test_charm_with_juju_storage.py index 566e02d10..8586d2bae 100644 --- a/tests/integration/test_charm_with_juju_storage.py +++ b/tests/integration/test_charm_with_juju_storage.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests for github-runner charm with juju-storage as disk.""" diff --git a/tests/integration/test_charm_with_proxy.py b/tests/integration/test_charm_with_proxy.py index 0006ae4bf..09f3d7310 100644 --- a/tests/integration/test_charm_with_proxy.py +++ b/tests/integration/test_charm_with_proxy.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Test the usage of a proxy server.""" diff --git a/tests/integration/test_debug_ssh.py b/tests/integration/test_debug_ssh.py index d153b6591..f415bd287 100644 --- a/tests/integration/test_debug_ssh.py +++ b/tests/integration/test_debug_ssh.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests for github-runner charm with ssh-debug integration.""" diff --git a/tests/integration/test_e2e.py b/tests/integration/test_e2e.py index bed193216..f48b6021c 100644 --- a/tests/integration/test_e2e.py +++ b/tests/integration/test_e2e.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. from typing import AsyncIterator diff --git a/tests/integration/test_reactive.py b/tests/integration/test_reactive.py index f99e3ff24..1be1730c5 100644 --- a/tests/integration/test_reactive.py +++ b/tests/integration/test_reactive.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Testing reactive mode. This is only supported for the OpenStack cloud.""" diff --git a/tests/integration/test_runner_manager_openstack.py b/tests/integration/test_runner_manager_openstack.py index ff9238a81..25ee580de 100644 --- a/tests/integration/test_runner_manager_openstack.py +++ b/tests/integration/test_runner_manager_openstack.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Testing the RunnerManager class with OpenStackRunnerManager as CloudManager. diff --git a/tests/integration/test_self_hosted_runner.py b/tests/integration/test_self_hosted_runner.py index 46c8280b1..b1fd712ee 100644 --- a/tests/integration/test_self_hosted_runner.py +++ b/tests/integration/test_self_hosted_runner.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Integration tests for self-hosted runner managed by the github-runner charm.""" diff --git a/tests/status_name.py b/tests/status_name.py index bf83ddc41..b963fa055 100644 --- a/tests/status_name.py +++ b/tests/status_name.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. from ops.model import ActiveStatus, BlockedStatus diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index e3979c0f6..dddb292a2 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 5a9182080..d10f11f3a 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import copy diff --git a/tests/unit/factories.py b/tests/unit/factories.py index 2dc9d2a97..b426aa5ff 100644 --- a/tests/unit/factories.py +++ b/tests/unit/factories.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Factories for generating test data.""" diff --git a/tests/unit/mock.py b/tests/unit/mock.py index 78c0c6990..faa483e30 100644 --- a/tests/unit/mock.py +++ b/tests/unit/mock.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Mock for testing.""" diff --git a/tests/unit/mock_runner_managers.py b/tests/unit/mock_runner_managers.py index b52afa538..fb74b5d91 100644 --- a/tests/unit/mock_runner_managers.py +++ b/tests/unit/mock_runner_managers.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import random diff --git a/tests/unit/test_charm.py b/tests/unit/test_charm.py index 7e70c6d59..19167fbd0 100644 --- a/tests/unit/test_charm.py +++ b/tests/unit/test_charm.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Test cases for GithubRunnerCharm.""" diff --git a/tests/unit/test_charm_state.py b/tests/unit/test_charm_state.py index f3d3564f7..09116d7fd 100644 --- a/tests/unit/test_charm_state.py +++ b/tests/unit/test_charm_state.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import json import logging diff --git a/tests/unit/test_event_timer.py b/tests/unit/test_event_timer.py index 818d64973..062bb8407 100644 --- a/tests/unit/test_event_timer.py +++ b/tests/unit/test_event_timer.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import secrets diff --git a/tests/unit/test_firewall.py b/tests/unit/test_firewall.py index 917c0bde4..b3f229d82 100644 --- a/tests/unit/test_firewall.py +++ b/tests/unit/test_firewall.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Test cases for firewall module.""" diff --git a/tests/unit/test_logrotate.py b/tests/unit/test_logrotate.py index 45a232756..a06ed0382 100644 --- a/tests/unit/test_logrotate.py +++ b/tests/unit/test_logrotate.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import secrets from pathlib import Path diff --git a/tests/unit/test_lxd_runner_manager.py b/tests/unit/test_lxd_runner_manager.py index b55757622..ea53a0326 100644 --- a/tests/unit/test_lxd_runner_manager.py +++ b/tests/unit/test_lxd_runner_manager.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Test cases of LXDRunnerManager class.""" diff --git a/tests/unit/test_runner.py b/tests/unit/test_runner.py index e6d57f305..f547c37c5 100644 --- a/tests/unit/test_runner.py +++ b/tests/unit/test_runner.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Test cases of Runner class.""" diff --git a/tests/unit/test_runner_scaler.py b/tests/unit/test_runner_scaler.py index 5cfae4c4f..537419d0e 100644 --- a/tests/unit/test_runner_scaler.py +++ b/tests/unit/test_runner_scaler.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. diff --git a/tests/unit/test_shared_fs.py b/tests/unit/test_shared_fs.py index 12dc11506..da1a58501 100644 --- a/tests/unit/test_shared_fs.py +++ b/tests/unit/test_shared_fs.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. import secrets import shutil diff --git a/tests/unit/test_utilities.py b/tests/unit/test_utilities.py index d0bc8bf57..56974cc9d 100644 --- a/tests/unit/test_utilities.py +++ b/tests/unit/test_utilities.py @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. """Test cases of utilities.""" diff --git a/tox.ini b/tox.ini index f58f1cb86..85ecfa297 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,4 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. [tox] From a2afeaafdde1e2de599a462ba349df73fd40f191 Mon Sep 17 00:00:00 2001 From: David Andersson <51036209+jdkandersson@users.noreply.github.com> Date: Thu, 16 Jan 2025 08:36:09 +0100 Subject: [PATCH 2/3] Create SECURITY.md (#429) --- SECURITY.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..0abbf9532 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,3 @@ +To report a security issue, file a [Private Security Report](https://github.com/Canonical/github-runner-operator/security/advisories/new) with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. + +The [Ubuntu Security disclosure and embargo policy](https://ubuntu.com/security/disclosure-policy) contains more information about what you can expect when you contact us and what we expect from you. From 33fceee36922d0358b4c07878233438a8cfe5e7b Mon Sep 17 00:00:00 2001 From: javierdelapuente Date: Thu, 16 Jan 2025 12:54:54 +0100 Subject: [PATCH 3/3] Use new security mechanism based on environment variables (#435) * Use new security mechanism based on environment variables --- tests/integration/conftest.py | 6 ++++-- tox.ini | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 672d5d79d..86a896a51 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -3,6 +3,7 @@ """Fixtures for github runner charm integration tests.""" import logging +import os import random import secrets import string @@ -131,7 +132,7 @@ def path(pytestconfig: pytest.Config) -> str: @pytest.fixture(scope="module") def token(pytestconfig: pytest.Config) -> str: """Configured token setting.""" - token = pytestconfig.getoption("--token") + token = pytestconfig.getoption("--token") or os.environ.get("INTEGRATION_TOKEN") assert token, "Please specify the --token command line option" tokens = {token.strip() for token in token.split(",")} random_token = random.choice(list(tokens)) @@ -141,7 +142,7 @@ def token(pytestconfig: pytest.Config) -> str: @pytest.fixture(scope="module") def token_alt(pytestconfig: pytest.Config, token: str) -> str: """Configured token_alt setting.""" - token_alt = pytestconfig.getoption("--token-alt") + token_alt = pytestconfig.getoption("--token-alt") or os.environ.get("INTEGRATION_TOKEN_ALT") assert token_alt, ( "Please specify the --token-alt command line option with GitHub Personal " "Access Token value." @@ -203,6 +204,7 @@ def private_endpoint_config_fixture(pytestconfig: pytest.Config) -> PrivateEndpo """The private endpoint configuration values.""" auth_url = pytestconfig.getoption("--openstack-auth-url-amd64") password = pytestconfig.getoption("--openstack-password-amd64") + password = password or os.environ.get("INTEGRATION_OPENSTACK_PASSWORD_AMD64") project_domain_name = pytestconfig.getoption("--openstack-project-domain-name-amd64") project_name = pytestconfig.getoption("--openstack-project-name-amd64") user_domain_name = pytestconfig.getoption("--openstack-user-domain-name-amd64") diff --git a/tox.ini b/tox.ini index 85ecfa297..9b0f48ed5 100644 --- a/tox.ini +++ b/tox.ini @@ -110,6 +110,9 @@ commands = description = Run integration tests pass_env = PYTEST_ADDOPTS + INTEGRATION_OPENSTACK_PASSWORD_AMD64 + INTEGRATION_TOKEN + INTEGRATION_TOKEN_ALT deps = juju3.1: juju==3.1.* juju3.6: juju==3.6.*