Skip to content

WPB-20053: Move templates from Brig to wire-subsystem#4830

Merged
fisx merged 9 commits intodevelopfrom
gdifolco/WPB-20053-move-brig-templates
Oct 30, 2025
Merged

WPB-20053: Move templates from Brig to wire-subsystem#4830
fisx merged 9 commits intodevelopfrom
gdifolco/WPB-20053-move-brig-templates

Conversation

@blackheaven
Copy link
Contributor

@blackheaven blackheaven commented Oct 29, 2025

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@blackheaven blackheaven requested a review from a team as a code owner October 29, 2025 14:18
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Oct 29, 2025
Copy link
Member

@akshaymankar akshaymankar left a comment

Choose a reason for hiding this comment

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

I think this nix expression needs update:

brig-templates = pkgs.stdenvNoCC.mkDerivation {
name = "brig-templates";
src = ../services/brig/deb/opt/brig/templates;
installPhase = ''
mkdir -p $out/usr/share/wire
cp -r $src $out/usr/share/wire/templates
'';
};

Copy link
Member

@akshaymankar akshaymankar left a comment

Choose a reason for hiding this comment

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

:shipit:

@eyeinsky
Copy link
Contributor

This may already be fixed in this PR, but with running the integration test on WPB-20053-scim-groups-create-2 I currently get brig-index: user error (error:80000002:system library::No such file or directory), when straceing it, it can't find services/brig/test/resources/elasticsearch-ca.pem file. Rerunning on this branch at the moment.

@eyeinsky
Copy link
Contributor

Right, some of the moved files are referenced from the Makefile and from /services/brig/brig.integration.yaml, I updated a few here 2ac1ce3 (feel free to cherry-pick), but there are more. Iterating on make ci-safe will force all of these.

@eyeinsky
Copy link
Contributor

So here is the branch https://github.com/wireapp/wire-server/commits/ml/wip-config-path-fixes. Now it seems that the services pass the config parsing stage, but now I get [brig@b.example.com] E, Failed to connect to RabbitMQ, error=ConnectionClosedException Abnormal "Could not connect to any of the provided brokers: [((\"127.0.0.1\",5671),HandshakeFailed (Error_Protocol \"certificate has unknown CA\" UnknownCa))]", willRetry=True, retryCount=0. Looks like RabbitMQ's presented certificate and the CA used to verify it don't match 🤔.

(More ideas: could it be that the certificate isn't for 127.0.0.1, as we talked about the dotless domain issue, though it doesn't look like this was changed in the pr)

@blackheaven blackheaven force-pushed the gdifolco/WPB-20053-move-brig-templates branch from ca1429c to f574c7a Compare October 29, 2025 21:37
@eyeinsky
Copy link
Contributor

After restarting dockerephemeral and running make db-reset I now consistently get this:

  brig-index: Could not load secrets from FilePathSecrets "./libs/wire-subsystems/resources/test/elasticsearch-credentials.yaml": File doesn't exist
  CallStack (from HasCallStack):
    error, called at src/Util/Options.hs:87:24 in types-common-0.16.0-inplace:Util.Options
  make: *** [Makefile:398: es-reset] Error 1

@blackheaven
Copy link
Contributor Author

it's so weird I did not catch it locally, I have pushed a fix

@fisx
Copy link
Contributor

fisx commented Oct 30, 2025

it's so weird I did not catch it locally, I have pushed a fix

there is db-migrate and es-reset. db-migrate does everything es-reset does, but correctly. there are way too many ways to run the tests, so i suspect you guys somehow managed to call the different goals, respectively. anyway, good somebody caught it :)

@eyeinsky
Copy link
Contributor

make db-reset does look ok now!

@blackheaven Does make ci-safe run well for you? I still get a lot more failing tests than usual, for example this one: TASTY_PATTERN='/post \/clients\/:cid\/access-token/' make ci-safe

@fisx
Copy link
Contributor

fisx commented Oct 30, 2025

TASTY_PATTERN='/post /clients/:cid/access-token/' make ci-safe

we're identified the problem together, this change makes the tests go green:

modified   services/nginz/integration-test/conf/nginz/nginx.conf                                                 
@@ -135,10 +135,10 @@ http {                                                                                     
     ssl_client_certificate integration-ca.pem;                                                                  
     ######## TLS/SSL block end ##############                                                                   
                                                                                                                 
-    zauth_keystore ../../libs/wire-subsystems/resources/zauth/pubkeys.txt;                                      
+    zauth_keystore /home/mf/src/wire-server/libs/wire-subsystems/test/resources/zauth/pubkeys.txt;              
     zauth_acl conf/nginz/zauth_acl.txt;                                                                         
     # needs to be kept in sync with services/brig/test/resources/oauth/ed25519.jwk                              
-    oauth_pub_key ../../libs/wire-subsystems/resources/oauth/ed25519_public.jwk;                                
+    oauth_pub_key /home/mf/src/wire-server/libs/wire-subsystems/test/resources/oauth/ed25519.jwk;

obviously that's not the solution, but we should fix this elsewhere in order to make progress with #4815.

@fisx
Copy link
Contributor

fisx commented Oct 30, 2025

obviously that's not the solution, but we should fix this elsewhere in order to make progress with #4815.

never mind, it's done.

@eyeinsky eyeinsky force-pushed the gdifolco/WPB-20053-move-brig-templates branch from 2fff22f to 36b677e Compare October 30, 2025 14:41
@eyeinsky
Copy link
Contributor

@blackheaven We pushed a commit to your branch without asking (sorry), but this now fixes it!

@fisx fisx requested review from a team as code owners October 30, 2025 14:48
@fisx
Copy link
Contributor

fisx commented Oct 30, 2025

i think last ci run was a flake. i triggered a re-run, if everything except sonarcloud and overall-ci is green pls anybody merge.

@fisx fisx merged commit 61b7e2c into develop Oct 30, 2025
7 of 9 checks passed
@fisx fisx deleted the gdifolco/WPB-20053-move-brig-templates branch October 30, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants