Skip to content

SYN-10634: Set service log key for AHA service#4952

Merged
invisig0th merged 6 commits into
masterfrom
SYN-10634
May 19, 2026
Merged

SYN-10634: Set service log key for AHA service#4952
invisig0th merged 6 commits into
masterfrom
SYN-10634

Conversation

@invisig0th
Copy link
Copy Markdown
Contributor

Summary

  • AhaCell did not populate the service log key because the typical AHA deployment (per docs/synapse/kubernetes/aha.yaml) sets aha:network but not aha:name, so the Cell.__anit__ block that derives service from both never fires.
  • Extracted the derivation into Cell._getAhaSvcName(); AhaCell._getAhaSvcName() overrides to default aha:name to 'aha' so the key is always set.

Test plan

  • python -m pytest synapse/tests/test_lib_aha.py (26 passed, includes new test_lib_aha_logging)
  • python -m pytest synapse/tests/test_lib_cell.py (60 passed, 3 skipped)

Jira: https://vertexproject.atlassian.net/browse/SYN-10634

The AHA service does not register itself with AHA, so the cell logic
that derives the 'service' log key from 'aha:name' + 'aha:network'
yields nothing when 'aha:name' is not configured (the typical k8s
deployment). Extract the derivation into Cell._getAhaSvcName() and
override in AhaCell to default 'aha:name' to 'aha'.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.75%. Comparing base (60192c0) to head (800fb77).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4952      +/-   ##
==========================================
- Coverage   97.78%   97.75%   -0.04%     
==========================================
  Files         299      299              
  Lines       63351    63362      +11     
==========================================
- Hits        61949    61940       -9     
- Misses       1402     1422      +20     
Flag Coverage Δ
linux 97.69% <100.00%> (-0.04%) ⬇️
linux_replay 93.50% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@invisig0th invisig0th marked this pull request as ready for review May 18, 2026 19:19
Comment thread synapse/lib/aha.py Outdated
invisig0th and others added 2 commits May 19, 2026 07:50
Co-authored-by: vEpiphyte <epiphyte@vertex.link>
super() already binds self; passing self again caused a TypeError.
@invisig0th invisig0th requested a review from vEpiphyte May 19, 2026 12:18
@invisig0th invisig0th merged commit fd69b15 into master May 19, 2026
6 checks passed
@invisig0th invisig0th deleted the SYN-10634 branch May 19, 2026 13:29
@vEpiphyte vEpiphyte added this to the v2.244.0 milestone May 20, 2026
@vEpiphyte vEpiphyte added the bug label May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants