1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Unleash is the open source feature toggle service.
Go to file
Christopher Kolstad 5b66346e56
fixes 2-456: Preserve all data from strategy import (#2720)
## What
Previously when importing strategies we've used the same data type we've
used for creating strategies (the minimal, a name, an optional
description, optional parameters and an optional editable column). This
meant that exporting strategies and then importing them would reactivate
deprecated strategies. This PR changes to allow the import to preserve
all the data coming in the export file.

## Tests
Added four new tests, two new unit tests using our fake stores and two
new e2e tests. Interestingly the ones in the fake store ran green before
this change as well, probably because we just insert the parsed json
object in the fake store, whereas the real store actually converts the
object from camelCasing to the postgresql snake_casing standard.

## Discussion points:
### Mismatch between fake and real stores
This is inevitable since storing things in javascript arrays vs saving
in a real database will have some differences, but this again shows the
value of our e2e tests.

### Invariants
Should we see if we can add some invariants to our import/export so that
we can write some proptests for it? One candidate is commutativity of
import/export. On a fresh database importing and then exporting should
yield the same file that was imported provided all flags are turned on.
Candidate for Q1 improvement of import/export.
2022-12-21 13:33:41 +01:00
.do open-api addon controller (#1721) 2022-06-22 13:49:18 +03:00
.github fix: allow publish-new-version action to run from branch (#2698) 2022-12-15 09:25:44 +01:00
.husky refactor: fix husky and lint-staged setup (#1654) 2022-06-02 08:08:53 +02:00
coverage fix: update coverage files 2022-12-01 10:32:39 +01:00
docker chore(deps): update dependency minimatch to v5 (#2400) 2022-11-10 21:36:46 +00:00
docs/api/oas docs: Remove/update references to Heroku (#2099) 2022-10-19 12:02:00 +00:00
examples feat: update docs to match v4. 2021-05-18 11:19:33 +02:00
frontend Remove favorites feature flag (#2722) 2022-12-21 12:03:06 +00:00
perf feat: add segments (#1426) 2022-03-29 14:59:14 +02:00
scripts fix: move docker-compose to this repo (#2666) 2022-12-12 20:40:18 +01:00
src fixes 2-456: Preserve all data from strategy import (#2720) 2022-12-21 13:33:41 +01:00
website Docs: fix typo / lexical illusion "the the" -> "to the" 2022-12-18 23:06:35 +01:00
.dockerignore Docker cross-compilation with buildx (#2003) 2022-08-30 12:39:28 +00:00
.editorconfig Move e2e tests from frontend to backend .github (#1975) 2022-08-29 12:25:11 +00:00
.eslintignore Feat/add change request settings (#2390) 2022-11-11 10:09:25 +02:00
.eslintrc fix: remove stray only (#2589) 2022-12-02 13:10:39 +01:00
.gitignore docs: adds documentation for personal api tokens (#2164) 2022-10-13 11:02:04 +02:00
.lycheeignore docs: remove instagram url from link checker (#2257) 2022-10-26 09:43:23 +02:00
.node-version chore(deps): update node.js to v14.21.1 (#2385) 2022-11-10 15:58:42 +01:00
.nvmrc Reset token (#786) 2021-04-16 15:29:23 +02:00
.prettierignore Personal access tokens backend (#2064) 2022-09-16 10:54:27 +03:00
app.json fix: tell heroku to not build in production mode 2022-10-18 21:35:50 +02:00
CHANGELOG.md chore: update CHANGELOG.md 2021-10-29 13:18:38 +02:00
CODE_OF_CONDUCT.md Added version to simplify tracking in Vanta & SOC2 2022-05-05 11:08:56 +02:00
CONTRIBUTING.md Docker cross-compilation with buildx (#2003) 2022-08-30 12:39:28 +00:00
docker-compose.yml fix: move docker-compose to this repo (#2666) 2022-12-12 20:40:18 +01:00
Dockerfile Fix docker build (#2326) 2022-11-03 15:02:20 +01:00
LICENSE fix: license year and company 2020-05-12 22:41:36 +02:00
package.json 4.19.1 2022-12-15 12:46:12 +00:00
README.md Make build badge work correctly (#2710) 2022-12-19 11:23:07 +02:00
renovate.json chore: update renovte config 2021-09-29 21:14:27 +02:00
tsconfig.json Merge frontend with backend (#1962) 2022-08-26 07:25:31 +00:00
yarn.lock chore(deps): update dependency @types/node to v16.18.8 (#2662) 2022-12-10 20:34:16 +00:00

🚀 Unleash 4.16 brings powerful Constraints feature to OSS users. Read more →

The Unleash website

Build and Tests Coverage Status Docker Pulls Apache-2.0 license Join Unleash on Slack

Open Live Demo →

About Unleash

Unleash is an open source feature management solution. It improves the workflow of your development team and leads to quicker software delivery. Unleash increases efficiency and gives teams full control of how and when they enable new functionality for end users. Unleash lets teams ship code to production in smaller releases whenever they want.

Feature toggles make it easy to test how your code works with real production data without the fear that you'll accidentally break your users' experience. It also helps your team work on multiple features in parallel without each maintaining an separate feature branch.

Unleash is the largest open source solution for feature flagging on GitHub. There's 12 official client and server SDKs and 10+ community SDKs available; you can even make your own if you want to. You can use Unleash with any language and any framework.


Get started in 2 steps

1. Start Unleash

With git and docker installed, it's easy to get started:

Run this script:

git clone git@github.com:Unleash/unleash.git
cd unleash
docker compose up -d

Then point your browser to localhost:4242 and log in using:

  • username: admin
  • password: unleash4all

If you'd rather run the source code in this repo directly via Node.js, see the step-by-step instructions to get up and running in the contributing guide.

2. Connect your SDK

Find your preferred SDK in our list of official SDKs and import it into your project. Follow the setup guides for your specific SDK.

If you use the docker compose file from the previous step, here's the configuration details you'll need to get going:

  • For front-end SDKs, use:
    • URL: http://localhost:4242/api/frontend/
    • clientKey: default:development.unleash-insecure-frontend-api-token
  • For server-side SDKs, use:
    • Unleash API URL: http://localhost:4242/api/
    • API token: default:development.unleash-insecure-api-token

If you use a different setup, your configuration details will most likely also be different.

Check a feature toggle

Checking the state of a feature toggle in your code is easy! The syntax will vary depending on your language, but all you need is a simple function call to check whether a toggle is available. Here's how it might look in Java:

if (unleash.isEnabled("AwesomeFeature")) {
  // do new, flashy thing
} else {
  // do old, boring stuff
}

Run Unleash on a service?

If you don't want to run Unleash locally, we also provide easy deployment setups for Heroku and Digital Ocean:

Deploy to Heroku Deploy to DigitalOcean

Configure and run Unleash anywhere

The above sections show you how to get up and running quickly and easily. When you're ready to start configuring and customizing Unleash for your own environment, check out the documentation for getting started with self-managed deployments, Unleash configuration options, or running Unleash locally via docker.


Online demo

Try out the Unleash online demo.

The Unleash online demo


Community and help — sharing is caring

We know that learning a new tool can be hard and time-consuming. We have a growing community that loves to help out. Please don't hesitate to reach out for help.

Join Unleash on Slack

💬 Join Unleash on Slack if you want ask open questions about Unleash, feature toggling or discuss these topics in general.

💻 Create a GitHub issue if you have found a bug or have ideas on how to improve Unleash.

📚 Visit the documentation for more in-depth descriptions, how-to guides, and more.


Contribute to Unleash

Building Unleash is a collaborative effort, and we owe a lot of gratitude to many smart and talented individuals. Building it together with community ensures that we build a product that solves real problems for real people. We'd love to have your help too: Please feel free to open issues or provide pull requests.

Check out the CONTRIBUTING.md file for contribution guidelines and the Unleash developer guide for tips on environment setup, running the tests, and running Unleash from source.

Contributors

The Unleash contributors


Features our users love

Flexibility and adaptability

Security and performance

  • Privacy by design (GDPR and Schrems II). End-user data never leaves your application.
  • Audit logs
  • Enforce OWASP's secure headers via the strict HTTPS-only mode
  • Flexible hosting options: host it on premise or in the cloud (any cloud)
  • Scale the Unleash Proxy independently of the Unleash server to support any number of front-end clients without overloading your Unleash instance

Looking for more features?

If you're looking for one of the following features, please take a look at our Pro and Enterprise plans:


Architecture

Read more in the system overview section of the Unleash documentation.


Unleash SDKs

To connect your application to Unleash you'll need to use a client SDK for your programming language.

Official server-side SDKs:

Official front-end SDKs:

The front-end SDKs connects via the Unleash Proxy in order to ensure privacy, scalability and security.

Community SDKs:

If none of the official SDKs fit your need, there's also a number of community-developed SDKs where you might find an implementation for your preferred language (such as Elixir, Dart, Clojure, and more).


Users of Unleash

Unleash is trusted by thousands of companies all over the world.

Proud Open-Source users: (send us a message if you want to add your logo here)

The Unleash logo encircled by logos for Finn.no, nav (the Norwegian Labour and Welfare Administration), Budgets, Otovo, and Amedia. The encircling logos are all connected to the Unleash logo.


Migration guides

Unleash has evolved significantly over the past few years, and we know how hard it can be to keep software up to date. If you're using the current major version, upgrading shouldn't be an issue. If you're on a previous major version, check out the Unleash migration guide!


Want to know more about Unleash?

Videos and podcasts

Articles and more