Skip to content

Commit

Permalink
Issue 447 (#450)
Browse files Browse the repository at this point in the history
* Add debug on dry-run and add parameters which had been forgotten for debug and linting.

* Race condition: trying to create an already created bucket.
As there are a lot of workers and threads, it may happen (has been observed).

Closes #447 and closes #439
  • Loading branch information
gusmith authored Oct 14, 2019
1 parent ae82d15 commit c12f73b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 5 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,19 @@ stages:
--set api.www.image.tag=$(DOCKER_TAG) \
--set api.app.image.tag=$(DOCKER_TAG) \
--set api.dbinit.image.tag=$(DOCKER_TAG) \
--set workers.image.tag=$(DOCKER_TAG)
--set workers.image.tag=$(DOCKER_TAG) \
--set workers.replicaCount=4
echo "Dry run"
helm upgrade --install --dry-run --wait --namespace $(NAMESPACE) $(DEPLOYMENT) . \
helm upgrade --install --debug --dry-run --wait --namespace $(NAMESPACE) $(DEPLOYMENT) . \
--set api.app.debug=true \
--set global.postgresql.postgresqlPassword=notaproductionpassword \
--set api.ingress.enabled=false \
--set api.www.image.tag=$(DOCKER_TAG) \
--set api.app.image.tag=$(DOCKER_TAG) \
--set api.dbinit.image.tag=$(DOCKER_TAG) \
--set workers.image.tag=$(DOCKER_TAG)
--set workers.image.tag=$(DOCKER_TAG) \
--set workers.replicaCount=4
env:
KUBECONFIG: $(KUBECONFIGFILE)
displayName: 'Lint and dry-run'
Expand Down
5 changes: 4 additions & 1 deletion backend/entityservice/object_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ def connect_to_object_store():
logger.debug("Connected to minio")
if not mc.bucket_exists(config.MINIO_BUCKET):
logger.info("Creating bucket {}".format(config.MINIO_BUCKET))
mc.make_bucket(config.MINIO_BUCKET)
try:
mc.make_bucket(config.MINIO_BUCKET)
except minio.error.BucketAlreadyOwnedByYou:
logger.info("The bucket {} was already created.".format(config.MINIO_BUCKET))
return mc

0 comments on commit c12f73b

Please sign in to comment.