Skip to content

Commit

Permalink
Merge pull request #42 from wklken/bugfix_apigw_var
Browse files Browse the repository at this point in the history
bugfix: migrate via apigateway should not use settings.BK_IAM_INNER_HOST
  • Loading branch information
wklken authored Aug 10, 2021
2 parents 313805a + d843677 commit b2734a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion iam/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

__version__ = "1.1.18"
__version__ = "1.1.19"
4 changes: 3 additions & 1 deletion iam/contrib/iam_migration/migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@ def __init__(self, migration_json):
self.migration_json = migration_json

def migrate(self):
iam_host = settings.BK_IAM_INNER_HOST
app_code = settings.APP_CODE
app_secret = settings.SECRET_KEY

iam_host = ""
USE_APIGATEWAY = getattr(settings, "BK_IAM_USE_APIGATEWAY", False)
if USE_APIGATEWAY:
do_migrate.enable_use_apigateway()
iam_host = getattr(settings, "BK_IAM_APIGATEWAY_URL", "")
if iam_host == "":
raise exceptions.MigrationFailError("settings.BK_IAM_APIGATEWAY_URL should be setted")
else:
iam_host = settings.BK_IAM_INNER_HOST

# only trigger migrator at db migrate
if "migrate" not in sys.argv:
Expand Down
4 changes: 4 additions & 0 deletions release.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
版本日志
===============
# v1.1.19

- bugfix: iam migration via apigateway should not use settings.BK_IAM_INNER_HOST

# v1.1.18

- bugfix: raise exception after replace esb api prefix
Expand Down

0 comments on commit b2734a0

Please sign in to comment.