Skip to content

add missing strip_prefix #581

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

Open
wants to merge 23 commits into
base: 2/main
Choose a base branch
from
Open

Conversation

Thanhphan1147
Copy link
Collaborator

@Thanhphan1147 Thanhphan1147 commented Nov 7, 2024

The code to strip the ingress prefix was present when synapse was using ingress v1 but was missed when moving to the v2 lib. So this PR adds it. synapse can't handle prefix so this is needed to function properly.

Checklist

@Thanhphan1147 Thanhphan1147 marked this pull request as draft November 7, 2024 13:47
@Thanhphan1147 Thanhphan1147 changed the base branch from main to 2/main December 6, 2024 18:29
@Thanhphan1147 Thanhphan1147 marked this pull request as ready for review December 6, 2024 18:30
@amandahla
Copy link
Collaborator

@Thanhphan1147 can this PR be merged once integration tests finish?

@amandahla
Copy link
Collaborator

@Thanhphan1147 Could this PR be merged?

Copy link
Contributor

@yhaliaw yhaliaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this is a user-affecting bug fix.
It might be good to update the docs/changelog.md.

Copy link
Contributor

Test results for commit accc7ef

Test coverage for accc7ef

Name                                    Stmts   Miss Branch BrPart  Cover   Missing
-----------------------------------------------------------------------------------
src/actions.py                             36      0      6      0   100%
src/auth/__init__.py                        0      0      0      0   100%
src/auth/mas.py                            86      6      2      0    93%   78-80, 97-99
src/backup.py                             175      5     20      2    96%   351-352, 421-422, 479->481, 482
src/backup_observer.py                    151     16     14      0    90%   162-165, 170-173, 210-213, 242-245
src/charm.py                              276     26     62     12    89%   179->181, 184, 258, 311, 315-316, 322-323, 341-342, 366, 373, 448-452, 455-456, 484-486, 506, 536-542, 572-573
src/charm_types.py                         30      0      0      0   100%
src/database_client.py                     57      1      8      4    92%   35, 47->exit, 69->exit, 88->98
src/database_observer.py                   49      4      2      0    92%   61-64
src/exceptions.py                           3      0      0      0   100%
src/matrix_auth_observer.py                59      5      6      0    92%   133-137
src/media_observer.py                      45      4      2      1    89%   60-62, 81
src/observability.py                       13      0      0      0   100%
src/pebble.py                             221     38     50     12    82%   158->exit, 169-173, 218-219, 239-240, 258-261, 322->327, 332-333, 345-346, 348-349, 380, 382, 384, 386, 388, 395-398, 426, 577-593, 635-642
src/redis_observer.py                      39      3      4      0    93%   63-66
src/s3_parameters.py                       22      0      4      0   100%
src/smtp_observer.py                       61      1     14      2    96%   89, 108->113
src/state/__init__.py                       0      0      0      0   100%
src/state/charm_state.py                  144     11     34      7    90%   168, 172, 193, 218, 224, 230, 234-235, 321, 388-389
src/state/mas.py                           79      8      6      3    87%   154, 160-161, 188-190, 205, 225
src/state/validation.py                    36      3      2      0    92%   110-112
src/synapse/__init__.py                     2      0      0      0   100%
src/synapse/workload.py                   152      7     30      2    93%   370-373, 404-405, 453
src/synapse/workload_configuration.py     149     26     34     12    79%   90->exit, 94-95, 143-144, 173, 193-194, 226-227, 260, 269-270, 285, 290-291, 312-313, 332->337, 338, 356->358, 368-369, 397, 405->407, 407->409, 414-415, 435->442, 445, 465-466
src/user.py                                23      5      2      1    76%   27-29, 56, 73
-----------------------------------------------------------------------------------
TOTAL                                    1908    169    302     58    90%

Static code analysis report

Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:01
Run started:2025-04-22 13:01:14.484518

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 9902
  Total lines skipped (#nosec): 6
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants