Skip to content

Commit d4429f2

Browse files
renovate[bot]dragomirp
authored andcommitted
Lock file maintenance (#321)
* Lock file maintenance * Fix linting * Pin python version * Poetry warning --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Dragomir Penev <dragomir.penev@canonical.com> Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
1 parent e9fbc91 commit d4429f2

File tree

8 files changed

+308
-420
lines changed

8 files changed

+308
-420
lines changed

.github/renovate.json5

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
"reviewers": ["dragomirp", "marceloneppel", "taurus-forever"],
55
"packageRules": [
66
// Later rules override earlier rules
7+
{
8+
"matchPackageNames": ["pydantic"],
9+
"allowedVersions": "<2.0.0"
10+
}, {
11+
"matchPackageNames": ["python"],
12+
"allowedVersions": "<3.11"
13+
}
714
],
815
"regexManagers": [
916
{

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- '.jujuignore'
1414
- 'LICENSE'
1515
- '**.md'
16-
- 'renovate.json'
16+
- .github/renovate.json5
1717
schedule:
1818
- cron: '53 0 * * *' # Daily at 00:53 UTC
1919
# Triggered on push to branch "main" by .github/workflows/release.yaml

.github/workflows/release.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
paths-ignore:
1010
- 'tests/**'
1111
- 'docs/**'
12-
- renovate.json
13-
- poetry.lock
12+
- .github/renovate.json5
1413
- pyproject.toml
1514
- '.github/workflows/ci.yaml'
1615
- '.github/workflows/lib-check.yaml'

poetry.lock

Lines changed: 280 additions & 398 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ homepage = "https://charmhub.io/postgresql-k8s"
1212
repository = "https://github.com/canonical/postgresql-k8s-operator"
1313

1414
[tool.poetry.dependencies]
15-
python = "^3.10.6"
15+
python = "^3.10"
1616
ops = "^2.8.0"
1717
cryptography = "^41.0.5"
1818
boto3 = "^1.28.70"

src/backups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _are_backup_settings_ok(self) -> Tuple[bool, Optional[str]]:
7474
"Relation with s3-integrator charm missing, cannot create/restore backup.",
7575
)
7676

77-
s3_parameters, missing_parameters = self._retrieve_s3_parameters()
77+
_, missing_parameters = self._retrieve_s3_parameters()
7878
if missing_parameters:
7979
return False, f"Missing S3 parameters: {missing_parameters}"
8080

tests/integration/ha_tests/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ async def list_wal_files(ops_test: OpsTest, app: str) -> Set:
474474
files = {}
475475
for unit in units:
476476
complete_command = f"run --unit {unit} -- {command}"
477-
return_code, stdout, stderr = await ops_test.juju(*complete_command.split())
477+
_, stdout, _ = await ops_test.juju(*complete_command.split())
478478
files[unit] = stdout.splitlines()
479479
files[unit] = {
480480
i for i in files[unit] if ".history" not in i and i != "" and i != "archive_status"

tox.ini

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ commands_post =
3434
[testenv:format]
3535
description = Apply coding style standards to code
3636
commands_pre =
37-
poetry install --only format
37+
poetry install --only format --no-root
3838
commands =
3939
poetry lock --no-update
4040
poetry run ruff --fix {[vars]all_path}
@@ -46,7 +46,7 @@ allowlist_externals =
4646
{[testenv]allowlist_externals}
4747
find
4848
commands_pre =
49-
poetry install --only lint,format
49+
poetry install --only lint,format --no-root
5050
commands =
5151
poetry check --lock
5252
poetry run codespell {[vars]all_path}
@@ -61,7 +61,7 @@ set_env =
6161
juju2: LIBJUJU="2.9.44.1"
6262
juju3: LIBJUJU="3.2.0.1"
6363
commands_pre =
64-
poetry install --only main,charm-libs,unit
64+
poetry install --only main,charm-libs,unit --no-root
6565
commands =
6666
poetry run coverage run --source={[vars]src_path} \
6767
-m pytest -v --tb native -s {posargs} {[vars]tests_path}/unit
@@ -80,7 +80,7 @@ pass_env =
8080
allowlist_externals =
8181
{[testenv:pack-wrapper]allowlist_externals}
8282
commands_pre =
83-
poetry install --only integration
83+
poetry install --only integration --no-root
8484
{[testenv:pack-wrapper]commands_pre}
8585
commands =
8686
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_backups.py
@@ -99,7 +99,7 @@ pass_env =
9999
allowlist_externals =
100100
{[testenv:pack-wrapper]allowlist_externals}
101101
commands_pre =
102-
poetry install --only integration
102+
poetry install --only integration --no-root
103103
{[testenv:pack-wrapper]commands_pre}
104104
commands =
105105
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_charm.py
@@ -118,7 +118,7 @@ pass_env =
118118
allowlist_externals =
119119
{[testenv:pack-wrapper]allowlist_externals}
120120
commands_pre =
121-
poetry install --only integration
121+
poetry install --only integration --no-root
122122
{[testenv:pack-wrapper]commands_pre}
123123
commands =
124124
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/new_relations/test_new_relations.py
@@ -137,7 +137,7 @@ pass_env =
137137
allowlist_externals =
138138
{[testenv:pack-wrapper]allowlist_externals}
139139
commands_pre =
140-
poetry install --only integration
140+
poetry install --only integration --no-root
141141
{[testenv:pack-wrapper]commands_pre}
142142
commands =
143143
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_db.py
@@ -156,7 +156,7 @@ pass_env =
156156
allowlist_externals =
157157
{[testenv:pack-wrapper]allowlist_externals}
158158
commands_pre =
159-
poetry install --only integration
159+
poetry install --only integration --no-root
160160
{[testenv:pack-wrapper]commands_pre}
161161
commands =
162162
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_db_admin.py
@@ -175,7 +175,7 @@ pass_env =
175175
allowlist_externals =
176176
{[testenv:pack-wrapper]allowlist_externals}
177177
commands_pre =
178-
poetry install --only integration
178+
poetry install --only integration --no-root
179179
{[testenv:pack-wrapper]commands_pre}
180180
commands =
181181
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_replication.py
@@ -194,7 +194,7 @@ pass_env =
194194
allowlist_externals =
195195
{[testenv:pack-wrapper]allowlist_externals}
196196
commands_pre =
197-
poetry install --only integration
197+
poetry install --only integration --no-root
198198
{[testenv:pack-wrapper]commands_pre}
199199
commands =
200200
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_self_healing.py
@@ -213,7 +213,7 @@ pass_env =
213213
allowlist_externals =
214214
{[testenv:pack-wrapper]allowlist_externals}
215215
commands_pre =
216-
poetry install --only integration
216+
poetry install --only integration --no-root
217217
{[testenv:pack-wrapper]commands_pre}
218218
commands =
219219
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_password_rotation.py
@@ -232,7 +232,7 @@ pass_env =
232232
allowlist_externals =
233233
{[testenv:pack-wrapper]allowlist_externals}
234234
commands_pre =
235-
poetry install --only integration
235+
poetry install --only integration --no-root
236236
{[testenv:pack-wrapper]commands_pre}
237237
commands =
238238
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_plugins.py
@@ -251,7 +251,7 @@ pass_env =
251251
allowlist_externals =
252252
{[testenv:pack-wrapper]allowlist_externals}
253253
commands_pre =
254-
poetry install --only integration
254+
poetry install --only integration --no-root
255255
{[testenv:pack-wrapper]commands_pre}
256256
commands =
257257
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_tls.py
@@ -270,7 +270,7 @@ pass_env =
270270
allowlist_externals =
271271
{[testenv:pack-wrapper]allowlist_externals}
272272
commands_pre =
273-
poetry install --only integration
273+
poetry install --only integration --no-root
274274
{[testenv:pack-wrapper]commands_pre}
275275
commands =
276276
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_upgrade.py
@@ -289,7 +289,7 @@ pass_env =
289289
allowlist_externals =
290290
{[testenv:pack-wrapper]allowlist_externals}
291291
commands_pre =
292-
poetry install --only integration
292+
poetry install --only integration --no-root
293293
{[testenv:pack-wrapper]commands_pre}
294294
commands =
295295
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_upgrade_from_stable.py
@@ -309,7 +309,7 @@ pass_env =
309309
allowlist_externals =
310310
{[testenv:pack-wrapper]allowlist_externals}
311311
commands_pre =
312-
poetry install --only integration
312+
poetry install --only integration --no-root
313313
{[testenv:pack-wrapper]commands_pre}
314314
commands =
315315
poetry run pytest -v --tb native --log-cli-level=INFO -s --ignore={[vars]tests_path}/unit/ {posargs}

0 commit comments

Comments
 (0)