Skip to content

Commit

Permalink
fix:reslove pr issues
Browse files Browse the repository at this point in the history
  • Loading branch information
530051970 committed Mar 29, 2024
1 parent 3ee19f7 commit 38aefa4
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 9 deletions.
7 changes: 3 additions & 4 deletions source/constructs/api/catalog/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ def sync_crawler_result(
tables_response = glue_client.get_tables(
DatabaseName=glue_database_name, NextToken=next_token
)
print(f"tableList is {tables_response['TableList']}")
logger.info(f"The number of tables is {len(tables_response['TableList'])}")
# logger.info("get glue tables" + str(tables_response))
delete_glue_table_names = []
Expand Down Expand Up @@ -1200,7 +1199,7 @@ def delete_catalog_by_account_region(account_id: str, region: str):
try:
crud.delete_catalog_column_level_classification_by_account_region(account_id, region)
except Exception as e:
print(f"{str(e)}")
logger.info(f"{str(e)}")
# raise BizException(
# MessageEnum.CATALOG_COLUMN_DELETE_FAILED.get_code(),
# MessageEnum.CATALOG_COLUMN_DELETE_FAILED.get_msg(),
Expand All @@ -1226,7 +1225,7 @@ def delete_catalog_by_database_region(database: str, region: str, type: str):
try:
crud.delete_catalog_column_level_classification_by_database_region(database, region, type)
except Exception as e:
print(f"{str(e)}")
logger.info(f"{str(e)}")
# raise BizException(
# MessageEnum.CATALOG_COLUMN_DELETE_FAILED.get_code(),
# MessageEnum.CATALOG_COLUMN_DELETE_FAILED.get_msg(),
Expand All @@ -1251,7 +1250,7 @@ def delete_catalog_by_database_region_batch(database: str, region: str, type: st
try:
crud.delete_catalog_column_level_classification_by_database_region_batch(database, region, type)
except Exception as e:
print(f"{str(e)}")
logger.info(f"{str(e)}")
# raise BizException(
# MessageEnum.CATALOG_COLUMN_DELETE_FAILED.get_code(),
# MessageEnum.CATALOG_COLUMN_DELETE_FAILED.get_msg(),
Expand Down
2 changes: 0 additions & 2 deletions source/constructs/api/data_source/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,10 +775,8 @@ async def __delete_jdbc_connection(provider_id: int, account: str, region: str,
delete_catalog_by_database_region_batch(database=instance_id, region=region, type=database_type)
logger.info('delete_catalog_by_database_region end')
except BizException as be:
print(f"delete_catalog_by_database_region biz res is >>>>>>{instance_id}-{be.__msg__()}")
return instance_id, be.__msg__()
except Exception as e:
print(f"delete_catalog_by_database_region res is >>>>>>{instance_id}-{str(e)}")
return instance_id, str(e)

if not delete_catalog_only:
Expand Down
1 change: 0 additions & 1 deletion source/constructs/api/pytest/test_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ def test_get_labels_by_one_database(mocker):
}
)
assert get_labels_by_one_database.status_code == 200
print(get_labels_by_one_database.json())
assert 'status' in get_labels_by_one_database.json()
assert get_labels_by_one_database.json()['status'] == 'success'

Expand Down
1 change: 0 additions & 1 deletion source/constructs/api/pytest/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def test_tables(mocker):
headers={"authorization": "Bearer fake_token"}
)
assert get_tables.status_code == 200
print(get_tables.json())
assert 'status' in get_tables.json()
assert get_tables.json()['status'] == 'success'
if __name__ == '__main__':
Expand Down
1 change: 0 additions & 1 deletion source/constructs/api/template/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ def batch_create(file: UploadFile = File(...)):
batch_result = asyncio.run(batch_add_identifier(created_identifier_list))
result = {item[0]: f"{item[1]}/{item[2]}" for item in batch_result}
for row_index, row in enumerate(sheet.iter_rows(min_row=3), start=2):
# print(f"row[10] id {row[1].value} ")
if row[10] and row[10].value:
continue
v = result.get(row[0].value)
Expand Down

0 comments on commit 38aefa4

Please sign in to comment.