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

Release 2021-06-08 #1577

Merged
merged 41 commits into from
Jun 8, 2021
Merged

Release 2021-06-08 #1577

merged 41 commits into from
Jun 8, 2021

Conversation

smatting
Copy link
Contributor

@smatting smatting commented Jun 7, 2021

See updates in changelog

jschaul and others added 30 commits May 27, 2021 12:39
* cargohold: Override outside mimetype to always be application/octet-stream on upload

* reduce diff change by scoping variables better

* minor refactoring

* Add a note to swagger

* wording in comments: consistency
* Move federation errors from brig to wire-api-federation

* Move federation -> wai error translation to wire-api-federation

* Check if remote users exist when adding to a conversation

* Enable federation in galley integration tests

* Add remote user to conversation: invalid domain test

* Disable add remote member test for now

* Mock federator in add remote users test

* Test add non-existing remote user

* Make federationNotConfigured error more general

It used to be specific to brig, but not it is used by galley as well.

* Add federator to galley's helm charts

* Make failure test more plausible

Test scenario where both Bob and Charlie are added to a conversation,
but only Charlie exists on the remote backend.

* Handle deleted remote users when adding to a conversation

Also add corresponding test

* galley: Update comment to addMembers

Mark first point of the TODO list as DONE, but leave it there for future
reference.
* Add required fields to Swagger schemas

There are two parts to this:

  1) SchemaDoc is now an instance of a NearSemiRing type class, to
  support the existence of two different schema concatenation operations.
  The second operation `add` is used by the Alternative instance, and
  the main one `(<>)` continues to be used by the Applicative one. The
  Swagger implementation of `add` works the same as `(<>)`, but it
  intersects required fields instead of concatenating them.

  2) Required fields are added to the Swagger doc by the `field`
  combinator. Single fields are always required, whereas trivial fields
  obtained with say `pure` are not. Since the `Alternative` instance
  intersects required fields, we automatically get the correct behaviour
  that fields with a default value are not required, as well as fields
  that use the `optional` combinator from `Control.Applicative`.

Unfortunately, the NearSemiRing instance for Swagger is not exactly
law-abiding, but this comes down to Swagger not really being designed to
support schema alternatives. In special situations, one might need to
tweak the required field of the resulting schema, but the current
solution should cover most cases.

* Use Monoid instance for element SchemaP

The Alternative instance used to work as well (and have the same
implementation), but after the introduction of the NearSemiRing
constraint for doc, the Monoid instance is the only one that can be
used in this case.
* schema-profunctor: Simpler implementation of lax.
* More documentation for schema-profunctor
* remove superfluous pragma

Co-authored-by: Stefan Matting <stefan@wire.com>
* setLegalholdStatusInternal: Use same guard

* canUserJoinTeam: use same guard

* factor out separate check for activation hook

* fix bug in guards
* Relation -> RelationHistory + TODOs

* Fix: lookup connections for blocking 1:1 convs, not convs directly.

Connect convs do not contain the other user, so in order to find the
other user it's not good to go through that.

* fix: unblock filters unneccessarily on convtype

* Make tests more exhaustive.

Co-authored-by: Stefan Matting <stefan@wire.com>
* Refactoring-friendly FutureWork data type.

* Remove duplicate FUTUREWORK.

* Remove mysterious FUTUREWORK.
* Update Rich Info docs

remove any mention of the deprecated API

* Update rich-info.md
* Add some missing charts

I noticed these aren't getting bumped and synced anymore
* Implement updateConversationMemberships RPC

* updateConversationMembership now takes a list of qualified user ids

The event generated by adding users to a remote conversation should be
sent to all local users in the conversation, regardless of whether any
local users were added, and it should contain all users added, not just
the local ones.

* Add test for updateConversationMemberships

* Add notification test for remote join event

* Also notify just joined members
* expose adding remote members to a conversation for (test-only) backends explicitly configured to allow federation
* Mocked responses can now depend on requests

* Follow changes in mock federator

* Add docs to mock federator functions
…onsent feature in tests (#1557)

Co-authored-by: Matthias Fischmann <mf@zerobuzz.net>
* Generalises the mock federator to work with any MonadIO m monad, and not
just IO
Also:
- Run apk update in a separate RUN command
- Do not double install libsodium-dev and llvm-libunwind-dev
- Add comment to explain the 'curl -h'
* Add optional field to Wai.Error

* Add federation error data fields

* Store extra info in federation client errors

* Follow changes in federation errors

* Test data fields of federation errors

* Add comments to explain the use of StateT
…#1563)

Introduces a generalized version of wai-extra Session type constructor

- It allows for having any MonadIO m monad at the bottom, and not just IO
* Avoid wrapping error in rethrow middleware

If the error body is already a JSON serialisation of a Wai.Error, there
is no need to add another layer of wrapping.

* Update test assertion after error unwrapping

A test was relying on an error being wrapped inside a
"server-error"-labelled error. This is not the case anymore.
- It allows to access a Galley instance in a monad implementing the class.
- Introduces qualified users in NewConv
- Checks if remote users exist upon creating a conversation
- Adds remote users to the database
- Adds integration tests for qualified users
- Updates golden tests related to NewConv
- Add fromJSON test for NewConv to establish backwards-compatibility.
  This is to make sure the `qualified_users` is indeed optional
  in the JSON being parsed.

Co-authored-by: Paolo Capriotti <paolo@capriotti.io>
akshaymankar and others added 9 commits June 3, 2021 17:52
Also:
- Add combinator for `Data.Set.Set` in schema-profunctor
- Add `ToSchema` instance for `Integer`
- Add tests to verify comma separated list in ignore_missing and report_missing query params
- Document the precedence of various ways to ignore missing clients
* Qualify conversation and from fields in Event

Also update examples and golden tests.

Consumers of the generated JSON should not be affected, because the
fields containing unqualified data are still present in the output.

* Define JSON instances for SimpleMember via Schema

- Add default value for `conversation_role` field in the schema for `SimpleMember`
- Add test to check that the default value above is used
- Inline an object schema definition for `SimpleMembers`

* Make list of user ids in SimpleMembers qualified

* Follow changes in Event type
* Add missing /list-users route

* Add /list-users endpoint to demo config
This type will have special instances of HasSwagger so we can express the error
responses of a request using UVerb and they will appear correctly in the swagger
documentation.
* federator: rename Brig -> Service and add galley

* Fix galley hostname in helm charts

* Finish renaming brig to service

* Test galley requests for ExternalServer

* Use existing endpoints as mocked requests
CHANGELOG.md Show resolved Hide resolved
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.

Can we please readjust the Changelog a little?

CHANGELOG.md Outdated Show resolved Hide resolved
smatting and others added 2 commits June 8, 2021 16:15
Co-authored-by: Akshay Mankar <akshay@wire.com>
@smatting smatting requested review from akshaymankar and jschaul June 8, 2021 14:27
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.

🚀

@smatting smatting merged commit a56fb4a into master Jun 8, 2021
@smatting smatting deleted the release_2021-06-08 branch June 8, 2021 15:13
@jschaul jschaul mentioned this pull request Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants