Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency pydantic to v2 #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 9, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
pydantic (changelog) < 2 -> <3 age adoption passing confidence

Release Notes

pydantic/pydantic (pydantic)

v2.9.1: (2024-09-09)

Compare Source

What's Changed

Fixes

Full Changelog: pydantic/pydantic@v2.9.0...v2.9.1

v2.9.0

Compare Source

GitHub release

The code released in v2.9.0 is practically identical to that of v2.9.0b2.

What's Changed
Packaging
New Features
Changes
Performance
Minor Internal Improvements
Fixes
New Contributors
pydantic
pydantic-core

v2.8.2: (2024-07-03)

Compare Source

What's Changed

Fixes

Full Changelog: pydantic/pydantic@v2.8.1...v2.8.2

v2.8.1: (2024-07-03)

Compare Source

What's Changed

Packaging
Fixes

New Contributors

Full Changelog: pydantic/pydantic@v2.8.0...v2.8.1

v2.8.0

Compare Source

GitHub release

The code released in v2.8.0 is functionally identical to that of v2.8.0b1.

What's Changed
Packaging
New Features
Changes
Performance
Internal Improvements
Fixes
New Contributors

v2.7.4

Compare Source

Github release

What's Changed
Packaging
Fixes

v2.7.3

Compare Source

GitHub release

What's Changed
Packaging
Fixes

v2.7.2

Compare Source

GitHub release

What's Changed
Packaging
Fixes

v2.7.1

Compare Source

GitHub release

What's Changed
Packaging
New Features
Changes
Fixes
New Contributors

v2.7.0

Compare Source

GitHub release

The code released in v2.7.0 is practically identical to that of v2.7.0b1.

What's Changed
Packaging
New Features

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner September 9, 2024 07:33
Copy link

github-actions bot commented Sep 9, 2024

Lint checks failed for b9cc6f8

```

src/github_runner_manager/metrics/runner.py:49: error: Unexpected keyword argument "regex" for "Field" [call-arg]
.tox/lint/lib/python3.10/site-packages/pydantic/fields.py:685: note: "Field" defined here
Found 1 error in 1 file (checked 46 source files)

Copy link

github-actions bot commented Sep 9, 2024

Unit tests failed for b9cc6f8

```

============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.3.2, pluggy-1.5.0 -- /home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/bin/python
cachedir: .tox/unit/.pytest_cache
rootdir: /home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager
configfile: pyproject.toml
collecting ... collected 32 items / 3 errors

==================================== ERRORS ====================================
______________ ERROR collecting tests/unit/metrics/test_github.py ______________
Traceback (most recent call last):
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 341, in from_call
result: TResult | None = func()
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 389, in collect
return list(collector.collect())
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 549, in collect
self._register_setup_module_fixture()
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 562, in _register_setup_module_fixture
self.obj, ("setUpModule", "setup_module")
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 284, in obj
self._obj = obj = self._getobj()
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 546, in _getobj
return importtestmodule(self.path, self.config)
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 493, in importtestmodule
mod = import_path(
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/pathlib.py", line 582, in import_path
importlib.import_module(module_name)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 174, in exec_module
exec(co, module.dict)
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/tests/unit/metrics/test_github.py", line 12, in
from github_runner_manager.metrics import github as github_metrics
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/src/github_runner_manager/metrics/github.py", line 9, in
from github_runner_manager.metrics.runner import PreJobMetrics
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/src/github_runner_manager/metrics/runner.py", line 35, in
class PreJobMetrics(BaseModel):
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/src/github_runner_manager/metrics/runner.py", line 49, in PreJobMetrics
repository: str = Field(None, regex=r"^.+/.+$")
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/pydantic/fields.py", line 823, in Field
raise PydanticUserError('regex is removed. use pattern instead', code='removed-kwargs')
pydantic.errors.PydanticUserError: regex is removed. use pattern instead

For further information visit https://errors.pydantic.dev/2.9/u/removed-kwargs
______________ ERROR collecting tests/unit/metrics/test_runner.py ______________
Traceback (most recent call last):
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 341, in from_call
result: TResult | None = func()
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 389, in collect
return list(collector.collect())
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 549, in collect
self._register_setup_module_fixture()
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 562, in _register_setup_module_fixture
self.obj, ("setUpModule", "setup_module")
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 284, in obj
self._obj = obj = self._getobj()
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 546, in _getobj
return importtestmodule(self.path, self.config)
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 493, in importtestmodule
mod = import_path(
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/pathlib.py", line 582, in import_path
importlib.import_module(module_name)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 174, in exec_module
exec(co, module.dict)
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/tests/unit/metrics/test_runner.py", line 12, in
from github_runner_manager.metrics import runner as runner_metrics
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/src/github_runner_manager/metrics/runner.py", line 35, in
class PreJobMetrics(BaseModel):
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/src/github_runner_manager/metrics/runner.py", line 49, in PreJobMetrics
repository: str = Field(None, regex=r"^.+/.+$")
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/pydantic/fields.py", line 823, in Field
raise PydanticUserError('regex is removed. use pattern instead', code='removed-kwargs')
pydantic.errors.PydanticUserError: regex is removed. use pattern instead

For further information visit https://errors.pydantic.dev/2.9/u/removed-kwargs
______________ ERROR collecting tests/unit/test_runner_scaler.py _______________
Traceback (most recent call last):
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 341, in from_call
result: TResult | None = func()
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 389, in collect
return list(collector.collect())
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 549, in collect
self._register_setup_module_fixture()
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 562, in _register_setup_module_fixture
self.obj, ("setUpModule", "setup_module")
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 284, in obj
self._obj = obj = self._getobj()
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 546, in _getobj
return importtestmodule(self.path, self.config)
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 493, in importtestmodule
mod = import_path(
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/pathlib.py", line 582, in import_path
importlib.import_module(module_name)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 174, in exec_module
exec(co, module.dict)
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/tests/unit/test_runner_scaler.py", line 10, in
from github_runner_manager.manager.cloud_runner_manager import CloudRunnerState, InstanceId
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/src/github_runner_manager/manager/cloud_runner_manager.py", line 12, in
from github_runner_manager.metrics.runner import RunnerMetrics
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/src/github_runner_manager/metrics/runner.py", line 35, in
class PreJobMetrics(BaseModel):
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/src/github_runner_manager/metrics/runner.py", line 49, in PreJobMetrics
repository: str = Field(None, regex=r"^.+/.+$")
File "/home/ubuntu/actions-runner/_work/github-runner-manager/github-runner-manager/.tox/unit/lib/python3.10/site-packages/pydantic/fields.py", line 823, in Field
raise PydanticUserError('regex is removed. use pattern instead', code='removed-kwargs')
pydantic.errors.PydanticUserError: regex is removed. use pattern instead

For further information visit https://errors.pydantic.dev/2.9/u/removed-kwargs
=============================== warnings summary ===============================
src/github_runner_manager/types_/init.py:54
/home/ubuntu/actions-runner/work/github-runner-manager/github-runner-manager/src/github_runner_manager/types/init.py:54: PydanticDeprecatedSince20: Pydantic V1 style @validator validators are deprecated. You should migrate to Pydantic V2 style @field_validator validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.9/migration/
@validator("use_aproxy")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
ERROR tests/unit/metrics/test_github.py - pydantic.errors.PydanticUserError: regex is removed. use pattern instead
ERROR tests/unit/metrics/test_runner.py - pydantic.errors.PydanticUserError: regex is removed. use pattern instead
ERROR tests/unit/test_runner_scaler.py - pydantic.errors.PydanticUserError: regex is removed. use pattern instead
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!
========================= 1 warning, 3 errors in 0.48s =========================

Copy link

github-actions bot commented Sep 9, 2024

Test coverage for b9cc6f8

Name                                                         Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------------------------------------------------------
src/github_runner_manager/__init__.py                            0      0      0      0   100%
src/github_runner_manager/errors.py                             22      0      0      0   100%
src/github_runner_manager/github_client.py                      83     55     34      0    24%   63-72, 86-87, 100-135, 148-157, 171-180, 191-198, 218-260
src/github_runner_manager/manager/__init__.py                    0      0      0      0   100%
src/github_runner_manager/manager/cloud_runner_manager.py       54     48      6      0    10%   13-201
src/github_runner_manager/manager/github_runner_manager.py      17     17      6      0     0%   6-44
src/github_runner_manager/manager/runner_manager.py            134    134     48      0     0%   6-366
src/github_runner_manager/manager/runner_scaler.py              95     95     32      0     0%   6-211
src/github_runner_manager/metrics/__init__.py                    0      0      0      0   100%
src/github_runner_manager/metrics/events.py                     55     15      8      0    63%   40-46, 56-59, 163-167
src/github_runner_manager/metrics/github.py                     16     12      0      0    25%   10-53
src/github_runner_manager/metrics/runner.py                    144    121     32      0    13%   50-468
src/github_runner_manager/metrics/runner_logs.py                24     13      4      0    39%   30-33, 38-52
src/github_runner_manager/metrics/storage.py                    70     44     12      0    34%   68, 86-101, 110-120, 135-139, 151-156, 171-190
src/github_runner_manager/metrics/type.py                        5      0      0      0   100%
src/github_runner_manager/openstack_cloud/__init__.py           26     14      2      0    43%   43-49, 58-59, 73-78
src/github_runner_manager/reactive/__init__.py                   0      0      0      0   100%
src/github_runner_manager/reactive/consumer.py                  40     20      6      0    43%   49-63, 75-79, 89-103, 112
src/github_runner_manager/reactive/runner.py                    18     18      6      0     0%   6-50
src/github_runner_manager/reactive/runner_manager.py            53     31     14      0    33%   53-78, 90-94, 103-105, 115-143
src/github_runner_manager/types_/__init__.py                    33     10      4      0    62%   39-52, 69-72, 80
src/github_runner_manager/types_/github.py                      72      9     10      0    82%   186, 207, 228-235
src/github_runner_manager/utilities.py                          46     33     14      0    22%   47-104, 127-145, 157-158
--------------------------------------------------------------------------------------------------------
TOTAL                                                         1007    689    238      0    26%
Coverage failure: total of 26 is less than fail-under=79

Static code analysis report

Run started:2024-09-09 07:51:46.707475

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 3596
  Total lines skipped (#nosec): 2
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 3

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@renovate renovate bot changed the title Update dependency pydantic to v2 chore(deps): update dependency pydantic to v2 Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants