Skip to content

Commit

Permalink
[DISCO-3072] bump accuweather cache key version [load test: (skip)] (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
misaniwere authored Nov 18, 2024
1 parent e792cff commit abce05a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions merino/providers/weather/backends/accuweather/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ def cache_key_for_accuweather_request(
hasher.update(key.encode("utf-8") + value.encode("utf-8"))
extra_identifiers = hasher.hexdigest()

return f"{self.__class__.__name__}:v5:{url}:{extra_identifiers}"
return f"{self.__class__.__name__}:v6:{url}:{extra_identifiers}"

return f"{self.__class__.__name__}:v5:{url}"
return f"{self.__class__.__name__}:v6:{url}"

@functools.cache
def cache_key_template(self, dt: WeatherDataType, language: str) -> str:
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/providers/weather/backends/test_accuweather.py
Original file line number Diff line number Diff line change
Expand Up @@ -1992,16 +1992,16 @@ async def test_get_forecast_error(accuweather: AccuweatherBackend, language: str
[
(
{"q": "asdfg", "apikey": "filter_me_out"},
f"AccuweatherBackend:v5:localhost:"
f"AccuweatherBackend:v6:localhost:"
f"{hashlib.blake2s('q'.encode('utf-8') + 'asdfg'.encode('utf-8')).hexdigest()}",
),
(
{},
"AccuweatherBackend:v5:localhost",
"AccuweatherBackend:v6:localhost",
),
(
{"q": "asdfg"},
f"AccuweatherBackend:v5:localhost:"
f"AccuweatherBackend:v6:localhost:"
f"{hashlib.blake2s('q'.encode('utf-8') + 'asdfg'.encode('utf-8')).hexdigest()}",
),
],
Expand Down

0 comments on commit abce05a

Please sign in to comment.