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

Update CI dependencies (master) (minor) #2105

Merged
merged 2 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ repos:
- c2cciutils/schema-applications.json
- applications.md
- repo: https://github.com/sbrunner/hooks
rev: 1.1.2
rev: 1.2.1
hooks:
- id: copyright
- id: poetry-lock
Expand All @@ -63,7 +63,7 @@ repos:
- pipenv==2024.4.1 # pypi
- id: helm-lock
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.1
hooks:
- id: codespell
exclude: |-
Expand All @@ -80,7 +80,7 @@ repos:
hooks:
- id: git-check
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
rev: 0.31.1
hooks:
- id: check-github-actions
- id: check-github-workflows
Expand All @@ -93,7 +93,7 @@ repos:
- --builtin-schema
- github-workflows-require-timeout
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 39.91.4
rev: 39.156.0
hooks:
- id: renovate-config-validator
- repo: https://github.com/sirwart/ripsecrets
Expand All @@ -102,13 +102,13 @@ repos:
- id: ripsecrets

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.4
hooks:
- id: ruff-format
args:
- --line-length=110
- repo: https://github.com/PyCQA/prospector
rev: v1.13.3
rev: 1.14.0
hooks:
- id: prospector
args:
Expand All @@ -117,8 +117,8 @@ repos:
- --output-format=pylint
additional_dependencies:
- prospector-profile-duplicated==1.10.4 # pypi
- prospector-profile-utils==1.15.1 # pypi
- ruff==0.8.6 # pypi
- prospector-profile-utils==1.17.0 # pypi
- ruff==0.9.4 # pypi
- repo: https://github.com/mheap/json-schema-spell-checker
rev: main
hooks:
Expand Down
14 changes: 7 additions & 7 deletions c2cciutils/lib/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ def _render_claims(token: str) -> str:

If a claim is not present in the claim set, then it is rendered as `MISSING`.

* `sub`: `{claims.get('sub', 'MISSING')}`
* `repository`: `{claims.get('repository', 'MISSING')}`
* `repository_owner`: `{claims.get('repository_owner', 'MISSING')}`
* `repository_owner_id`: `{claims.get('repository_owner_id', 'MISSING')}`
* `job_workflow_ref`: `{claims.get('job_workflow_ref', 'MISSING')}`
* `ref`: `{claims.get('ref')}`
* `sub`: `{claims.get("sub", "MISSING")}`
* `repository`: `{claims.get("repository", "MISSING")}`
* `repository_owner`: `{claims.get("repository_owner", "MISSING")}`
* `repository_owner_id`: `{claims.get("repository_owner_id", "MISSING")}`
* `job_workflow_ref`: `{claims.get("job_workflow_ref", "MISSING")}`
* `ref`: `{claims.get("ref")}`

See https://docs.pypi.org/trusted-publishers/troubleshooting/ for more help.
"""
Expand Down Expand Up @@ -112,7 +112,7 @@ def _get_token(hostname: str) -> str:
# occurred during minting.
if not mint_token_resp.ok:
reasons = "\n".join(
f'* `{error["code"]}`: {error["description"]}'
f"* `{error['code']}`: {error['description']}"
for error in mint_token_payload["errors"] # noqa: W604
)

Expand Down
12 changes: 6 additions & 6 deletions c2cciutils/scripts/k8s/wait.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
def _check_deployment_status(deployments: Any) -> bool:
for deployment in deployments["items"]:
if not deployment["status"]:
print(f'Waiting status for {deployment["metadata"]["name"]}')
print(f"Waiting status for {deployment['metadata']['name']}")
return False

for condition in deployment["status"].get("conditions", []):
if not condition["status"]:
print(
f'::group::Deployment {deployment["metadata"]["name"]} not ready: {condition["message"]}'
f"::group::Deployment {deployment['metadata']['name']} not ready: {condition['message']}"
)
print(json.dumps(condition, indent=4))
print("::endgroup::")
return False

if deployment["status"].get("unavailableReplicas", 0) != 0:
print(
f'::group::Deployment {deployment["metadata"]["name"]} not ready there is {deployment["status"].get("unavailableReplicas", 0)} '
f"::group::Deployment {deployment['metadata']['name']} not ready there is {deployment['status'].get('unavailableReplicas', 0)} "
"unavailable replicas"
)
print(json.dumps(deployment["status"], indent=4))
Expand Down Expand Up @@ -54,7 +54,7 @@ def _check_container_status(pod: Any, status: Any, is_init: bool = False) -> boo
status_message = status_message.strip()
if status_message == "Completed":
return True
print(f'::group::Container not ready in {pod["metadata"]["name"]}: {status_message}') # noqa: E713
print(f"::group::Container not ready in {pod['metadata']['name']}: {status_message}") # noqa: E713
if status_message_long != status_message:
print(status_message_long)
print(json.dumps(status, indent=4))
Expand All @@ -68,7 +68,7 @@ def _check_pod_status(pods: Any) -> bool:
for condition in pod["status"].get("conditions", []):
if not condition["status"]:
print(
f'::group::Pod not ready in {pod["metadata"]["name"]}: {condition.get("message", condition["type"])}' # noqa: E713
f"::group::Pod not ready in {pod['metadata']['name']}: {condition.get('message', condition['type'])}" # noqa: E713
)
print(json.dumps(condition, indent=4))
print("::endgroup::")
Expand All @@ -82,7 +82,7 @@ def _check_pod_status(pods: Any) -> bool:
return False

if pod["status"].get("phase") not in ("Running", "Succeeded"):
print(f'::group::The Pod {pod["metadata"]["name"]} is not ready: {pod["status"].get("phase")}')
print(f"::group::The Pod {pod['metadata']['name']} is not ready: {pod['status'].get('phase')}")
return False

return True
Expand Down
Loading