Skip to content

Commit 0368c39

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/renovate/debian-13.x' into renovate/debian-13.x
2 parents ae6d943 + dc4ce8b commit 0368c39

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

function/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
"""The version of the function."""
1717

1818
# This is set at build time, using "hatch version"
19-
__version__ = "0.0.18"
19+
__version__ = "0.0.19"

function/fn.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,12 @@ async def RunFunction(
117117
return rsp
118118

119119

120-
def name_based_on_path(observed: str, path: list[str]) -> str:
120+
def name_based_on_path(observed_xr_name: str, path: list[str]) -> str:
121121
"""name_based_on_path function."""
122-
joined = "|".join(path)
123-
hashed_path = hashlib.sha256(
124-
joined.encode("utf-8"), usedforsecurity=False
125-
).hexdigest()
126-
full = f"{observed[:14]}-{hashed_path[:48]}"
127-
return full.rstrip("-")[:63]
122+
prefix = f"{observed_xr_name[:15]}".rstrip("-")
123+
_joint = "".join(path)
124+
suffix = hashlib.sha256(_joint.encode("utf-8"), usedforsecurity=False).hexdigest()
125+
return f"{prefix}-{suffix}".strip()[:63]
128126

129127

130128
def toggle_no(cmd: str) -> str:

tests/test_fn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async def test_run_function_generates_request(self) -> None:
9999
# Resource existence
100100
# ----------------------------
101101

102-
request_name = "eoscommand-1-5cc898bff667884f5d8706ea7c4543e267a567c90662a48a"
102+
request_name = "eoscommand-1-1a2c114ed6c93d688a2f215bef12df003efac252912d4ed6ba"
103103

104104
self.assertGreater(
105105
len(resp.desired.resources), 0, "No desired resources generated"

0 commit comments

Comments
 (0)