Skip to content
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

Render mas config from template #616

Draft
wants to merge 45 commits into
base: 2/main
Choose a base branch
from

Conversation

Thanhphan1147
Copy link
Collaborator

@Thanhphan1147 Thanhphan1147 commented Dec 3, 2024

Overview

Rationale

Juju Events Changes

Module Changes

Library Changes

Checklist

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 152 files.

Valid Invalid Ignored Fixed
70 1 81 0
Click to see the invalid file list
  • docs/explanation/mas.plantuml
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

@@ -0,0 +1,35 @@
@startuml MAS high-availability deployment
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@startuml MAS high-availability deployment
' Copyright 2024 Canonical Ltd.
' See LICENSE file for licensing details.
@startuml MAS high-availability deployment

Copy link
Contributor

github-actions bot commented Dec 4, 2024

Lint checks failed for 77eede4

```

--- /home/runner/work/synapse-operator/synapse-operator/tests/integration/test_charm.py 2024-12-04 23:22:44.508560+00:00
+++ /home/runner/work/synapse-operator/synapse-operator/tests/integration/test_charm.py 2024-12-04 23:23:09.710176+00:00
@@ -415,11 +415,11 @@
model: Model,
synapse_charmhub_app: Application,
get_unit_ips: typing.Callable[[str], typing.Awaitable[tuple[str, ...]]],
synapse_charm: str,
synapse_image: str,

  • postgresql_app: Application
  • postgresql_app: Application,
    ):
    """
    arrange: build and deploy the Synapse charm from charmhub and enable Mjolnir.
    act: Refresh the charm with the local one.
    assert: Synapse and Mjolnir health points should return correct responses.

Copy link
Contributor

github-actions bot commented Dec 4, 2024

Test coverage for 77eede4

Name                                    Stmts   Miss Branch BrPart  Cover   Missing
-----------------------------------------------------------------------------------
src/actions/__init__.py                     1      0      0      0   100%
src/actions/register_user.py               21      0      2      0   100%
src/admin_access_token.py                   9      0      0      0   100%
src/auth/__init__.py                        0      0      0      0   100%
src/auth/mas.py                            62      6      4      2    88%   110, 113-114, 140-141, 164
src/backup.py                             175      5     20      2    96%   353-354, 423-424, 481->483, 484
src/backup_observer.py                    134     16     12      0    89%   132-135, 140-143, 179-182, 211-214
src/charm.py                              306     20     70     11    92%   141->143, 146, 259, 263-264, 270-271, 292-293, 322, 329, 409-413, 416-417, 445-447, 467, 503-504
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                   46      0      4      1    98%   71->74
src/exceptions.py                           3      0      0      0   100%
src/matrix_auth_observer.py                68      8     12      3    86%   63, 66, 145, 159-163
src/media_observer.py                      45      4      2      1    89%   60-62, 81
src/mjolnir.py                            102      3     30      3    95%   85, 94->110, 115-119
src/observability.py                       14      0      0      0   100%
src/pebble.py                             210     29     46     12    84%   58->63, 177->exit, 188-192, 226-227, 247-248, 266-269, 324->329, 334-335, 347-348, 350-351, 384, 386, 388, 390, 392, 420, 474-479
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      4     14      2    92%   82-86, 89, 108->113
src/state/__init__.py                       0      0      0      0   100%
src/state/charm_state.py                  128      9     32      7    90%   166, 170, 191, 216, 222, 228, 232-233, 316
src/state/mas.py                           25      1      2      1    93%   71
src/state/validation.py                    36      3      2      0    92%   105-107
src/synapse/__init__.py                     4      0      0      0   100%
src/synapse/admin.py                       19      2      2      0    90%   40-41
src/synapse/api.py                        175      3     20      3    97%   176, 229, 402
src/synapse/workload.py                   138      6     24      0    94%   401-402, 412-415
src/synapse/workload_configuration.py     148     26     34     12    79%   88->exit, 92-93, 141-142, 171, 191-192, 224-225, 258, 267-268, 283, 288-289, 310-311, 330->335, 336, 354->356, 366-367, 395, 403->405, 405->407, 412-413, 433->440, 443, 463-464
src/user.py                                23      0      2      0   100%
-----------------------------------------------------------------------------------
TOTAL                                    2101    149    350     64    91%

Static code analysis report

Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Run started:2024-12-04 23:23:43.974199

Test results:
>> Issue: [B105:hardcoded_password_string] Possible hardcoded password: 'mas.secrets'
 Severity: Low   Confidence: Medium
 CWE: CWE-259 (https://cwe.mitre.org/data/definitions/259.html)
 More Info: https://bandit.readthedocs.io/en/1.8.0/plugins/b105_hardcoded_password_string.html
 Location: /home/runner/work/synapse-operator/synapse-operator/src/auth/mas.py:23:42
22	SYNAPSE_PEER_INTEGRATION_NAME = "synapse-peers"
23	MAS_ENCRYPTION_AND_SIGNING_SECRET_LABEL = "mas.secrets"
24	MAS_ENCRYPTION_KEY_LENGTH = 32  # This is a requirement per the MAS docs

--------------------------------------------------

Code scanned:
  Total lines of code: 11158
  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: 1
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 1
  	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.

1 participant