Skip to content

Commit 1aff116

Browse files
authored
[COST-4981] reset local unleash (#5148)
1 parent cd7ddb9 commit 1aff116

File tree

7 files changed

+215
-258
lines changed

7 files changed

+215
-258
lines changed

.env.example

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ DEVELOPMENT=True
2121

2222
PROMETHEUS_MULTIPROC_DIR='/tmp'
2323
CURRENCY_URL=https://open.er-api.com/v6/latest/USD
24-
UNLEASH_TOKEN='*:*.dbffffc83b1f92eeaf133a7eb878d4c58231acc159b5e1478ce53cfc'
24+
UNLEASH_ADMIN_TOKEN='*:*.dbffffc83b1f92eeaf133a7eb878d4c58231acc159b5e1478ce53cfc'
25+
UNLEASH_TOKEN='*:development.dbffffc83b1f92eeaf133a7eb878d4c58231acc159b5e1478ce53cfc'
26+
UNLEASH_PAT='user:6188b62f2f59348f3c195b66983147111682f4bb78a3f7ed9626bd84'
2527
POLLING_TIMER=60 # Set how often you can trigger downloads per provider
2628
PROCESSING_WAIT_TIMER=3 # Set how many days before a long processing provider can be polled again
2729
LARGE_PROCESSING_WAIT_TIMER=7 # Set how many days before a long LARGE customer processing provider can be polled again

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ dev/*.yml
144144

145145
# unleash cache
146146
.unleash/cache/
147+
dev/containers/unleash/cache/
147148

148149
# performance profiling
149150
/koku.iml

.unleash/flags.json

-225
This file was deleted.

Makefile

+1-21
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ help:
111111
@echo " superuser create a Django super user"
112112
@echo " unittest run unittests"
113113
@echo " local-upload-data upload data to Ingress if it is up and running locally"
114-
@echo " unleash-export export feature-flags to file"
115-
@echo " unleash-import import feature-flags from file"
116-
@echo " unleash-import-drop import feature-flags from file AND wipe current database"
117114
@echo " scan_project run security scan"
118115
@echo ""
119116
@echo "--- Commands using Docker Compose ---"
@@ -256,19 +253,6 @@ unittest:
256253
superuser:
257254
$(DJANGO_MANAGE) createsuperuser
258255

259-
unleash-export:
260-
curl -X GET -H "Authorization: Basic YWRtaW46" \
261-
"http://localhost:4242/api/admin/state/export?format=json&featureToggles=1&strategies=0&tags=0&projects=0&download=1" \
262-
-s | python -m json.tool > .unleash/flags.json
263-
264-
unleash-import:
265-
curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46" \
266-
-s -d @.unleash/flags.json http://localhost:4242/api/admin/state/import
267-
268-
unleash-import-drop:
269-
curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46" \
270-
-s -d @.unleash/flags.json http://localhost:4242/api/admin/state/import?drop=true
271-
272256
clowdapp: kustomize
273257
$(KUSTOMIZE) build deploy/kustomize > deploy/clowdapp.yaml
274258

@@ -372,12 +356,8 @@ docker-up-min-no-build-with-listener: docker-up-min-no-build
372356

373357
docker-up-db:
374358
$(DOCKER_COMPOSE) up -d db
375-
@until pg_isready -h $${POSTGRES_SQL_SERVICE_HOST:-localhost} -p $${POSTGRES_SQL_SERVICE_PORT:-15432} >/dev/null ; do \
376-
printf '.'; \
377-
sleep 0.5 ; \
378-
done
379-
@echo ' PostgreSQL is available!'
380359
$(DOCKER_COMPOSE) up -d unleash
360+
dev/scripts/setup_unleash.py
381361

382362
docker-up-db-monitor:
383363
$(DOCKER_COMPOSE) up --build -d grafana

dev/containers/unleash/flags.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"version": 1,
3+
"features": []
4+
}

0 commit comments

Comments
 (0)