Integrate with OSM Teams using a feature flag #408
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.
Addresses: #390
This branch introduces the ability to fetch teams from the OSM Teams service instead of the OSMCha endpoint. This is controllable using a feature flag in the
/src/config/index.js
file. This PR should not cause any changes to the production website, because the feature flag is set tofalse
by default.I figured that a feature flag was the simplest and safest way to eventually migrating all team data to OSM Teams. Although here are all of the options I considered:
1. Choosing a service via feature flag
Keep the feature flag, but refactor it behind an environment variable or command line arg.
Non-goal, but worth considering in the future, is to make the feature flag configurable by the user (eg: via a menu checkbox option or directly in the js console)
PROS:
yarn run osm-teams
will start the app with the osm-teams feature flag enabled.CONS:
2. Implicitly merging the teams from both services
We can have the client fetch teams from both OSMCha and osm-teams, and merge them on the client as well. If we do this, however, we will need to answer some questions about merging teams. For example, are we going to have teams with the same id's on both services? If so, how will we handle the merge? And for how long do we want to persist teams from both endpoints?
3. Explicitly selecting the teams from both services
Add an extra UI widget that will allow the user to choose teams from OSMCha or osm-teams explicitely.
PROS
CONS
I think I would favor option 1 because it would allow incremental development, and once we feel that osm-teams is ready, we can enable the feature flag by default or remove it entirely. Also, it seems like the goal is to replace OSMCha's team service entirely with the osm-teams service, and not support the ability to use both services simultaneously. But of course, I'm lacking some context and there might be some use cases that I'm missing.
Let me know if there are any thoughts 👍
TODO's:
exclude_teams
andexclude_trusted_teams
filters to make sure they are working with the OSM Teams service. I suspect they will need to be updated to leverage the new filter types.