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

composition: Enable feature flags to conflict with each other #244

Open
ethanjli opened this issue Jun 13, 2024 · 0 comments
Open

composition: Enable feature flags to conflict with each other #244

ethanjli opened this issue Jun 13, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ethanjli
Copy link
Member

Currently, resource conflicts are not checked between resource objects within a package deployment; this makes it feasible to produce an export filetree with a directory as a target and then add more files (e.g. under feature flags) under that directory (e.g. as in https://github.com/forklift-run/pallet-example-sysexts/blob/96b5644ec93fb895a8fdabd15bf4fec6d1b7349b/deployments/dive/forklift-package.yml). But it means we have no way to constrain which feature flags may be enabled together within a package deployment. Mutual exclusion would instead have to be implemented by providing two alternative packages which duplicate some files/configuration values; but that approach is the path to having combinatorial explosions of duplicate packages depending on which sets of feature flags are allowed together. The motivating use-case for allowing feature flags to conflict with each other is where we have a set of feature flags which we want to act as an enum (e.g. for setting an environment variable to one of multiple allowed values, or setting the container image used by a Docker Compose app to one of multiple allowed values). We could support that by allowing each feature flag to specify an explicit set of feature flags which they conflict with. Alternatively, we could allow non-boolean variables whose values would be declared by the package deployment and which could be rendered into template files (but file templating adds a lot of usability complexity which I'd prefer to avoid for now) or provided as environment variables for Compose apps; we could specify default values for those variables, and/or constraints on allowed values for those variables.

Note: resource dependencies can already be satisfied among resource objects within a package deployment, so dependencies among feature flags are already a solved problem.

@ethanjli ethanjli added the enhancement New feature or request label Jun 13, 2024
@ethanjli ethanjli self-assigned this Jun 14, 2024
@ethanjli ethanjli changed the title Enable feature flags to conflict with each other constraints: Enable feature flags to conflict with each other Jun 14, 2024
@ethanjli ethanjli changed the title constraints: Enable feature flags to conflict with each other composition: Enable feature flags to conflict with each other Jun 14, 2024
@ethanjli ethanjli added this to the Backlog milestone Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant