Conversation
* Add stub for remote connection creation * Make connection DB functions work with Qualified * Simplify name of createConnection * Fix order of arguments in createConnection * Do not assert on 1-1 conversation names * Use Local newtype for some more local arguments Co-authored-by: jschaul <jschaul@users.noreply.github.com>
* Use Input effect instead of a MonadReader instance * Remove ReaderT * Fix package.yaml * Changelog * Review responses * SAML work Remove undefineds Interpreting is really hard Interpret everything wip Add toggleCookie to SAML2 Add Now effect get it compiling build Remove HasCreateUUID instance for Spar * Cleanup * CanonicalInterpreter and necessary changes * Rename to SPImpl * Fake CI * Another fake CI * Use catch in polysemy * Respond to review * Changelog * Apply suggestions from code review Co-authored-by: fisx <mf@zerobuzz.net> * Hi CI * make format Co-authored-by: fisx <mf@zerobuzz.net>
* Remove wrapMonadClientSem Put it into the Cassandra interpreter instead * Remove MonadIO instance * Remove MonadError instance * Remove ExceptT * Remove Final IO from Spar * Fix one use of undefined * Reporter effect; NO MORE IO * Remove the Spar newtype * Remove Spar type * Stylistic cleanup * Changelog * Weird rebase problem * Review comments
* Use master branch of hs-certificate The error handling fix haskell-tls/hs-certificate#125 has been merged, so we can just use the upstream master now, and later switch to the hackage package once it is released.
…1805) Motivation: decrease integration setup time, especially for the default two-backend setup. Make use of tooling used elsewhere, and use less of hacky bash scripts. See also https://wearezeta.atlassian.net/wiki/spaces/PS/pages/513573957/CI+runs+of+wire-server+state+and+possible+improvements for a discussion of other CI improvement opportunities. This should save off about ~5 minutes of setup time for each CI run simply because all helm charts for both backends are now installed in parallel, rather than sequentially. (that is, `make kube-integration-setup` now should be faster than before this PR) - Create a few FUTUREWORKS in Jira and link to them from the code comments - Create two helmfiles, one for federation, one for single-backend - Add helmfile to nix-shell tooling (Helmfile itself comes with a different version of helm; but since so far things inside nix-shell are only in use for local development, this should not matter too much. In the future this can be streamlined with wire-server-deploy to use the same versions everywhere)
…1826) * Expand a test to also include remote connections while listing
* Remove deprecated endpoint for listing convs Also removed the V2 from the name of the endpoint (in the code, not in the endpoint path). * Remove /list-conversations from nginx conf * Remove use of /list-conversations from End2end
One2One conversations are not created yet. This will be worked upon separately. Legal-hold restrictions are also not dealt with as for now, it will not be allowed to turn on legal-hold and federation at the same point. Co-authored-by: Stefan Matting <stefan@wire.com> Co-authored-by: jschaul <jschaul@users.noreply.github.com> Co-authored-by: Akshay Mankar <akshay@wire.com>
* Fix more swagger validation errors These could be prevented by turning some lists to sets in the swagger2 package, but for now we simply go through all the schemas in the `Swagger` structure, and apply `nub` on them.
* Refactor tagged Qualified types This makes the `Local` and `Remote` type constructor safer, because now it is not possible to change the domain inside a tagged value using the `Functor` instance. * Rename `partitionQualified` to `indexQualified` * Refactor partitionRemoteOrLocalIds Also rename it to partitionQualified and swap the order of results. * Refactor and rename `partitionRemote` The `partitionRemote` function has been renamed to `indexRemote` for consistency with `indexQualified`, and it now returns a list of `Remote [a]`, which preserves the information about the domains being remote. * Remove some uses of toRemoteUnsafe * Remove convId from ConversationMetadata Also change type of toRemoteUnsafe and toLocalUnsafe to just take a `Domain` and an `a` instead of `Qualified a`. * Remove one more use of toRemoteUnsafe * Remove lUnqualified and lDomain We can simply use the general versions that work for both qualified tags. * Remove renderQualified and corresponding test It was completely unused. * Use data kinds for Id tags * Better schema instance for `Qualified` values * Add CHANGELOG entry
* Extract function to create UserList * Add stub for remote 1-1 conversation creation * Compute remote 1-1 conversation IDs * ensureConnected now takes a UserList * Make /conversations/one2one federation-aware Converted the endpoint for creating 1-1 conversations to the new conversation ID algorithm, and enabled the endpoint to create 1-1 conversations with federated users. Note: the case when the conversation needs to be hosted by the remote domain is still not implemented. We probably need a new RPC for this case. * Remove create from UUID Version class The create function cannot be defined for all UUID versions. * Introduce V5 UUIDs and use them for 1-1 conv * Servantify internal endpoint for connect conv * Make recipient field of connect event qualified * Extract function to create legacy connect conv * Add tests for the conversation ID algorithm * write internal with stubs for data functions * Implement a function for creating and updating a 1-1 remote conversation - The function is Galley.API.One2One.iUpsertOne2OneConversation * use schema-profunctor for json instances galley-types: no lax * galley-types rename module to Intra * galley: remove "these" dep galley.cabal * fix impossible example * remove todo * un-nameclash: one2OneConvId -> localOne2OneConvId * remove warning suppression * brig: add rpc function * change api: alwyas return a conv id * Add tests for one2one conversation internal endpoint * Test remote one2one conversation case * Update golden tests after change in connect event * Add CHANGELOG entry * Remove incorrect comment Co-authored-by: Marko Dimjašević <marko.dimjasevic@wire.com> Co-authored-by: Stefan Matting <stefan@wire.com>
The `anySame` function has quadratic runtime, but here we can use an `Ord` instance, and just compare the `nubOrd` lists. This also removes a potential flakyness caused by repeated input pairs (which should be quite likely to happen, given the low entropy of the UUID generator).
* Add failing test case. * Nit-pick. * Do not git-ignore pem files (at least not all of them). * Fix error message. * More detail in scim error responses. * An idea. * Implement the idea. * FUTUREWORK.
* move one2oneConvId to galley-types * implement updateOne2OneConv and simple test * add more test cases * Clarify 403 in test * add changelog entry
Co-authored-by: Zebot <zebot@users.noreply.github.com>
Co-authored-by: Zebot <zebot@users.noreply.github.com>
* update to latest SFT. * Add changelog entry for SFT Co-authored-by: jschaul <jschaul@users.noreply.github.com>
* Fix SFTD in umbrella chart * changelog Co-authored-by: jschaul <jschaul@users.noreply.github.com>
It's the thing people confuse the most. Hopefully people will get it wrong less now
* [charts:sftd] Introduce flag to enable TURN discovery * -f integrate review feedback * changelog Co-authored-by: jschaul <jschaul@users.noreply.github.com>
* Test that server key usage is checked for fed cert * Reject certificates without server usage flag
* Rename NotificationTargets to BotsAndMembers * Refactor logic to remove users after access update - Avoid using lenses and state; since there are only two updates, these can be threaded manually pretty easily. - Rename the `NotificationTargets` type to `BotsAndMembers`, and use that instead of pairs (or triples) in the access update function. This endpoint is still not properly federation-aware, since remote members are not removed, and local member removals are not propagated to remotes. Co-authored-by: Stefan Matting <stefan@wire.com> * Re-enable multiple victim when removing members This is useful to batch removals occurring after an access update to a conversation. * Remove and notify remotes on access update * Access update removal tests * Remove duplication in test conversation creation Co-authored-by: Paolo Capriotti <paolo@capriotti.io> Co-authored-by: Marko Dimjašević <marko.dimjasevic@wire.com>
* Delete stale FUTUREWORK * Brig: delete deprecated 'GET /i/users/connections-status` endpoint * brig: Servantify POST /i/users/connection-status * brig: Add internal endpoint to get qualified connection statuses * Brig: Support creating accepted connections for tests The endpoint just creates DB entries without actually contacting the remote backend. This is very useful when galley tests need a remote connection to exist * wire-api: roundtrip test for To/FromByteString @relation The instances were deleted couple of commits ago. * Check conn between adder and remotes when adding remotes to conv * Check connection between conversation creator and remote members * Do connection checking in onConversationCreated in the federation API * Make existing federation tests succeed again by sprinkling some connections * Add a (still failing) test for on-conversation-crated * Add more connections to pass federation API tests * onConvCreated: Ensure creator of conv is included as other member * More coverage for onConvCreated * onConvUpdated: Only allow connected users to add local users * Add test case: Only unconnected users to add * Fix integration tests Co-authored-by: Marko Dimjašević <marko.dimjasevic@wire.com> Co-authored-by: jschaul <jschaul@users.noreply.github.com> Co-authored-by: Stefan Matting <stefan@wire.com> Co-authored-by: Paolo Capriotti <paolo@capriotti.io>
…1858) * Unqualify rcOrigId in `on-conversation-created` Also add some Remote and Local tags to various functions. * Simplify partitioning in onConversationCreated * Improve comment about creator ID in RPC * Ensure creator in the conv domain in tests Co-authored-by: jschaul <jschaul@users.noreply.github.com>
* Update how-to.md and add script * add changelog
Co-authored-by: Zebot <zebot@users.noreply.github.com> Co-authored-by: jschaul <jschaul@users.noreply.github.com>
* Implement Brig, Bot and Spar intra effects * Remove placeholder Intra effect * Implement GundeckAccess effect * Implement ExternalAccess effect * Implement FederatorAccess effect * Remote obsolete remote push logic in Intra.Push
As per https://wearezeta.atlassian.net/browse/BM-22 using LOCAL_QUORUM should: * not change anything for a single-datacentre cassandra setup (which is our case atm) * allow to make a datacentre migration that can be rolled back.
* Close GRPCClient object in federation client code Also abstract the function that closes a GRPC client, and make it ignore errors. * Bracket uses of mkGrpcClient in tests
* nix: add ormolu to wire-server-direnv * direnv.nix: nixpkgs-fmt * .github/workflows: add ci.yml This builds the direnv, so it's available in the cachix binary cache. * .github/workflows/ci.yml: run make formatc This ensures the codebase is properly formatted. * tools/ormolu.sh: use utf-8 for IO Otherwise, ormolu fails with some locales on non-ASCII characters: ``` ormolu: libs/dns-util/src/Wire/Network/DNS/SRV.hs: hGetContents: invalid argument (invalid byte sequence) ``` See tweag/ormolu#38 and https://gitlab.haskell.org/ghc/ghc/-/issues/17755 for details. * changelog: add changelog Co-authored-by: jschaul <jschaul@users.noreply.github.com>
* Move stuff to Cassandra hierarchy * Implement all other store effects This removes the `MonadClient` instance from `Galley`, and therefore makes all the DB-related code go through one of the store effects. * Move Cassandra conversation code out of Data * Move more Cassandra code out of Data * Move ResultSet to Cassandra hierarchy * Move queries to Cassandra hierarchy * Move Cql instances out of Data
…1901) * Fix: push events when AppLock or SelfDeletingMessages config change. Remove unused feature config change event. Revert "Remove unused feature config change event." This reverts commit ad0aaa75511c4b03a25cb783e1b386d4b228e046. fixed compile error formatting * Changelog.
…ion because they were deleted (#1891) Also add End2end test for deleting a user
* Update multiple files (squashed) * Use cabal-plan and bash instead of cabal test or cabal install Both `cabal test` and `cabal install` "change configuration" so next time `cabal build` is run, cabal goes over all the packages to make sure nothing needs compilation which is a significant slowdown. This way we don't have to go through that slowdown. * Ensure `make c` works for all packages * Add usage instructions for `make c` and `make ci` * Update tools/convert-to-cabal/README.md * Simplify running tests with cabal * Gitignore .envrc.local and cabal.project.local Co-authored-by: Akshay Mankar <akshay@wire.com>
* Refactor: withMockedFederatorAndGalley * brig: ignore when remote notifications fail * extend test case with a domain that is unvailable * Remove FUTUREWORK, done in #1891 * Add changelog entry * Refactor: Changes from review
* Only set LD_LIBRARY_PATH for cabal in direnv build environment. The .envrc used direnv's load_prefix function to make all the required tools and dependency libraries visible within the development environment, which sets a couple of environment variables in the dev shell including PATH and LD_LIBRARY_PATH. The latter is required so that cabal can find non-Haskell dependencies such as zlib and cryptobox. However, adding paths inside the Nix store to LD_LIBRARY_PATH can interfere with tools in the host system, especially on non-NixOS systems, as the dynamic loader will attempt to load dynamic libraries from the Nix store before those of the host system, which in some cases will cause some programs to fail to run due to dynamic symbol mismatches. This commit refactors the direnv build environment, splitting everything but cabal into a separate environment, and exposing cabal through a wrapper script which sets LD_LIBRARY_PATH appropriately only for cabal. Instead of load_prefix, the .envrc reverts to using PATH_add, to avoid introducing LD_LIBRARY_PATH into dev shell environments. Co-authored-by: Akshay Mankar <akshay@wire.com> Co-authored-by: Stefan Matting <stefan@wire.com>
Fix a bug in the IdP.Mem interpreter, and added law tests for IdP
* Remove MonadThrow instance of Galley Most instance of throwing in the IO monad have now been replaced by the use of an explicit `Error` effect. Note, however, that some interpretation code is still throwing exceptions. * Throw error descriptions into Sem monad * Refactor ensureConnectedOrSameTeam * Introduce some fine-grained error effects * Split ConversationAction into several action types * Replace Wai.Error with fine-grained error types * Separate out NotATeamMember error * Add CHANGELOG entry * Remove an unnecessary ActionError data constructor * Update services/galley/src/Galley/API/Query.hs Remove a commented out function signature Co-authored-by: Marko Dimjašević <marko.dimjasevic@wire.com>
For prometheus metrics middleware to be able to replace /users/4f7cbd8c-5fe3-4818-94c0-8ae68460ba13 with /users/:uid, it needs to know the paths in servant that exist. This is generated statically using the class `RoutesToPaths`. This class had an overlappable instance for everything, this caused to not notice when we created the QualifiedCapture type. In order to ensure that we instantiate this class correctly, this commit removes this catch-all instance and instantiate the class for every type that needs it explicitly.
* cassandra-util: initial version of a dcAwarePolicy for talking to cassandra * Spar: allow filtering nodes by datacentre * refactor policy code to make it reusable across services * Set dcFilterPolicyIfConfigured also for brig/galley/gundeck * changelog
It makes the cabal build even more pure because it doesn't depend on preset values of LD_LIBRARY_PATH, CPATH, etc.
* added pcre packages (perl compatible regex needed for headroom) * put more emphasis on the stack version which should match the one on the Dockerfile and added a note on how to downgrade if necessary * moved and updated nix and direnv instruction * Update docs/developer/dependencies.md Co-authored-by: jschaul <jschaul@users.noreply.github.com> * added a note on building nginz Co-authored-by: jschaul <jschaul@users.noreply.github.com>
* Separate IdPRawMetadataStore * make format * Changelog * Fix bad merge * Split out IdPSpec also * make format * hpack
Member
Author
|
Actually, the squashed commit is already merged with the history here: 5297219 |
jschaul
approved these changes
Nov 15, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important Note
In the last release (#1893), we squashed the commits on develop by mistake. In this release, we have to try and merge the actual history with the squashed commit. So, the commits in this PR include commits since 4th October instead of 29th October.
Changes
Release notes
API changes
Features
Bug fixes and other updates
Documentation
Internal changes
make formatcin github actions #1908)Federation changes