Mattermost-server: [Help Wanted] [MM-13721] Fix the etag function GetEtagForProfilesNotInTeam

Created on 20 Feb 2019  路  3Comments  路  Source: mattermost/mattermost-server

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.


Notes: Jira ticket

Etags are used for cache validation. When an HTTP client makes a request to the server, the server sometimes returns an Etag in a header. The next time the client makes that same request it includes that Etag. The server then evaluates that header to determine if anything changed. If nothing changed a 304 Not Modified is returned to the client with an empty response body. This can save computation time and network bandwidth.

The REST API endpoint GET /users has multiple Etags. The one for querying users not in a team is called GetEtagForProfilesNotInTeam. The query to resolve GetEtagForProfilesNotInTeam looks at the most recent UpdateAt for users not in the given team. However, if any but the most recent such user is added to the team, the etag won't change despite those users having a newer UpdateAt: because they won't be considered in the set anymore.

Update the query to appropriately cover this case.

If you have any questions, feel free to ask @jesse.hallam or @joram in the ~Developers channel on community.mattermost.com

Easy Hackfest TecGo

Most helpful comment

I would like to take this ticket

All 3 comments

I would like to take this ticket

Thanks @jfrerich!

Was this page helpful?
0 / 5 - 0 ratings