canonical / synapse-operator

synapse-operator - charm repository.
Apache License 2.0
4 stars 4 forks source link

Add workers_ignore_list #398

Closed amandahla closed 4 months ago

amandahla commented 4 months ago

Overview

When a worker unit goes off, Synapse still waits for it to be able to handle their events.

Rationale

Since is not possible to remove a specific unit in a k8s model, this configuration will allow the operator to provide a list of workers to be ignored while setting instance_map and stream_writers configuration.

So, Synapse can be available again until whatever is blocking the new units from coming back is fixed.

Juju Events Changes

Module Changes

Library Changes

Checklist

No charmhub documentation yet.

github-actions[bot] commented 4 months ago

Test coverage for d96b284c0adca65b07e986330540f8221845f6bf

Name                            Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------------------------------
src/actions/__init__.py             2      0      0      0   100%
src/actions/register_user.py       21      0      2      0   100%
src/actions/reset_instance.py      20      0      2      0   100%
src/admin_access_token.py           9      0      0      0   100%
src/backup.py                     175      5     24      2    96%   353-354, 423-424, 480->482, 483
src/backup_observer.py            134     16     14      0    89%   132-135, 140-143, 179-182, 211-214
src/charm.py                      335     17     86      9    94%   141->143, 146, 286-287, 315, 322, 403-407, 410-411, 439-441, 461, 491-494, 556-557
src/charm_state.py                119      1     28      1    99%   262
src/charm_types.py                 34      0     10      0   100%
src/database_client.py             57      1     12      4    93%   35, 47->exit, 69->exit, 88->98
src/database_observer.py           39      0      4      1    98%   70->72
src/exceptions.py                   3      0      0      0   100%
src/irc_bridge.py                  36      9      6      0    79%   31, 71-86
src/media_observer.py              41      4      2      1    88%   61-63, 82
src/mjolnir.py                     94      3     32      3    95%   82, 86->98, 108-112
src/observability.py               20      0      2      0   100%
src/pebble.py                     196     29     36     10    83%   123-127, 158-159, 171->exit, 182-186, 205-206, 226-227, 280->285, 299-300, 317, 319, 321, 323, 325, 332-335, 356, 524-544
src/redis_observer.py              35      3      4      0    92%   62-65
src/s3_parameters.py               22      0      4      0   100%
src/saml_observer.py               31      0      6      0   100%
src/smtp_observer.py               56      4     14      2    91%   82-86, 89, 108->113
src/synapse/__init__.py             3      0      0      0   100%
src/synapse/admin.py               19      2      2      0    90%   40-41
src/synapse/api.py                175      3     24      3    97%   176, 229, 402
src/synapse/workload.py           306     33     68     14    87%   302-303, 324-325, 403->406, 409, 424->exit, 428-429, 449-450, 490-491, 527-528, 547-549, 551, 573-574, 629, 645, 692->695, 719-720, 739, 747->749, 749->751, 756-757, 772, 792-793, 810, 819-820, 839->844, 845
src/user.py                        23      0      4      0   100%
---------------------------------------------------------------------------
TOTAL                            2005    130    386     50    92%

Static code analysis report

Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:01
Run started:2024-06-18 12:02:36.882275

Test results:
    No issues identified.

Code scanned:
    Total lines of code: 11053
    Total lines skipped (#nosec): 4
    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):