Skip to content
mcalinghee edited this page Oct 7, 2025 · 6 revisions

Upgrade matrix-authentication-service

The procedure below describes a merge of matrix-authentication-service with tag 1.2.0

## Add element remote repository if you don’t have it
git remote add element https://github.com/element-hq/matrix-authentication-service.git --no-tags

## Fetch specific tag from element repository
git fetch element tag v1.2.0

## Create a new branch from main_tchap
git checkout origin/main_tchap -b upgrade/mas-v1.2.0

## Merge the last element-hq/matrix-authentication-service release in tchapgouv/matrix-authentication-service
git merge v1.2.0

# FIX conflict and and stash the changes
# run end to end tests to approve changes

# Stash your changes : this will keep your conflict resolution in separate commits in case there are errors
git stash -u


# Then redo the merge without fixing the conflict and directly commiting them
git merge v1.2.0

git add .
#sometimes you need to git add unmerged files one by one

git merge --continue

# Finally unstash your fix 
#git checkout stash -- . # This is preferred over git stash pop or apply which will try to merge the changes and create more conflicts
#olivier : `git checkout stash -- .` did not worked, then I git apply stash and it did create more conflicts :D

git add .

git commit -m "fix merge conflict for v1.2.0"

git push origin upgrade/mas-v1.2.0

Create a PR et get it approved.

WARNING Don't squash, don't rebase, **do a merge commit ** we want to preserve the Element git history

Update policies when creating release

  • Build the Open Policy Agent policies
    cd policies
    make
    # OR, if you don't have `opa` installed and want to build through the OPA docker image
    make DOCKER=1
    cd ..
  • Push the policy.wasm in tchap-infra/ansible/roles/matrix-authentication-service/files
Clone this wiki locally