c2cciutils 1.8.0.dev49__tar.gz → 1.8.0.dev51__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of c2cciutils might be problematic. Click here for more details.

Files changed (36) hide show
  1. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/PKG-INFO +1 -1
  2. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/applications-versions.yaml +2 -2
  3. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/lib/oidc.py +7 -7
  4. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/package-lock.json +4 -4
  5. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/package.json +1 -1
  6. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/publish.py +5 -5
  7. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/docker_logs.py +3 -3
  8. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/k8s/wait.py +6 -6
  9. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/trigger_image_update.py +1 -1
  10. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/pyproject.toml +5 -5
  11. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/LICENSE +0 -0
  12. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/README.md +0 -0
  13. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/__init__.py +0 -0
  14. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/applications.yaml +0 -0
  15. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/applications_definition.py +0 -0
  16. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/branches.graphql +0 -0
  17. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/commits.graphql +0 -0
  18. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/configuration.py +0 -0
  19. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/default_branch.graphql +0 -0
  20. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/env.py +0 -0
  21. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/lib/docker.py +0 -0
  22. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/schema-applications.json +0 -0
  23. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/schema.json +0 -0
  24. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/__init__.py +0 -0
  25. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/clean.py +0 -0
  26. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/docker_versions_gen.py +0 -0
  27. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/download_applications.py +0 -0
  28. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/env.py +0 -0
  29. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/k8s/__init__.py +0 -0
  30. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/k8s/db.py +0 -0
  31. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/k8s/install.py +0 -0
  32. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/k8s/logs.py +0 -0
  33. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/main.py +0 -0
  34. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/pin_pipenv.py +0 -0
  35. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/publish.py +0 -0
  36. {c2cciutils-1.8.0.dev49 → c2cciutils-1.8.0.dev51}/c2cciutils/scripts/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: c2cciutils
3
- Version: 1.8.0.dev49
3
+ Version: 1.8.0.dev51
4
4
  Summary: Common utilities for Camptocamp CI
5
5
  Home-page: https://github.com/camptocamp/c2cciutils
6
6
  License: FreeBSD
@@ -1,4 +1,4 @@
1
1
  # https://docs.renovatebot.com/modules/datasource/#github-releases-datasource
2
- k3d-io/k3d: v5.7.5 # github-releases
3
- postgresql: 16.3.5 # helm - https://charts.bitnami.com/bitnami
2
+ k3d-io/k3d: v5.8.1 # github-releases
3
+ postgresql: 16.4.5 # helm - https://charts.bitnami.com/bitnami
4
4
  helm/chart-releaser: v1.7.0 # github-releases
@@ -45,12 +45,12 @@ use them to configure a trusted publisher unless they already match your expecta
45
45
 
46
46
  If a claim is not present in the claim set, then it is rendered as `MISSING`.
47
47
 
48
- * `sub`: `{claims.get('sub', 'MISSING')}`
49
- * `repository`: `{claims.get('repository', 'MISSING')}`
50
- * `repository_owner`: `{claims.get('repository_owner', 'MISSING')}`
51
- * `repository_owner_id`: `{claims.get('repository_owner_id', 'MISSING')}`
52
- * `job_workflow_ref`: `{claims.get('job_workflow_ref', 'MISSING')}`
53
- * `ref`: `{claims.get('ref')}`
48
+ * `sub`: `{claims.get("sub", "MISSING")}`
49
+ * `repository`: `{claims.get("repository", "MISSING")}`
50
+ * `repository_owner`: `{claims.get("repository_owner", "MISSING")}`
51
+ * `repository_owner_id`: `{claims.get("repository_owner_id", "MISSING")}`
52
+ * `job_workflow_ref`: `{claims.get("job_workflow_ref", "MISSING")}`
53
+ * `ref`: `{claims.get("ref")}`
54
54
 
55
55
  See https://docs.pypi.org/trusted-publishers/troubleshooting/ for more help.
56
56
  """
@@ -112,7 +112,7 @@ You can monitor PyPI's status here: https://status.python.org/
112
112
  # occurred during minting.
113
113
  if not mint_token_resp.ok:
114
114
  reasons = "\n".join(
115
- f'* `{error["code"]}`: {error["description"]}'
115
+ f"* `{error['code']}`: {error['description']}"
116
116
  for error in mint_token_payload["errors"] # noqa: W604
117
117
  )
118
118
 
@@ -8,7 +8,7 @@
8
8
  "name": "c2ccicheck",
9
9
  "version": "1.0.0",
10
10
  "dependencies": {
11
- "snyk": "1.1294.3"
11
+ "snyk": "1.1295.2"
12
12
  }
13
13
  },
14
14
  "node_modules/@sentry-internal/tracing": {
@@ -332,9 +332,9 @@
332
332
  }
333
333
  },
334
334
  "node_modules/snyk": {
335
- "version": "1.1294.3",
336
- "resolved": "https://registry.npmjs.org/snyk/-/snyk-1.1294.3.tgz",
337
- "integrity": "sha512-ZF+F2bv293HmpFxZCV0x8hT3rQGOl6rPDoJq/TqBT1i5/nZypfn8v4A1Q4m6zUSUs1g6WJsS8QR5wTlR/eSvMQ==",
335
+ "version": "1.1295.2",
336
+ "resolved": "https://registry.npmjs.org/snyk/-/snyk-1.1295.2.tgz",
337
+ "integrity": "sha512-Unl6HD/XF2DfDEj4pySiQF5bUkc6yS/tljtO9LHgjJjfj4CRGZdNs2HmtfEJHsnda3pqBEUO71L7PXhgouzYGw==",
338
338
  "hasInstallScript": true,
339
339
  "license": "Apache-2.0",
340
340
  "dependencies": {
@@ -4,6 +4,6 @@
4
4
  "description": "",
5
5
  "author": "",
6
6
  "dependencies": {
7
- "snyk": "1.1294.3"
7
+ "snyk": "1.1295.2"
8
8
  }
9
9
  }
@@ -28,7 +28,7 @@ class GoogleCalendar:
28
28
  def __init__(self) -> None:
29
29
  """Initialize."""
30
30
  self.scopes = ["https://www.googleapis.com/auth/calendar"] # in fact it is better to hard-code this
31
- self.credentials_pickle_file = os.environ.get("TMP_CREDS_FILE", f"/tmp/{uuid.uuid4()}.pickle") # noqa: S108
31
+ self.credentials_pickle_file = os.environ.get("TMP_CREDS_FILE", f"/tmp/{uuid.uuid4()}.pickle") # noqa: S108 # nosec
32
32
  self.credentials_json_file = os.environ.get(
33
33
  "GOOGLE_CREDS_JSON_FILE", "~/google-credentials-c2cibot.json"
34
34
  ) # used to refresh the refresh_token or to initialize the credentials the first time
@@ -62,7 +62,7 @@ class GoogleCalendar:
62
62
  # time.
63
63
  if os.path.exists(self.credentials_pickle_file):
64
64
  with open(self.credentials_pickle_file, "rb") as token:
65
- creds = pickle.load(token) # noqa: S301
65
+ creds = pickle.load(token) # noqa: S301 # nosec
66
66
  # If there are no (valid) credentials available, let the user log in.
67
67
  if not creds or not creds.valid: # pylint: disable=possibly-used-before-assignment
68
68
  if creds and creds.expired and creds.refresh_token:
@@ -99,7 +99,7 @@ class GoogleCalendar:
99
99
  # list all the calendars that the user has access to.
100
100
  # used to debug credentials
101
101
  print("Getting list of calendars")
102
- calendars_result = self.service.calendarList().list().execute()
102
+ calendars_result = self.service.calendarList().list().execute() # pylint: disable=no-member
103
103
 
104
104
  calendars = calendars_result.get("items", [])
105
105
 
@@ -123,7 +123,7 @@ class GoogleCalendar:
123
123
  if not time_min:
124
124
  time_min = datetime.datetime.utcnow() - datetime.timedelta(days=30)
125
125
  events_result = (
126
- self.service.events()
126
+ self.service.events() # pylint: disable=no-member
127
127
  .list(
128
128
  calendarId=self.calendar_id,
129
129
  timeMin=time_min.isoformat() + "Z",
@@ -164,7 +164,7 @@ class GoogleCalendar:
164
164
  "end": {"dateTime": end, "timeZone": "Europe/Zurich"},
165
165
  }
166
166
 
167
- event_result = self.service.events().insert(calendarId=self.calendar_id, body=body).execute()
167
+ event_result = self.service.events().insert(calendarId=self.calendar_id, body=body).execute() # pylint: disable=no-member
168
168
  print(f"Created event with id: {event_result['id']}")
169
169
 
170
170
  def save_credentials_to_gopass(self) -> None:
@@ -30,11 +30,11 @@ def main() -> None:
30
30
 
31
31
  # Store in /tmp/docker-logs-timestamp the current timestamp to avoid printing same logs multiple times.
32
32
  timestamp_args = []
33
- if os.path.exists("/tmp/docker-logs-timestamp"): # noqa: S108
34
- with open("/tmp/docker-logs-timestamp", encoding="utf-8") as timestamp_file: # noqa: S108
33
+ if os.path.exists("/tmp/docker-logs-timestamp"): # noqa: S108 # nosec
34
+ with open("/tmp/docker-logs-timestamp", encoding="utf-8") as timestamp_file: # noqa: S108 # nosec
35
35
  timestamp_args = [f"--since={timestamp_file.read().strip()}Z"]
36
36
 
37
- with open("/tmp/docker-logs-timestamp", "w", encoding="utf-8") as timestamp_file: # noqa: S108
37
+ with open("/tmp/docker-logs-timestamp", "w", encoding="utf-8") as timestamp_file: # noqa: S108 # nosec
38
38
  timestamp_file.write(datetime.utcnow().isoformat())
39
39
 
40
40
  for name in (
@@ -11,13 +11,13 @@ from typing import Any
11
11
  def _check_deployment_status(deployments: Any) -> bool:
12
12
  for deployment in deployments["items"]:
13
13
  if not deployment["status"]:
14
- print(f'Waiting status for {deployment["metadata"]["name"]}')
14
+ print(f"Waiting status for {deployment['metadata']['name']}")
15
15
  return False
16
16
 
17
17
  for condition in deployment["status"].get("conditions", []):
18
18
  if not condition["status"]:
19
19
  print(
20
- f'::group::Deployment {deployment["metadata"]["name"]} not ready: {condition["message"]}'
20
+ f"::group::Deployment {deployment['metadata']['name']} not ready: {condition['message']}"
21
21
  )
22
22
  print(json.dumps(condition, indent=4))
23
23
  print("::endgroup::")
@@ -25,7 +25,7 @@ def _check_deployment_status(deployments: Any) -> bool:
25
25
 
26
26
  if deployment["status"].get("unavailableReplicas", 0) != 0:
27
27
  print(
28
- f'::group::Deployment {deployment["metadata"]["name"]} not ready there is {deployment["status"].get("unavailableReplicas", 0)} '
28
+ f"::group::Deployment {deployment['metadata']['name']} not ready there is {deployment['status'].get('unavailableReplicas', 0)} "
29
29
  "unavailable replicas"
30
30
  )
31
31
  print(json.dumps(deployment["status"], indent=4))
@@ -54,7 +54,7 @@ def _check_container_status(pod: Any, status: Any, is_init: bool = False) -> boo
54
54
  status_message = status_message.strip()
55
55
  if status_message == "Completed":
56
56
  return True
57
- print(f'::group::Container not ready in {pod["metadata"]["name"]}: {status_message}') # noqa: E713
57
+ print(f"::group::Container not ready in {pod['metadata']['name']}: {status_message}") # noqa: E713
58
58
  if status_message_long != status_message:
59
59
  print(status_message_long)
60
60
  print(json.dumps(status, indent=4))
@@ -68,7 +68,7 @@ def _check_pod_status(pods: Any) -> bool:
68
68
  for condition in pod["status"].get("conditions", []):
69
69
  if not condition["status"]:
70
70
  print(
71
- f'::group::Pod not ready in {pod["metadata"]["name"]}: {condition.get("message", condition["type"])}' # noqa: E713
71
+ f"::group::Pod not ready in {pod['metadata']['name']}: {condition.get('message', condition['type'])}" # noqa: E713
72
72
  )
73
73
  print(json.dumps(condition, indent=4))
74
74
  print("::endgroup::")
@@ -82,7 +82,7 @@ def _check_pod_status(pods: Any) -> bool:
82
82
  return False
83
83
 
84
84
  if pod["status"].get("phase") not in ("Running", "Succeeded"):
85
- print(f'::group::The Pod {pod["metadata"]["name"]} is not ready: {pod["status"].get("phase")}')
85
+ print(f"::group::The Pod {pod['metadata']['name']} is not ready: {pod['status'].get('phase')}")
86
86
  return False
87
87
 
88
88
  return True
@@ -59,7 +59,7 @@ def main() -> None:
59
59
 
60
60
  def dispatch(repository: str, event_type: str, images_full: list[str]) -> None:
61
61
  """Trigger an image update on the argocd repository."""
62
- id_ = random.randint(1, 100000) # noqa: S311
62
+ id_ = random.randint(1, 100000) # noqa: S311 # nosec
63
63
  print(f"Triggering {event_type}:{id_} on {repository} with {','.join(images_full)}")
64
64
 
65
65
  response = requests.post(
@@ -19,7 +19,7 @@ strict = true
19
19
 
20
20
  [tool.poetry]
21
21
  name = "c2cciutils"
22
- version = "1.8.0.dev49"
22
+ version = "1.8.0.dev51"
23
23
  description = "Common utilities for Camptocamp CI"
24
24
  readme = "README.md"
25
25
  authors = ["Camptocamp <info@camptocamp.com>"]
@@ -65,12 +65,12 @@ c2cciutils-docker-versions-gen = "c2cciutils.scripts.docker_versions_gen:main"
65
65
  [tool.poetry.dependencies]
66
66
  python = ">=3.9,<4.0"
67
67
  requests = "2.32.3"
68
- google-api-python-client = { version = "2.157.0", optional = true }
68
+ google-api-python-client = { version = "2.160.0", optional = true }
69
69
  google-auth-httplib2 = { version = "0.2.0", optional = true }
70
70
  google-auth-oauthlib = { version = "1.2.1", optional = true }
71
71
  "ruamel.yaml" = "0.18.10"
72
72
  defusedxml = "0.7.1"
73
- twine = { version = "6.0.1", optional = true }
73
+ twine = { version = "6.1.0", optional = true }
74
74
  debian-inspector = "31.1.0"
75
75
  PyYAML = "6.0.2"
76
76
  multi-repo-automation = { version="1.5.0", optional = true }
@@ -86,9 +86,9 @@ pr_checks = []
86
86
  version = ["multi-repo-automation"]
87
87
 
88
88
  [tool.poetry.group.dev.dependencies]
89
- prospector = { version = "1.13.3", extras = ["with-bandit", "with-mypy", "with-pyroma", "with-ruff"] }
89
+ prospector = { version = "1.14.0", extras = ["with-bandit", "with-mypy", "with-pyroma", "with-ruff"] }
90
90
  prospector-profile-duplicated = "1.10.4"
91
- prospector-profile-utils = "1.15.1"
91
+ prospector-profile-utils = "1.17.0"
92
92
  types-requests = "2.32.0.20241016"
93
93
  types-pyyaml = "6.0.12.20241230"
94
94
  types-markdown = "3.7.0.20241204"