flowfuse icon indicating copy to clipboard operation
flowfuse copied to clipboard

Add 'auto-enable all feature flags' to TeamType configuration

Open knolleary opened this issue 1 year ago • 10 comments

Description

We manage features via feature flags. Each TeamType is configured via a set of checkboxes to enable the features available to that particular TeamType.

On FFC, our Enterprise team type is expected to have all features available; so we have to ensure we tick the box as part of rolling out a new feature. This can be helpful as it allows us to deploy code to production and then selectively enable it - useful when there are other things that need to be in place in a co-ordinated fashion.

For our self-hosted customers, this can mean they don't automatically see new features when they upgrade if they don't know to tick the box under their TeamType config.

I'm proposing we add a 'enable all feature flags' option to the TeamType config. If ticked, then any team-level feature flag check will come back 'enabled'. Whilst we may elect not to use that on FFC, for self-hosted customers who will typically only have a single TeamType, it will reduce the admin task of accessing new features after an upgrade.

As features are also flagged via whether a license is applied or not, we could probably make this setting on-by-default for the default team type that gets created when initialising the platform.

Which customers would this be available to

Everyone - CE/Starter/Team/Enterprise

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Tasks

Listing out the required changes as tasks to tick off. Holding off raising sub-issues as I think they are all just what needs doing

  • Add 'Enable all available features' checkbox to team type dialog. When ticked, hide the feature list.
  • Update feature flag checks logic to do: 'is all-flag enabled? if not, check specific flag'. In the backend, this is centralised in TeamType.getFeatureProperty. Frontend should have similar centralised logic, just not sure off the top of my head where that is.
  • Update the platform setup wizard (that creates a default TeamType) to set this flag by default.
  • Verify feature flag checks apply as expected
    • eg non-enterprise licensed install should not start showing EE features as available (because the platform flag will be false regardless of the teamtype)

knolleary avatar Dec 03 '24 16:12 knolleary

@cstns You'd given some ideas for delivering this in Feature enablement for self-hosted customers #5958.

gstout52 avatar Oct 15 '25 19:10 gstout52

I was mainly voicing some concerns that were related to features that are dependent on the FFC platform to run properly, like the assistant config which is something we don't want to make public. Otherwise it was mainly a repeat of the above

cstns avatar Oct 16 '25 08:10 cstns

@ppawlowski Please evaluate the problem and weigh in on if this proposed solution is ideal. If not, propose one.

gstout52 avatar Oct 30 '25 16:10 gstout52

I agree with @cstns - while having global 'enable all features' looks like a quick win, we should somehow handle features that require additional configuration before enabling (like AI stuff or the Tables feature).

ppawlowski avatar Oct 30 '25 17:10 ppawlowski

we should somehow handle features that require additional configuration before enabling (like AI stuff or the Tables feature).

I don't see how additional configuration is needed to enable AI or the Tables feature, just that using those features requires the user to take steps that are more complicated than clicking a box or moving a node onto a canvas. Am I missing something? @ppawlowski cc: @cstns

gstout52 avatar Nov 03 '25 18:11 gstout52

AI assistant and the tables feature require platform configuration that include confidential information ie passwords, tokens, usernames and hosts that should not be shared with customers. While the tables feature could be configured to run on prem (@hardillb could clarify this) the AI assistant can't.

The catch here is how to make the features available to on-prem installations without exposing the credentials

cstns avatar Nov 04 '25 07:11 cstns

  • AI Assistant requires self hosted customers to acquire an access token from us before it can work. The token currently need to be manually generated and added to the Node-RED flow that acts as the backend of all instances of FlowFuse AI Assistant. The feature does not work until that token is provided, even if enabled at a team level. (documented here: https://flowfuse.com/docs/user/assistant/#flowfuse-assistant-for-self-hosted-customers)
  • FlowFuse Tables for self hosted customers requires them to set up a separate Postgres DB instance (this should be done by their local Ops/Infrastructure team so that correct sizing and backups can be properly planned) and then supply the details as flowfuse.yml configuration parameters, again this feature will not be enabled without these being provided even if it is enabled at a team level. Detailed docs for this keep getting pushed out by other work.

hardillb avatar Nov 04 '25 09:11 hardillb

There will always be some features that require additional platform-level configuration.

The goal here is to remove the need for the admin to also have to tick a box in the team-type configuration.

All of the feature flag checks we have should be working on a combination of platform-level flag and team-type level flag. That will need to be verified as part of this work.

knolleary avatar Nov 11 '25 11:11 knolleary

I have added a more explicit task list to the description to better specific what needs doing.

knolleary avatar Nov 11 '25 11:11 knolleary

@knolleary and @hardillb to sync on this.

gstout52 avatar Nov 14 '25 13:11 gstout52

Think best way to do this is to add a top level Team Type feature that is just true/false and then updating the Team.getFeature(name) to check this first.

But also all this code is about to change when https://github.com/FlowFuse/flowfuse/pull/6247 gets merged, so gentle prod to @knolleary to finish the review on that first please.

hardillb avatar Nov 26 '25 11:11 hardillb