From 5a4d5f3823b919d9eff876c4a7f4b8811cd28351 Mon Sep 17 00:00:00 2001 From: Pedro Guimaraes Date: Tue, 14 Jan 2025 16:46:20 +0100 Subject: [PATCH 1/9] Add CI support + git ignore update --- .github/.jira_sync_config.yaml | 21 ++++ .github/ISSUE_TEMPLATE/bug_report.md | 47 ++++++++ .github/workflows/ci.yaml | 43 +++++++ .github/workflows/release.yaml | 56 +++++++++ .github/workflows/sync_docs.yaml | 29 +++++ .gitignore | 165 +-------------------------- config.yaml | 8 +- pyproject.toml | 8 +- tests/unit/test_lifecycle.py | 9 +- 9 files changed, 209 insertions(+), 177 deletions(-) create mode 100644 .github/.jira_sync_config.yaml create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/release.yaml create mode 100644 .github/workflows/sync_docs.yaml diff --git a/.github/.jira_sync_config.yaml b/.github/.jira_sync_config.yaml new file mode 100644 index 0000000..adcf491 --- /dev/null +++ b/.github/.jira_sync_config.yaml @@ -0,0 +1,21 @@ +# Sync GitHub issues to Jira issues + +# Configuration syntax: +# https://github.com/canonical/gh-jira-sync-bot/blob/main/README.md#client-side-configuration +settings: + # Repository specific settings + components: # Jira components that will be added to Jira issue + - kafka-benchmark-operator + + # Settings shared across Data Platform repositories + label_mapping: + # If the GitHub issue does not have a label in this mapping, the Jira issue will be created as a Bug + enhancement: Story + jira_project_key: DPE # https://warthogs.atlassian.net/browse/DPE + status_mapping: + opened: untriaged + closed: done # GitHub issue closed as completed + not_planned: rejected # GitHub issue closed as not planned + add_gh_comment: true + sync_description: false + sync_comments: false diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..1a3f378 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,47 @@ +--- +name: Bug report +about: File a bug report +labels: bug + +--- + + + +## Steps to reproduce + +1. + +## Expected behavior + + +## Actual behavior + + + +## Versions + + +Operating system: + + +Juju CLI: + + +Juju agent: + + +Charm revision: + + +LXD: + +## Log output + + +Juju debug log: + + + + +## Additional context + diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..25727e1 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,43 @@ +# Copyright 2025 Canonical Ltd. +# See LICENSE file for licensing details. +name: Tests + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + schedule: + - cron: "53 0 * * *" # Daily at 00:53 UTC + # Triggered on push to branch "main" by .github/workflows/release.yaml + workflow_call: + +jobs: + unit-test: + name: Unit tests + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install tox + run: pipx install tox + - name: Run tests + run: tox run -e unit + + sync-docs: + if: ${{ github.event_name != 'pull_request' || startsWith(github.event.pull_request.head.repo.full_name, 'canonical/') }} + uses: ./.github/workflows/sync_docs.yaml + secrets: inherit + permissions: + contents: write # Needed to update tags + pull-requests: write # Need to create PR + + build: + name: Build charms + uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v26.0.0 + with: + cache: true + charmcraft-snap-channel: latest/beta/data-platform # TODO: remove after charmcraft 3.3 stable release + path-to-charm-directory: . diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..e2c40c8 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,56 @@ +# Copyright 2023 Canonical Ltd. +# See LICENSE file for licensing details. +name: Release to Charmhub + +on: + push: + branches: + - main + +jobs: + lib-check: + name: Check libraries + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Check libs + uses: canonical/charming-actions/check-libraries@2.2.3 + with: + credentials: "${{ secrets.CHARMHUB_TOKEN }}" # FIXME: current token will expire in 2023-07-04 + github-token: "${{ secrets.GITHUB_TOKEN }}" + + ci-tests: + needs: + - lib-check + uses: ./.github/workflows/ci.yaml + secrets: inherit + permissions: + contents: write # Needed to login to Discourse + pull-requests: write # Need to create PR + actions: write + + build: + name: Build charm + uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v26.0.0 + with: + charmcraft-snap-channel: latest/beta/data-platform # TODO: remove after charmcraft 3.3 stable release + + release: + name: Release to Charmhub + needs: + - lib-check + - ci-tests + - build + uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v26.0.0 + with: + charmcraft-snap-channel: latest/beta/data-platform # TODO: remove after charmcraft 3.3 stable release + channel: 3/edge + artifact-prefix: ${{ needs.build.outputs.artifact-prefix }} + secrets: + charmhub-token: ${{ secrets.CHARMHUB_TOKEN }} + permissions: + contents: write # Needed to create GitHub release diff --git a/.github/workflows/sync_docs.yaml b/.github/workflows/sync_docs.yaml new file mode 100644 index 0000000..3588f42 --- /dev/null +++ b/.github/workflows/sync_docs.yaml @@ -0,0 +1,29 @@ +name: Sync docs from Discourse + +on: + workflow_dispatch: + schedule: + - cron: '33 0 * * *' # Daily at 00:53 UTC + # Triggered on push to branch "main" by .github/workflows/release.yaml + workflow_call: + +jobs: + sync-docs: + name: Open PR with docs changes + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Open PR with docs changes + uses: canonical/discourse-gatekeeper@main + id: docs-pr + with: + discourse_host: discourse.charmhub.io + discourse_api_username: ${{ secrets.DISCOURSE_API_USERNAME }} + discourse_api_key: ${{ secrets.DISCOURSE_API_KEY }} + github_token: ${{ secrets.GITHUB_TOKEN }} + dry_run: "true" + + - name: Show migrate output + run: echo '${{ steps.docs-pr.outputs.migrate }}' + - name: Show reconcile output + run: echo '${{ steps.docs-pr.outputs.reconcile }}' diff --git a/.gitignore b/.gitignore index 82f9275..a26d707 100644 --- a/.gitignore +++ b/.gitignore @@ -1,162 +1,9 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python +venv/ build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ +*.charm .tox/ -.nox/ .coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/latest/usage/project/#working-with-version-control -.pdm.toml -.pdm-python -.pdm-build/ - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ +__pycache__/ +*.py[cod] +.idea +.vscode/ diff --git a/config.yaml b/config.yaml index f2d25e4..fc26cf0 100644 --- a/config.yaml +++ b/config.yaml @@ -7,7 +7,7 @@ options: It is the string that represents the given test (e.g. "aws_c6a.xlarge_3nodes_"). It is used by the collector to put the final data on the right place. parallel_processes: - default: 2 + default: 1 type: int description: | Number of parallel process managed by the benchmark tool. Minimum is 2. @@ -45,8 +45,4 @@ options: type: int description: | Int, number of seconds we should periodically report interval - workload_profile: - default: "default" - type: string - description: | - The workload profile to be used. + diff --git a/pyproject.toml b/pyproject.toml index 8ff283a..86ee803 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,11 +65,11 @@ parameterized = "^0.9.0" [tool.poetry.group.integration.dependencies] pytest = "^8.3.3" -pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v24.0.6", subdirectory = "python/pytest_plugins/github_secrets"} +pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/github_secrets"} pytest-operator = "^0.37.0" -pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v24.0.6", subdirectory = "python/pytest_plugins/pytest_operator_cache"} -pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v24.0.6", subdirectory = "python/pytest_plugins/pytest_operator_groups"} -pytest-microceph = {git = "https://github.com/canonical/data-platform-workflows", tag = "v24.0.6", subdirectory = "python/pytest_plugins/microceph"} +pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"} +pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"} +pytest-microceph = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/microceph"} juju = "^3.5.2" ops = "^2.17.0" tenacity = "^9.0.0" diff --git a/tests/unit/test_lifecycle.py b/tests/unit/test_lifecycle.py index a8e337f..0d28336 100644 --- a/tests/unit/test_lifecycle.py +++ b/tests/unit/test_lifecycle.py @@ -21,6 +21,7 @@ def __init__( ): super().__init__(peers, this_unit, config_manager) self.config_manager.workload.is_failed = MagicMock(return_value=False) + self.config_manager.is_failed = MagicMock(return_value=False) class MockPeerState: @@ -44,13 +45,6 @@ def test_next_state_clean(): assert lifecycle.next(DPBenchmarkLifecycleTransition.CLEAN) == DPBenchmarkLifecycleState.UNSET -def test_next_state_stop(): - lifecycle = lifecycle_factory(DPBenchmarkLifecycleState.STOPPED) - assert lifecycle.next(DPBenchmarkLifecycleTransition.STOP) == DPBenchmarkLifecycleState.STOPPED - # Check the other condition - assert lifecycle.next(None) == DPBenchmarkLifecycleState.STOPPED - - def test_next_state_prepare(): lifecycle = lifecycle_factory(DPBenchmarkLifecycleState.UNSET) assert ( @@ -68,7 +62,6 @@ def test_next_state_prepare_but_peer_already_prepared(): def test_next_state_prepare_available_as_leader(): lifecycle = lifecycle_factory(DPBenchmarkLifecycleState.UNSET) lifecycle.current = MagicMock(return_value=DPBenchmarkLifecycleState.PREPARING) - assert lifecycle.next(None) == DPBenchmarkLifecycleState.AVAILABLE From b7d43a623237a7720d2ff097d6a059c8a5bae7ee Mon Sep 17 00:00:00 2001 From: Pedro Guimaraes Date: Tue, 14 Jan 2025 16:51:55 +0100 Subject: [PATCH 2/9] Add poetry.lock --- poetry.lock | 134 ++++++++++++++++++++++++++-------------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/poetry.lock b/poetry.lock index bd4ef4a..4e8b8f8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -148,18 +148,18 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "boto3" -version = "1.35.97" +version = "1.35.98" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" groups = ["integration"] files = [ - {file = "boto3-1.35.97-py3-none-any.whl", hash = "sha256:8e49416216a6e3a62c2a0c44fba4dd2852c85472e7b702516605b1363867d220"}, - {file = "boto3-1.35.97.tar.gz", hash = "sha256:7d398f66a11e67777c189d1f58c0a75d9d60f98d0ee51b8817e828930bf19e4e"}, + {file = "boto3-1.35.98-py3-none-any.whl", hash = "sha256:d0224e1499d7189b47aa7f469d96522d98df6f5702fccb20a95a436582ebcd9d"}, + {file = "boto3-1.35.98.tar.gz", hash = "sha256:4b6274b4fe9d7113f978abea66a1f20c8a397c268c9d1b2a6c96b14a256da4a5"}, ] [package.dependencies] -botocore = ">=1.35.97,<1.36.0" +botocore = ">=1.35.98,<1.36.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -168,14 +168,14 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.35.97" +version = "1.35.98" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" groups = ["integration"] files = [ - {file = "botocore-1.35.97-py3-none-any.whl", hash = "sha256:fed4f156b1a9b8ece53738f702ba5851b8c6216b4952de326547f349cc494f14"}, - {file = "botocore-1.35.97.tar.gz", hash = "sha256:88f2fab29192ffe2f2115d5bafbbd823ff4b6eb2774296e03ec8b5b0fe074f61"}, + {file = "botocore-1.35.98-py3-none-any.whl", hash = "sha256:4f1c0b687488663a774ad3a5e81a5f94fae1bcada2364cfdc48482c4dbf794d5"}, + {file = "botocore-1.35.98.tar.gz", hash = "sha256:d11742b3824bdeac3c89eeeaf5132351af41823bbcef8fc15e95c8250b1de09c"}, ] [package.dependencies] @@ -1454,62 +1454,62 @@ markers = {main = "platform_python_implementation != \"PyPy\"", charm-libs = "pl [[package]] name = "pydantic" -version = "1.10.20" +version = "1.10.21" description = "Data validation and settings management using python type hints" optional = false python-versions = ">=3.7" groups = ["main", "charm-libs"] files = [ - {file = "pydantic-1.10.20-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:330d1f27b3e5a93e4b9bf5ceb6a4a4d58286b07be4ae67489413f51be300562f"}, - {file = "pydantic-1.10.20-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7254ddf29252f373c1498e3f3eb7d99b030b01d714de2319e3bf70a18859f597"}, - {file = "pydantic-1.10.20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48b79483845fcdbc286814c8f2921dc65201e3b0db9ce74f8d6589f8eed670fe"}, - {file = "pydantic-1.10.20-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c0665db7058452f1f694e94be1912527430e1e816f69100d653be7506c9816df"}, - {file = "pydantic-1.10.20-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:8f3b3bace9ad31f7cf73a359af74fd0f4ca6774d95df060452f9ac854f992343"}, - {file = "pydantic-1.10.20-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e65c1f00d651b8c186fbf0931d817d3e31fa7789cdfd6097b1787553029ac628"}, - {file = "pydantic-1.10.20-cp310-cp310-win_amd64.whl", hash = "sha256:1c30e3ac1f7361d86eb47cb368281bdf219531a118f6f5a9988ac50ffa5a07a4"}, - {file = "pydantic-1.10.20-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bed9ec215fa46fb4024777d4098816e2779b5c0192c3646aa1766c7527031c7d"}, - {file = "pydantic-1.10.20-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e6fbf8fdc5991560709cb24cebab2e3812b7c8e3eac922a8bf51a531046fb494"}, - {file = "pydantic-1.10.20-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f6d485ef36dcd597f7d6226bf8cb222b3b5a1a9191261b7ec5677b08e9230bc"}, - {file = "pydantic-1.10.20-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:664110d074bfc14432326d59ec51da0c260050935fe7cdb3579d24b02766dd93"}, - {file = "pydantic-1.10.20-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d6efdd3653713c1e24a46ec966e296faf28933da319692e2adbe5bb6d980418"}, - {file = "pydantic-1.10.20-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:604904991eb38e68674892bfea9e9fce6cea62b4d9b9593a2575080842512edb"}, - {file = "pydantic-1.10.20-cp311-cp311-win_amd64.whl", hash = "sha256:875f6b2f99b621c1fcdb3ba947e4a89120c5199ffe873b5c0f81b0668a2b1647"}, - {file = "pydantic-1.10.20-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ef6feab9add46f970cbe5676da7681700ddade1d9aeeb206d61c3e6e47d39e8f"}, - {file = "pydantic-1.10.20-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:31e699a67b53c9a07780caacf662d4bc6eed15cb70b3bc30256cbef000ad6874"}, - {file = "pydantic-1.10.20-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:657f0977327dd41b3e25c2adec81cf58a7e62b868876bef80b9deec38d264428"}, - {file = "pydantic-1.10.20-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abd4726eb30445555fa2e95795af1603af6023d216e9d9f45d940e0f07a1eda7"}, - {file = "pydantic-1.10.20-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:64793e059a9e254a1dd63e70bb946e550ac6ba465e13b9aec40408bc10b038c0"}, - {file = "pydantic-1.10.20-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:88f552e84c27b321310c0bdefe90b5279f5c4255867b4fcbbbdfe8bb86831750"}, - {file = "pydantic-1.10.20-cp312-cp312-win_amd64.whl", hash = "sha256:0a2351eb63b8c7016d30b1d8fa390f4666488a0ed4071972afb63696810ecc8f"}, - {file = "pydantic-1.10.20-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d9041e27b36597a54fbe59c4f8e205748d72d455dfc29e98b5d72d97f7d0c036"}, - {file = "pydantic-1.10.20-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:13262acfdc60b8af048ee27483ebbcbdf5ea3217c8b8e4eede94373c8d65f6a5"}, - {file = "pydantic-1.10.20-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1a58b0b07a8bce4c8fb368435571a8bcf0457332c503055b1bbff5e4e65c13e"}, - {file = "pydantic-1.10.20-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b378c2fd51dc0c475a01c46748a5bcf7d41d23e4620d7622a373d7dab6dc2cf"}, - {file = "pydantic-1.10.20-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:61bcdd86348dd5e268f0f306d8d9c00c0e10f158af53538ce270447e67af88b0"}, - {file = "pydantic-1.10.20-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7fb3d37f29cfa83b00eef518187509044626162511da5367ada03ba29647630f"}, - {file = "pydantic-1.10.20-cp313-cp313-win_amd64.whl", hash = "sha256:64aae7ea5c88db33fabeb3017f8d25f2ebff0244a3db3819c38bdcef42e917d6"}, - {file = "pydantic-1.10.20-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8ac811fade848d35a025a4486b6f5b0205843139e1071d00bfc6ddef3c2edbf0"}, - {file = "pydantic-1.10.20-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f83f852eba6e70a65daf1eb7ea7fc834b6e5ccd4f1f427d6a7f3c06b9a63ef0f"}, - {file = "pydantic-1.10.20-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6dc2d83c46819c12152beba7904362e4da08514591e124d9ec4804b160d199f9"}, - {file = "pydantic-1.10.20-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:d72209eeb68a444481436bdf30cbe5f8b1344c4d0731b61498a09a5c08c53c0e"}, - {file = "pydantic-1.10.20-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:110e5e68e6abc3b4b2520f907d61f927a3e885175e285540e0ea0de5233842ec"}, - {file = "pydantic-1.10.20-cp37-cp37m-win_amd64.whl", hash = "sha256:a6f35e5cf34d753f9d46cd0318f3bf22dc0f7246cbf7ca1ed52a650e5ae50118"}, - {file = "pydantic-1.10.20-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9650ac4b91ceac1d7955841eeb6e40abdfc0c8b330bd73c78a98f30214689bef"}, - {file = "pydantic-1.10.20-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5d75b5f17e308babda1489f2ace450675724b209b4b505d741bf680f48470da9"}, - {file = "pydantic-1.10.20-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c5bbbc02ca58c16072f121d2815682b4b91e36b4924e2583c2700944b1c7059"}, - {file = "pydantic-1.10.20-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a80ab0f842873be331f8915ee70eb64457972a8706785979f98793a34b168029"}, - {file = "pydantic-1.10.20-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:b3c917a4a5108090587cb4988076bf34b381ae4502dcd48cb615b27a2e9c0413"}, - {file = "pydantic-1.10.20-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:73355a1766303e0a77cad2278d105e73ae6b701aae1d9415fbed3f7c43cd5548"}, - {file = "pydantic-1.10.20-cp38-cp38-win_amd64.whl", hash = "sha256:e95bd05a0325301b6e2a05ef65948cbe13fe5abdf870b003fb750effaca25eb4"}, - {file = "pydantic-1.10.20-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:223a913de180e1f12c11509d490a9db553693e3901e48be6600d2bea296087af"}, - {file = "pydantic-1.10.20-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:300bc62548dc714abb1eae786cf8950101d437044b89762a0616b81e829022d9"}, - {file = "pydantic-1.10.20-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7080498fc37d785e755d0d602a4ecc2c62005213b4b138668dd54937bcd536e0"}, - {file = "pydantic-1.10.20-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4ba8067382f3b842a1dd3dd48318dbb43884e0c5987101be2c5b528e7b8e5d24"}, - {file = "pydantic-1.10.20-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:9703ba9ded519b874d2125856a8a8c4230fe57ef13f0b945b56e22f840b3eaec"}, - {file = "pydantic-1.10.20-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:f6ad5b83a480fe28729da2b537d4bef4a013e1879ced7bf79bf389d732eabfe9"}, - {file = "pydantic-1.10.20-cp39-cp39-win_amd64.whl", hash = "sha256:d52e56af3543a5995baef5963b4d5cd3e9d02c6dea6da1e4e9e7430fe4e841f8"}, - {file = "pydantic-1.10.20-py3-none-any.whl", hash = "sha256:cd9c1a6a60d54281defb35292d3f2b70bce1b62fe404fd991688fa146715936a"}, - {file = "pydantic-1.10.20.tar.gz", hash = "sha256:8dbb8fb6f0ee469c197047e5e69f51677f0bf6297619c98c814a22965a5486d4"}, + {file = "pydantic-1.10.21-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:245e486e0fec53ec2366df9cf1cba36e0bbf066af7cd9c974bbbd9ba10e1e586"}, + {file = "pydantic-1.10.21-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6c54f8d4c151c1de784c5b93dfbb872067e3414619e10e21e695f7bb84d1d1fd"}, + {file = "pydantic-1.10.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b64708009cfabd9c2211295144ff455ec7ceb4c4fb45a07a804309598f36187"}, + {file = "pydantic-1.10.21-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8a148410fa0e971ba333358d11a6dea7b48e063de127c2b09ece9d1c1137dde4"}, + {file = "pydantic-1.10.21-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:36ceadef055af06e7756eb4b871cdc9e5a27bdc06a45c820cd94b443de019bbf"}, + {file = "pydantic-1.10.21-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c0501e1d12df6ab1211b8cad52d2f7b2cd81f8e8e776d39aa5e71e2998d0379f"}, + {file = "pydantic-1.10.21-cp310-cp310-win_amd64.whl", hash = "sha256:c261127c275d7bce50b26b26c7d8427dcb5c4803e840e913f8d9df3f99dca55f"}, + {file = "pydantic-1.10.21-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8b6350b68566bb6b164fb06a3772e878887f3c857c46c0c534788081cb48adf4"}, + {file = "pydantic-1.10.21-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:935b19fdcde236f4fbf691959fa5c3e2b6951fff132964e869e57c70f2ad1ba3"}, + {file = "pydantic-1.10.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b6a04efdcd25486b27f24c1648d5adc1633ad8b4506d0e96e5367f075ed2e0b"}, + {file = "pydantic-1.10.21-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c1ba253eb5af8d89864073e6ce8e6c8dec5f49920cff61f38f5c3383e38b1c9f"}, + {file = "pydantic-1.10.21-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:57f0101e6c97b411f287a0b7cf5ebc4e5d3b18254bf926f45a11615d29475793"}, + {file = "pydantic-1.10.21-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:90e85834f0370d737c77a386ce505c21b06bfe7086c1c568b70e15a568d9670d"}, + {file = "pydantic-1.10.21-cp311-cp311-win_amd64.whl", hash = "sha256:6a497bc66b3374b7d105763d1d3de76d949287bf28969bff4656206ab8a53aa9"}, + {file = "pydantic-1.10.21-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2ed4a5f13cf160d64aa331ab9017af81f3481cd9fd0e49f1d707b57fe1b9f3ae"}, + {file = "pydantic-1.10.21-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3b7693bb6ed3fbe250e222f9415abb73111bb09b73ab90d2d4d53f6390e0ccc1"}, + {file = "pydantic-1.10.21-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:185d5f1dff1fead51766da9b2de4f3dc3b8fca39e59383c273f34a6ae254e3e2"}, + {file = "pydantic-1.10.21-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38e6d35cf7cd1727822c79e324fa0677e1a08c88a34f56695101f5ad4d5e20e5"}, + {file = "pydantic-1.10.21-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:1d7c332685eafacb64a1a7645b409a166eb7537f23142d26895746f628a3149b"}, + {file = "pydantic-1.10.21-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c9b782db6f993a36092480eeaab8ba0609f786041b01f39c7c52252bda6d85f"}, + {file = "pydantic-1.10.21-cp312-cp312-win_amd64.whl", hash = "sha256:7ce64d23d4e71d9698492479505674c5c5b92cda02b07c91dfc13633b2eef805"}, + {file = "pydantic-1.10.21-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0067935d35044950be781933ab91b9a708eaff124bf860fa2f70aeb1c4be7212"}, + {file = "pydantic-1.10.21-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5e8148c2ce4894ce7e5a4925d9d3fdce429fb0e821b5a8783573f3611933a251"}, + {file = "pydantic-1.10.21-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a4973232c98b9b44c78b1233693e5e1938add5af18042f031737e1214455f9b8"}, + {file = "pydantic-1.10.21-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:662bf5ce3c9b1cef32a32a2f4debe00d2f4839fefbebe1d6956e681122a9c839"}, + {file = "pydantic-1.10.21-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:98737c3ab5a2f8a85f2326eebcd214510f898881a290a7939a45ec294743c875"}, + {file = "pydantic-1.10.21-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0bb58bbe65a43483d49f66b6c8474424d551a3fbe8a7796c42da314bac712738"}, + {file = "pydantic-1.10.21-cp313-cp313-win_amd64.whl", hash = "sha256:e622314542fb48542c09c7bd1ac51d71c5632dd3c92dc82ede6da233f55f4848"}, + {file = "pydantic-1.10.21-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d356aa5b18ef5a24d8081f5c5beb67c0a2a6ff2a953ee38d65a2aa96526b274f"}, + {file = "pydantic-1.10.21-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08caa8c0468172d27c669abfe9e7d96a8b1655ec0833753e117061febaaadef5"}, + {file = "pydantic-1.10.21-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c677aa39ec737fec932feb68e4a2abe142682f2885558402602cd9746a1c92e8"}, + {file = "pydantic-1.10.21-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:79577cc045d3442c4e845df53df9f9202546e2ba54954c057d253fc17cd16cb1"}, + {file = "pydantic-1.10.21-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:b6b73ab347284719f818acb14f7cd80696c6fdf1bd34feee1955d7a72d2e64ce"}, + {file = "pydantic-1.10.21-cp37-cp37m-win_amd64.whl", hash = "sha256:46cffa24891b06269e12f7e1ec50b73f0c9ab4ce71c2caa4ccf1fb36845e1ff7"}, + {file = "pydantic-1.10.21-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:298d6f765e3c9825dfa78f24c1efd29af91c3ab1b763e1fd26ae4d9e1749e5c8"}, + {file = "pydantic-1.10.21-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f2f4a2305f15eff68f874766d982114ac89468f1c2c0b97640e719cf1a078374"}, + {file = "pydantic-1.10.21-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35b263b60c519354afb3a60107d20470dd5250b3ce54c08753f6975c406d949b"}, + {file = "pydantic-1.10.21-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e23a97a6c2f2db88995496db9387cd1727acdacc85835ba8619dce826c0b11a6"}, + {file = "pydantic-1.10.21-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:3c96fed246ccc1acb2df032ff642459e4ae18b315ecbab4d95c95cfa292e8517"}, + {file = "pydantic-1.10.21-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:b92893ebefc0151474f682e7debb6ab38552ce56a90e39a8834734c81f37c8a9"}, + {file = "pydantic-1.10.21-cp38-cp38-win_amd64.whl", hash = "sha256:b8460bc256bf0de821839aea6794bb38a4c0fbd48f949ea51093f6edce0be459"}, + {file = "pydantic-1.10.21-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5d387940f0f1a0adb3c44481aa379122d06df8486cc8f652a7b3b0caf08435f7"}, + {file = "pydantic-1.10.21-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:266ecfc384861d7b0b9c214788ddff75a2ea123aa756bcca6b2a1175edeca0fe"}, + {file = "pydantic-1.10.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61da798c05a06a362a2f8c5e3ff0341743e2818d0f530eaac0d6898f1b187f1f"}, + {file = "pydantic-1.10.21-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a621742da75ce272d64ea57bd7651ee2a115fa67c0f11d66d9dcfc18c2f1b106"}, + {file = "pydantic-1.10.21-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:9e3e4000cd54ef455694b8be9111ea20f66a686fc155feda1ecacf2322b115da"}, + {file = "pydantic-1.10.21-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:f198c8206640f4c0ef5a76b779241efb1380a300d88b1bce9bfe95a6362e674d"}, + {file = "pydantic-1.10.21-cp39-cp39-win_amd64.whl", hash = "sha256:e7f0cda108b36a30c8fc882e4fc5b7eec8ef584aa43aa43694c6a7b274fb2b56"}, + {file = "pydantic-1.10.21-py3-none-any.whl", hash = "sha256:db70c920cba9d05c69ad4a9e7f8e9e83011abb2c6490e561de9ae24aee44925c"}, + {file = "pydantic-1.10.21.tar.gz", hash = "sha256:64b48e2b609a6c22178a56c408ee1215a7206077ecb8a193e2fda31858b2362a"}, ] [package.dependencies] @@ -1668,8 +1668,8 @@ develop = false [package.source] type = "git" url = "https://github.com/canonical/data-platform-workflows" -reference = "v24.0.6" -resolved_reference = "11c673f692893a15d15ee63469420e91f91f8a95" +reference = "v26.0.0" +resolved_reference = "92d0a9f28a22c57b5965866c22f65b5021d3b115" subdirectory = "python/pytest_plugins/github_secrets" [[package]] @@ -1689,8 +1689,8 @@ pytest = "*" [package.source] type = "git" url = "https://github.com/canonical/data-platform-workflows" -reference = "v24.0.6" -resolved_reference = "11c673f692893a15d15ee63469420e91f91f8a95" +reference = "v26.0.0" +resolved_reference = "92d0a9f28a22c57b5965866c22f65b5021d3b115" subdirectory = "python/pytest_plugins/microceph" [[package]] @@ -1729,8 +1729,8 @@ pyyaml = "*" [package.source] type = "git" url = "https://github.com/canonical/data-platform-workflows" -reference = "v24.0.6" -resolved_reference = "11c673f692893a15d15ee63469420e91f91f8a95" +reference = "v26.0.0" +resolved_reference = "92d0a9f28a22c57b5965866c22f65b5021d3b115" subdirectory = "python/pytest_plugins/pytest_operator_cache" [[package]] @@ -1749,8 +1749,8 @@ pytest = "*" [package.source] type = "git" url = "https://github.com/canonical/data-platform-workflows" -reference = "v24.0.6" -resolved_reference = "11c673f692893a15d15ee63469420e91f91f8a95" +reference = "v26.0.0" +resolved_reference = "92d0a9f28a22c57b5965866c22f65b5021d3b115" subdirectory = "python/pytest_plugins/pytest_operator_groups" [[package]] @@ -2427,4 +2427,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = "^3.10" -content-hash = "e21e17b1f023a503dd04543acadd7764e4e8c477ed2f23710a20e157fd78ed6e" +content-hash = "04d255ca8bda48863c606317698ca40ca78f4bd3c00324d16e304545e512a276" From ed2f6badaf3a91dc50876950e3079f35b7e51b37 Mon Sep 17 00:00:00 2001 From: Pedro Guimaraes Date: Tue, 14 Jan 2025 17:38:59 +0100 Subject: [PATCH 3/9] Minor fix on tox for unit tests --- tox.ini | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tox.ini b/tox.ini index a035fd7..b46e9c1 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,15 @@ set_env = PYTHONPATH = {[vars]src_path}:{tox_root}/lib:{tox_root}/src/benchmark/wrapper PY_COLORS=1 allowlist_externals = + /bin/bash poetry +pass_env = + PYTHONPATH + CHARM_BUILD_DIR + MODEL_SETTINGS +deps = + poetry + [testenv:format] description = Apply coding style standards to code From 83d64850e0f88245fddff1e7d5579c6c5c07dff1 Mon Sep 17 00:00:00 2001 From: Pedro Guimaraes Date: Tue, 14 Jan 2025 17:45:58 +0100 Subject: [PATCH 4/9] Update charmcraft to v3 format --- charmcraft.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/charmcraft.yaml b/charmcraft.yaml index 5e2293b..568be4a 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -3,13 +3,11 @@ type: charm -bases: - - build-on: - - name: "ubuntu" - channel: "22.04" - run-on: - - name: "ubuntu" - channel: "22.04" +platforms: + ubuntu@22.04:amd64: +parts: + charm: + plugin: charm parts: files: From 37d5c41d12daccd5ac3269d4ad34e2f979124db6 Mon Sep 17 00:00:00 2001 From: Pedro Guimaraes Date: Wed, 15 Jan 2025 09:34:53 +0100 Subject: [PATCH 5/9] Add lint back, remove pyright for now and fix minor errors --- .github/workflows/ci.yaml | 33 ++++++++++++++++------ .github/workflows/release.yaml | 16 +---------- charmcraft.yaml | 17 +++++++---- src/benchmark/core/pebble_workload_base.py | 3 +- tox.ini | 3 -- 5 files changed, 39 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 25727e1..c4b4134 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,6 +14,10 @@ on: workflow_call: jobs: + lint: + name: Lint + uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v26.0.0 + unit-test: name: Unit tests runs-on: ubuntu-latest @@ -26,18 +30,31 @@ jobs: - name: Run tests run: tox run -e unit - sync-docs: - if: ${{ github.event_name != 'pull_request' || startsWith(github.event.pull_request.head.repo.full_name, 'canonical/') }} - uses: ./.github/workflows/sync_docs.yaml - secrets: inherit - permissions: - contents: write # Needed to update tags - pull-requests: write # Need to create PR + lib-check: + name: Check libraries + runs-on: ubuntu-22.04 + timeout-minutes: 5 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - run: | + # Workaround for https://github.com/canonical/charmcraft/issues/1389#issuecomment-1880921728 + touch requirements.txt + - name: Check libs + uses: canonical/charming-actions/check-libraries@2.4.0 + with: + charmcraft-channel: latest/beta/data-platform # TODO: remove after charmcraft 3.3 stable release + credentials: ${{ secrets.CHARMHUB_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} + use-labels: false + fail-build: ${{ github.event_name == 'pull_request' }} build: name: Build charms uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v26.0.0 with: - cache: true charmcraft-snap-channel: latest/beta/data-platform # TODO: remove after charmcraft 3.3 stable release path-to-charm-directory: . + cache: false # TODO: change this to true once we are in charmcraftcache-hub diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e2c40c8..a5d0b8c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,21 +8,6 @@ on: - main jobs: - lib-check: - name: Check libraries - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Check libs - uses: canonical/charming-actions/check-libraries@2.2.3 - with: - credentials: "${{ secrets.CHARMHUB_TOKEN }}" # FIXME: current token will expire in 2023-07-04 - github-token: "${{ secrets.GITHUB_TOKEN }}" - ci-tests: needs: - lib-check @@ -38,6 +23,7 @@ jobs: uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v26.0.0 with: charmcraft-snap-channel: latest/beta/data-platform # TODO: remove after charmcraft 3.3 stable release + cache: false release: name: Release to Charmhub diff --git a/charmcraft.yaml b/charmcraft.yaml index 568be4a..35bf7c9 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -1,13 +1,10 @@ -# Copyright 2024 Canonical Ltd. +# Copyright 2025 Canonical Ltd. # See LICENSE file for licensing details. type: charm platforms: ubuntu@22.04:amd64: -parts: - charm: - plugin: charm parts: files: @@ -15,12 +12,22 @@ parts: source: . override-build: | # Ship the charm contents - curl -sSL https://code.launchpad.net/~pguimaraes/openmessaging-benchmark/+git/openmessaging-benchmark/+artifact/280249/+files/openmessaging-benchmark-0.0.1-ubuntu0-20241119152607-linux-x64.tar.gz | tar -zxvf - + # curl -sSL https://code.launchpad.net/~pguimaraes/openmessaging-benchmark/+git/openmessaging-benchmark/+artifact/280249/+files/openmessaging-benchmark-0.0.1-ubuntu0-20241119152607-linux-x64.tar.gz | tar -zxvf - + + # For some reason, getting 23 write error in this curl command. + # moving away to wget + apt update + apt install -y wget + wget https://code.launchpad.net/~pguimaraes/openmessaging-benchmark/+git/openmessaging-benchmark/+artifact/280249/+files/openmessaging-benchmark-0.0.1-ubuntu0-20241119152607-linux-x64.tar.gz + tar -zxvf openmessaging-benchmark-*.tar.gz + mv openmessaging-benchmark-0.0.1-SNAPSHOT/ openmessaging-benchmark/ craftctl default prime: - openmessaging-benchmark + - LICENSE charm: + plugin: charm override-build: | rustup default stable diff --git a/src/benchmark/core/pebble_workload_base.py b/src/benchmark/core/pebble_workload_base.py index 19ae2dd..725240f 100644 --- a/src/benchmark/core/pebble_workload_base.py +++ b/src/benchmark/core/pebble_workload_base.py @@ -11,7 +11,6 @@ from charms.operator_libs_linux.v1.systemd import ( service_restart, - service_stop, ) from overrides import override @@ -88,7 +87,7 @@ def halt(self) -> bool: @override def reload(self) -> bool: """Reloads the workload service.""" - ... + ... @override def read(self, path: str) -> list[str]: diff --git a/tox.ini b/tox.ini index b46e9c1..a1e638d 100644 --- a/tox.ini +++ b/tox.ini @@ -55,9 +55,6 @@ commands = poetry run ruff check {[vars]all_path} poetry run black --check --diff {[vars]all_path} - poetry install --with lint - poetry run pyright - [testenv:unit] description = Run unit tests set_env = From 3ac7e47475b533c97d6bea930c9c6a853eb4fae9 Mon Sep 17 00:00:00 2001 From: Pedro Guimaraes Date: Wed, 15 Jan 2025 09:39:27 +0100 Subject: [PATCH 6/9] Remove mentions to sync_docs --- .github/workflows/sync_docs.yaml | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .github/workflows/sync_docs.yaml diff --git a/.github/workflows/sync_docs.yaml b/.github/workflows/sync_docs.yaml deleted file mode 100644 index 3588f42..0000000 --- a/.github/workflows/sync_docs.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: Sync docs from Discourse - -on: - workflow_dispatch: - schedule: - - cron: '33 0 * * *' # Daily at 00:53 UTC - # Triggered on push to branch "main" by .github/workflows/release.yaml - workflow_call: - -jobs: - sync-docs: - name: Open PR with docs changes - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Open PR with docs changes - uses: canonical/discourse-gatekeeper@main - id: docs-pr - with: - discourse_host: discourse.charmhub.io - discourse_api_username: ${{ secrets.DISCOURSE_API_USERNAME }} - discourse_api_key: ${{ secrets.DISCOURSE_API_KEY }} - github_token: ${{ secrets.GITHUB_TOKEN }} - dry_run: "true" - - - name: Show migrate output - run: echo '${{ steps.docs-pr.outputs.migrate }}' - - name: Show reconcile output - run: echo '${{ steps.docs-pr.outputs.reconcile }}' From 4502e8fa5d53e8d0990f990256392981ec73cba5 Mon Sep 17 00:00:00 2001 From: Pedro Guimaraes Date: Wed, 15 Jan 2025 10:11:13 +0100 Subject: [PATCH 7/9] Add TODO comment to release.yaml --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a5d0b8c..072ef53 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,7 +23,7 @@ jobs: uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v26.0.0 with: charmcraft-snap-channel: latest/beta/data-platform # TODO: remove after charmcraft 3.3 stable release - cache: false + cache: false # TODO: change this to true once we are in charmcraftcache-hub release: name: Release to Charmhub From 43f337371c8652a7c4a95b3e8baf9177a33f899f Mon Sep 17 00:00:00 2001 From: phvalguima Date: Wed, 15 Jan 2025 13:06:13 +0100 Subject: [PATCH 8/9] Update ci.yaml --- .github/workflows/ci.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c4b4134..187d734 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,15 @@ on: jobs: lint: name: Lint - uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v26.0.0 + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install tox + run: pipx install tox + - name: Run linters + run: tox run -e lint unit-test: name: Unit tests From 6a29c1034396e530b63bad24aa8dccff3c1b388c Mon Sep 17 00:00:00 2001 From: phvalguima Date: Fri, 17 Jan 2025 19:17:50 +0100 Subject: [PATCH 9/9] Update release.yaml --- .github/workflows/release.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 072ef53..9def52c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,8 +9,6 @@ on: jobs: ci-tests: - needs: - - lib-check uses: ./.github/workflows/ci.yaml secrets: inherit permissions: @@ -28,13 +26,12 @@ jobs: release: name: Release to Charmhub needs: - - lib-check - ci-tests - build uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v26.0.0 with: charmcraft-snap-channel: latest/beta/data-platform # TODO: remove after charmcraft 3.3 stable release - channel: 3/edge + channel: latest/edge artifact-prefix: ${{ needs.build.outputs.artifact-prefix }} secrets: charmhub-token: ${{ secrets.CHARMHUB_TOKEN }}