Skip to content

Commit

Permalink
[DPE-5612] Update shared workflows version (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
Batalex authored Oct 16, 2024
1 parent 75eb877 commit a4d7885
Show file tree
Hide file tree
Showing 6 changed files with 542 additions and 484 deletions.
39 changes: 22 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,20 @@ concurrency:
on:
pull_request:
schedule:
- cron: '53 0 * * *' # Daily at 00:53 UTC
- cron: "53 0 * * *" # Daily at 00:53 UTC
# Triggered on push to branch "main" by .github/workflows/release.yaml
workflow_call:


jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install tox
# TODO: Consider replacing with custom image on self-hosted runner OR pinning version
run: python3 -m pip install tox
run: pipx install tox
- name: Run linters
run: tox run -e lint

Expand All @@ -34,16 +32,23 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install tox
# TODO: Consider replacing with custom image on self-hosted runner OR pinning version
run: python3 -m pip install tox
run: pipx install tox
- name: Run tests
run: tox run -e unit

build:
name: Build charms
uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v7
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
cache: true
path-to-charm-directory: ${{ matrix.path }}
strategy:
matrix:
path:
- .
- tests/integration/app-charm

integration-test:
strategy:
Expand All @@ -65,19 +70,19 @@ jobs:
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup operator environment
# TODO: Replace with custom image on self-hosted runner
uses: charmed-kubernetes/actions-operator@main
with:
provider: microk8s
channel: "1.28-strict/stable"
juju-channel: 3.1/stable
bootstrap-options: "--agent-version 3.1.6"
- name: Download packed charm(s)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.artifact-name }}
pattern: packed-charm-cache-true-*
merge-multiple: true
- name: Select tests
id: select-tests
run: |
Expand Down Expand Up @@ -110,19 +115,19 @@ jobs:
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup operator environment
# TODO: Replace with custom image on self-hosted runner
uses: charmed-kubernetes/actions-operator@main
with:
provider: microk8s
channel: "1.28-strict/stable"
juju-channel: 3.1/stable
bootstrap-options: "--agent-version 3.1.6"
- name: Download packed charm(s)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.artifact-name }}
pattern: packed-charm-cache-true-*
merge-multiple: true
- name: Select tests
id: select-tests
run: |
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,21 @@ jobs:

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm_without_cache.yaml@v7
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
cache: false

release:
name: Release to Charmhub
needs:
- lib-check
- ci-tests
- build
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v7
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v22.0.0
with:
channel: 3/edge
artifact-name: ${{ needs.build.outputs.artifact-name }}
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
secrets:
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }}
permissions:
contents: write # Needed to create GitHub release
contents: write # Needed to create GitHub release
927 changes: 483 additions & 444 deletions poetry.lock

Large diffs are not rendered by default.

18 changes: 15 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ package-mode = false

[tool.poetry.dependencies]
python = "^3.10"
ops = "^2.4.1"
ops = "^2.17.0"
kazoo = ">=2.8.0,<2.10.0"
tenacity = ">=8.0.1"
pure-sasl = ">=0.6.2"
Expand All @@ -50,6 +50,18 @@ boto3-stubs = {extras = ["s3"], version = "^1.35.8"}
httpx = "^0.27.2"
rich = "^13.8.1"

[tool.poetry.group.charm-libs.dependencies]
# data_platform_libs/v0/data_interfaces.py
ops = ">=2.0.0"
# data_platform_libs/v0/upgrade.py
# grafana_agent/v0/cos_agent.py requires pydantic <2
poetry-core = "*"
pydantic = "^1.10, <2"
# tls_certificates_interface/v1/tls_certificates.py
# tls_certificates lib uses a feature only available in cryptography >=42.0.5
cryptography = ">=42.0.5"
jsonschema = "*"

[tool.poetry.group.fmt]
optional = true

Expand Down Expand Up @@ -89,10 +101,10 @@ pytest-operator = ">0.20"
requests = ">2.25"
kazoo = ">=2.8"
jsonschema = ">=4.10"
pytest-operator-cache = { git = "https://github.com/canonical/data-platform-workflows", tag = "v20.0.2", subdirectory = "python/pytest_plugins/pytest_operator_cache" }
pytest-operator-cache = { git = "https://github.com/canonical/data-platform-workflows", tag = "v22.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache" }
# To be enabled if we are using groups on integration tests
# pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v6.1.1", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
pytest-microceph = { git = "https://github.com/canonical/data-platform-workflows", tag = "v20.0.2", subdirectory = "python/pytest_plugins/microceph" }
pytest-microceph = { git = "https://github.com/canonical/data-platform-workflows", tag = "v22.0.0", subdirectory = "python/pytest_plugins/microceph" }

[tool.poetry.group.format.dependencies]
pyright = "^1.1.301"
Expand Down
30 changes: 15 additions & 15 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
anyio==4.4.0 ; python_version >= "3.10" and python_version < "4.0"
anyio==4.6.2.post1 ; python_version >= "3.10" and python_version < "4.0"
attrs==24.2.0 ; python_version >= "3.10" and python_version < "4.0"
boto3-stubs[s3]==1.35.18 ; python_version >= "3.10" and python_version < "4.0"
boto3==1.35.18 ; python_version >= "3.10" and python_version < "4.0"
botocore-stubs==1.35.18 ; python_version >= "3.10" and python_version < "4.0"
botocore==1.35.18 ; python_version >= "3.10" and python_version < "4.0"
boto3-stubs[s3]==1.35.40 ; python_version >= "3.10" and python_version < "4.0"
boto3==1.35.40 ; python_version >= "3.10" and python_version < "4.0"
botocore-stubs==1.35.40 ; python_version >= "3.10" and python_version < "4.0"
botocore==1.35.40 ; python_version >= "3.10" and python_version < "4.0"
certifi==2024.8.30 ; python_version >= "3.10" and python_version < "4.0"
cffi==1.17.1 ; python_version >= "3.10" and python_version < "4.0" and platform_python_implementation != "PyPy"
cosl==0.0.33 ; python_version >= "3.10" and python_version < "4.0"
cosl==0.0.41 ; python_version >= "3.10" and python_version < "4.0"
cryptography==43.0.1 ; python_version >= "3.10" and python_version < "4.0"
exceptiongroup==1.2.2 ; python_version >= "3.10" and python_version < "3.11"
h11==0.14.0 ; python_version >= "3.10" and python_version < "4.0"
httpcore==1.0.5 ; python_version >= "3.10" and python_version < "4.0"
httpcore==1.0.6 ; python_version >= "3.10" and python_version < "4.0"
httpx==0.27.2 ; python_version >= "3.10" and python_version < "4.0"
idna==3.8 ; python_version >= "3.10" and python_version < "4.0"
idna==3.10 ; python_version >= "3.10" and python_version < "4.0"
jmespath==1.0.1 ; python_version >= "3.10" and python_version < "4.0"
jsonschema-specifications==2023.12.1 ; python_version >= "3.10" and python_version < "4.0"
jsonschema-specifications==2024.10.1 ; python_version >= "3.10" and python_version < "4.0"
jsonschema==4.23.0 ; python_version >= "3.10" and python_version < "4.0"
kazoo==2.9.0 ; python_version >= "3.10" and python_version < "4.0"
lightkube-models==1.31.1.8 ; python_version >= "3.10" and python_version < "4.0"
lightkube==0.15.4 ; python_version >= "3.10" and python_version < "4.0"
markdown-it-py==3.0.0 ; python_version >= "3.10" and python_version < "4.0"
mdurl==0.1.2 ; python_version >= "3.10" and python_version < "4.0"
mypy-boto3-s3==1.35.16 ; python_version >= "3.10" and python_version < "4.0"
ops==2.16.1 ; python_version >= "3.10" and python_version < "4.0"
mypy-boto3-s3==1.35.32 ; python_version >= "3.10" and python_version < "4.0"
ops==2.17.0 ; python_version >= "3.10" and python_version < "4.0"
pure-sasl==0.6.2 ; python_version >= "3.10" and python_version < "4.0"
pycparser==2.22 ; python_version >= "3.10" and python_version < "4.0" and platform_python_implementation != "PyPy"
pydantic==1.10.18 ; python_version >= "3.10" and python_version < "4.0"
pygments==2.18.0 ; python_version >= "3.10" and python_version < "4.0"
python-dateutil==2.9.0.post0 ; python_version >= "3.10" and python_version < "4.0"
pyyaml==6.0.2 ; python_version >= "3.10" and python_version < "4.0"
referencing==0.35.1 ; python_version >= "3.10" and python_version < "4.0"
rich==13.8.1 ; python_version >= "3.10" and python_version < "4.0"
rich==13.9.2 ; python_version >= "3.10" and python_version < "4.0"
rpds-py==0.18.1 ; python_version >= "3.10" and python_version < "4.0"
s3transfer==0.10.2 ; python_version >= "3.10" and python_version < "4.0"
s3transfer==0.10.3 ; python_version >= "3.10" and python_version < "4.0"
six==1.16.0 ; python_version >= "3.10" and python_version < "4.0"
sniffio==1.3.1 ; python_version >= "3.10" and python_version < "4.0"
tenacity==9.0.0 ; python_version >= "3.10" and python_version < "4.0"
types-awscrt==0.21.5 ; python_version >= "3.10" and python_version < "4.0"
types-s3transfer==0.10.2 ; python_version >= "3.10" and python_version < "4.0"
types-awscrt==0.22.0 ; python_version >= "3.10" and python_version < "4.0"
types-s3transfer==0.10.3 ; python_version >= "3.10" and python_version < "4.0"
typing-extensions==4.12.2 ; python_version >= "3.10" and python_version < "4.0"
urllib3==2.2.3 ; python_version >= "3.10" and python_version < "4.0"
websocket-client==1.8.0 ; python_version >= "3.10" and python_version < "4.0"
2 changes: 1 addition & 1 deletion tests/unit/scenario/test_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import pytest
import yaml
from ops.testing import ActionFailed
from scenario import Container, Context, PeerRelation, Relation, State
from scenario.state import ActionFailed

from charm import ZooKeeperCharm
from literals import (
Expand Down

0 comments on commit a4d7885

Please sign in to comment.