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

Migrate from Mjolnir to Draupnir #705

Closed
wants to merge 7 commits into from
Closed

Conversation

amandahla
Copy link
Collaborator

@amandahla amandahla commented Feb 24, 2025

Overview

"Draupnir is a forwards and backwards compatible drop in replacement for Mjolnir.". This PR change the snap and all references from Mjolnir to Draupnir.

https://github.com/the-draupnir-project/Draupnir

There are many files changed but only because I'm renaming Mjolnir -> Draupnir. The actual change is on the rockcraft file.

For compatibility, enable_mjolnir is still available, but enable_draupnir takes precedence unless enable_mjolnir is True and enable_draupnir is False. In that case, enable_draupnir will be enabled.

Also:

  • Remove src-docs
  • Change synapse-invite-checker URL

Rationale

Draupnir is compatible with MAS.

Juju Events Changes

Module Changes

Library Changes

Checklist

  • The charm style guide was applied
  • The contributing guide was applied
  • The changes are compliant with ISD054 - Manging Charm Complexity
  • The documentation is generated using src-docs
  • The documentation for charmhub is updated.
  • The PR is tagged with appropriate label (urgent, trivial, complex)
  • The changelog is updated with changes that affect the users of the charm.

This track has no changelog.

@amandahla amandahla changed the base branch from 2/main to track/1 February 24, 2025 18:17
@amandahla amandahla closed this Feb 24, 2025
@amandahla amandahla reopened this Feb 24, 2025
@amandahla amandahla marked this pull request as draft February 25, 2025 18:03
@amandahla amandahla changed the title Migrate from Mjolnir to Draupnir [DNM] Migrate from Mjolnir to Draupnir Feb 25, 2025
Copy link

@FSG-Cat FSG-Cat left a comment

Choose a reason for hiding this comment

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

This Should contain corrections for the various times draupnir is refered to as a matrix.org project. The Draupnir project is definetively not matrix.org

Copy link

@Gnuxie Gnuxie left a comment

Choose a reason for hiding this comment

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

BTW While Draupnir will work with MAS, commands that currently depend on the Synapse admin API will not work. So these commands are: deactivate <user>, shutdown room <room>, and hijack room <room>. So you will need to consider this if those commands are part of your moderation team's workflow.

@amandahla
Copy link
Collaborator Author

BTW While Draupnir will work with MAS, commands that currently depend on the Synapse admin API will not work. So these commands are: deactivate <user>, shutdown room <room>, and hijack room <room>. So you will need to consider this if those commands are part of your moderation team's workflow.

Thanks for sharing this! @gregory-schiano @Thanhphan1147 FYI

@amandahla amandahla marked this pull request as ready for review March 7, 2025 12:53
@amandahla amandahla changed the title [DNM] Migrate from Mjolnir to Draupnir [Migrate from Mjolnir to Draupnir Mar 7, 2025
@amandahla amandahla changed the title [Migrate from Mjolnir to Draupnir Migrate from Mjolnir to Draupnir Mar 7, 2025
Copy link
Contributor

github-actions bot commented Mar 7, 2025

Test results for commit f06462e

Test coverage for f06462e

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/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                              288     18     70     10    92%   135->137, 140, 246, 250-251, 279-280, 308, 315, 396-400, 403-404, 432-434, 454, 490-491
src/charm_state.py                        165      9     36      7    92%   292, 296, 317, 342, 348, 354, 358-359, 446
src/charm_types.py                         34      0      0      0   100%
src/database_client.py                     57      1      8      4    92%   35, 47->exit, 69->exit, 88->98
src/database_observer.py                   39      0      4      1    98%   70->72
src/draupnir.py                            97      3     30      3    95%   82, 91->107, 112-116
src/exceptions.py                           3      0      0      0   100%
src/matrix_auth_observer.py                51      3      8      1    93%   61, 141-142
src/media_observer.py                      41      4      2      1    88%   61-63, 82
src/observability.py                       14      0      0      0   100%
src/pebble.py                             206     27     48     13    84%   57->62, 176->exit, 187-191, 225-226, 246-247, 300->305, 310-311, 323-324, 326-327, 345-346, 363, 365, 367, 369, 371, 399, 451-456
src/redis_observer.py                      35      3      4      0    92%   62-65
src/s3_parameters.py                       22      0      4      0   100%
src/saml_observer.py                       38      0      4      0   100%
src/smtp_observer.py                       56      4     14      2    91%   82-86, 89, 108->113
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%   403-404, 414-417
src/synapse/workload_configuration.py     170     29     38     13    80%   95->exit, 99-100, 148-149, 178, 198-199, 231-232, 265, 274-275, 290, 295-296, 317-318, 337->342, 343, 361->363, 373-374, 390, 458-459, 487, 495->497, 497->499, 504-505, 525->532, 535, 555-556
src/user.py                                23      0      2      0   100%
-----------------------------------------------------------------------------------
TOTAL                                    2015    133    352     60    92%

Static code analysis report

Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:01
Run started:2025-03-07 15:04:56.401300

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 11513
  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):

@amandahla amandahla closed this Mar 10, 2025
@amandahla
Copy link
Collaborator Author

Closed in favor of #714

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.

4 participants