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

Feature/aggregate strategies api #147

Merged
merged 9 commits into from
Sep 7, 2016
Merged

Conversation

ivarconr
Copy link
Member

@ivarconr ivarconr commented Aug 22, 2016

Adds initial support for (see #102).

In this first implementation unleash-api will return both the new strategies property along with the old deprecated strategy and parameters property. These deprecated props will be removed in the next version of .

The unleash-api will translate "legacy" format into to the new format when it recieves POST requests to create or PUT to update feature toggles.

@ivarconr
Copy link
Member Author

Before this PR is merged i will perform some testing with actual prod-data to see that it behaves as ut should.

@ivarconr ivarconr force-pushed the feature/aggregate_strategies_api branch from 4944a04 to e373f1c Compare September 5, 2016 19:27
@@ -74,6 +70,7 @@ module.exports = function (db, eventStore) {
}

function updateFeature (data) {
console.log(data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove logger.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

ivarconr and others added 8 commits September 6, 2016 21:31
This commit changes the features-tables:
- drop columns 'strategy' and 'parameters'
- add column 'strategies' of type json.
- migrates existing strategy-mappings in to the new format.

The idea is that the 'strategies' column should contain a json-array
of strategy-configuration for the toggle:

```
[{
 "name" : "strategy1",
 "parameters": { "name": "vale" }
}]

```

To make sure to not break exiting clients the api is extended with a
mapping layer (adding old fields to the json-respons, and mapping
to the new format on create/update a feature toggle.

this commit is first step in solving #102
@ivarconr ivarconr force-pushed the feature/aggregate_strategies_api branch from 7225c6f to 21e8234 Compare September 6, 2016 19:38
@ivarconr
Copy link
Member Author

ivarconr commented Sep 7, 2016

@sveisvei I want to merge this PR ready as it solves the unleash-api-part of #102. The API should be compatible with the existing admin dashboard (but you won't of course be able to use aggregate strategies before this feature is implemented for the UI)

@sveisvei
Copy link
Contributor

sveisvei commented Sep 7, 2016

wfm

@ivarconr ivarconr merged commit 32ddc56 into master Sep 7, 2016
@ivarconr ivarconr deleted the feature/aggregate_strategies_api branch November 2, 2016 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants