Skip to content

Commit 125b04f

Browse files
authoredMar 6, 2024··
chore: Upgrade flask to 2.2.5 and its related dependencies (#2237)
* Upgrade flask and related dependencies Signed-off-by: Kristen Armes <karmes@lyft.com> * Fix frontend tests Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing more tests Signed-off-by: Kristen Armes <karmes@lyft.com> * Revert databuilder version bump, changes don't affect it Signed-off-by: Kristen Armes <karmes@lyft.com> --------- Signed-off-by: Kristen Armes <karmes@lyft.com>
1 parent 0602992 commit 125b04f

19 files changed

+78
-73
lines changed
 

‎common/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from setuptools import find_packages, setup
66

7-
__version__ = '0.31.0'
7+
__version__ = '0.32.0'
88

99

1010
requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements-dev.txt')
@@ -38,7 +38,7 @@
3838
# This will allow for any consuming projects to use this library as
3939
# long as they have a version of pyfoobar equal to or greater than 1.x
4040
# and less than 2.x installed.
41-
'Flask>=1.0.2',
41+
'Flask>=2.2.5',
4242
'attrs>=19.0.0',
4343
'marshmallow>=3.0',
4444
'marshmallow3-annotations>=1.1.0'

‎frontend/setup.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ def build_js() -> None:
4545
with open(requirements_path) as requirements_file:
4646
requirements_dev = requirements_file.readlines()
4747

48-
__version__ = '4.2.1'
48+
__version__ = '4.3.0'
4949

5050
jira = ['jira==3.0.1']
5151
asana = ['asana==0.10.3']
5252
oidc = ['flaskoidc>=1.0.0']
53-
pyarrrow = ['pyarrow==3.0.0']
53+
pyarrow = ['pyarrow==3.0.0']
5454
bigquery_preview = ['google-cloud-bigquery>=2.13.1,<3.0.0', 'flatten-dict==0.3.0']
55-
all_deps = requirements + requirements_common + requirements_dev + oidc + pyarrrow + bigquery_preview + jira + asana
55+
all_deps = requirements + requirements_common + requirements_dev + oidc + pyarrow + bigquery_preview + jira + asana
5656

5757
setup(
5858
name='amundsen-frontend',
@@ -69,7 +69,7 @@ def build_js() -> None:
6969
extras_require={
7070
'oidc': oidc,
7171
'dev': requirements_dev,
72-
'pyarrow': pyarrrow,
72+
'pyarrow': pyarrow,
7373
'bigquery_preview': bigquery_preview,
7474
'jira': jira,
7575
'asana': asana,

‎frontend/tests/unit/api/issue/test_issue.py

+11-12
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_create_issue_not_enabled(self) -> None:
106106
"""
107107
local_app.config['ISSUE_TRACKER_CLIENT_ENABLED'] = False
108108
with local_app.test_client() as test:
109-
response = test.post('/api/issue/issue', data={
109+
response = test.post('/api/issue/issue', json={
110110
'description': 'test description',
111111
'owner_ids': ['user1@email.com', 'user2@email.com'],
112112
'frequent_user_ids': ['user1@email.com', 'user2@email.com'],
@@ -127,7 +127,7 @@ def test_create_jira_issue_missing_config(self, mock_issue_tracker_client: unitt
127127
mock_issue_tracker_client.side_effect = IssueConfigurationException
128128
local_app.config['ISSUE_TRACKER_URL'] = None
129129
with local_app.test_client() as test:
130-
response = test.post('/api/issue/issue', data={
130+
response = test.post('/api/issue/issue', json={
131131
'description': 'test description',
132132
'owner_ids': ['user1@email.com', 'user2@email.com'],
133133
'frequent_user_ids': ['user1@email.com', 'user2@email.com'],
@@ -145,7 +145,7 @@ def test_create_jira_issue_no_description(self) -> None:
145145
:return:
146146
"""
147147
with local_app.test_client() as test:
148-
response = test.post('/api/issue/issue', data={
148+
response = test.post('/api/issue/issue', json={
149149
'owner_ids': ['user1@email.com', 'user2@email.com'],
150150
'frequent_user_ids': ['user1@email.com', 'user2@email.com'],
151151
'priority_level': 'P2',
@@ -162,7 +162,7 @@ def test_create_jira_issue_no_key(self) -> None:
162162
:return:
163163
"""
164164
with local_app.test_client() as test:
165-
response = test.post('/api/issue/issue', data={
165+
response = test.post('/api/issue/issue', json={
166166
'description': 'test description',
167167
'owner_ids': ['user1@email.com', 'user2@email.com'],
168168
'frequent_user_ids': ['user1@email.com', 'user2@email.com'],
@@ -179,7 +179,7 @@ def test_create_jira_issue_no_title(self) -> None:
179179
:return:
180180
"""
181181
with local_app.test_client() as test:
182-
response = test.post('/api/issue/issue', data={
182+
response = test.post('/api/issue/issue', json={
183183
'description': 'test description',
184184
'owner_ids': ['user1@email.com', 'user2@email.com'],
185185
'frequent_user_ids': ['user1@email.com', 'user2@email.com'],
@@ -196,7 +196,7 @@ def test_create_jira_issue_no_resource_path(self) -> None:
196196
:return:
197197
"""
198198
with local_app.test_client() as test:
199-
response = test.post('/api/issue/issue', data={
199+
response = test.post('/api/issue/issue', json={
200200
'description': 'test description',
201201
'owner_ids': ['user1@email.com', 'user2@email.com'],
202202
'frequent_user_ids': ['user1@email.com', 'user2@email.com'],
@@ -213,7 +213,7 @@ def test_create_jira_issue_no_priority(self) -> None:
213213
:return:
214214
"""
215215
with local_app.test_client() as test:
216-
response = test.post('/api/issue/issue', data={
216+
response = test.post('/api/issue/issue', json={
217217
'description': 'test description',
218218
'owner_ids': ['user1@email.com', 'user2@email.com'],
219219
'frequent_user_ids': ['user1@email.com', 'user2@email.com'],
@@ -230,7 +230,7 @@ def test_create_jira_issue_no_owner_ids(self) -> None:
230230
:return:
231231
"""
232232
with local_app.test_client() as test:
233-
response = test.post('/api/issue/issue', data={
233+
response = test.post('/api/issue/issue', json={
234234
'description': 'test description',
235235
'frequent_user_ids': ['user1@email.com', 'user2@email.com'],
236236
'priority_level': 'P2',
@@ -247,7 +247,7 @@ def test_create_jira_issue_no_frequent_user_ids(self) -> None:
247247
:return:
248248
"""
249249
with local_app.test_client() as test:
250-
response = test.post('/api/issue/issue', data={
250+
response = test.post('/api/issue/issue', json={
251251
'description': 'test description',
252252
'owner_ids': ['user1@email.com', 'user2@email.com'],
253253
'priority_level': 'P2',
@@ -264,7 +264,7 @@ def test_create_jira_issue_no_project_key(self) -> None:
264264
:return:
265265
"""
266266
with local_app.test_client() as test:
267-
response = test.post('/api/issue/issue', data={
267+
response = test.post('/api/issue/issue', json={
268268
'description': 'test description',
269269
'owner_ids': ['user1@email.com', 'user2@email.com'],
270270
'frequent_user_ids': ['user1@email.com', 'user2@email.com'],
@@ -285,8 +285,7 @@ def test_create_jira_issue_success(self, mock_issue_tracker_client: unittest.moc
285285

286286
with local_app.test_client() as test:
287287
response = test.post('/api/issue/issue',
288-
content_type='multipart/form-data',
289-
data={
288+
json={
290289
'description': 'test description',
291290
'owner_ids': ['user1@email.com', 'user2@email.com'],
292291
'frequent_user_ids': ['user1@email.com', 'user2@email.com'],

‎frontend/tests/unit/api/preview/test_v0.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_no_client_class(self) -> None:
3232

3333
local_app.config['PREVIEW_CLIENT'] = None
3434
with local_app.test_client() as test:
35-
response = test.post('/api/preview/v0/')
35+
response = test.post('/api/preview/v0/', json={})
3636
self.assertEqual(response.status_code, HTTPStatus.NOT_IMPLEMENTED)
3737

3838
@unittest.mock.patch(PREVIEW_CLIENT_CLASS + '.get_preview_data')
@@ -51,7 +51,7 @@ def test_good_client_response(self, mock_get_preview_data: unittest.mock.Mock) -
5151
mock_get_preview_data.return_value = Response(response=response,
5252
status=HTTPStatus.OK)
5353
with local_app.test_client() as test:
54-
post_response = test.post('/api/preview/v0/')
54+
post_response = test.post('/api/preview/v0/', json={})
5555
self.assertEqual(post_response.status_code, HTTPStatus.OK)
5656
self.assertEqual(post_response.json, expected_response_json)
5757

@@ -69,7 +69,7 @@ def test_bad_client_response(self, mock_get_preview_data: unittest.mock.Mock) ->
6969
mock_get_preview_data.return_value = Response(response=response,
7070
status=HTTPStatus.OK)
7171
with local_app.test_client() as test:
72-
post_response = test.post('/api/preview/v0/')
72+
post_response = test.post('/api/preview/v0/', json={})
7373
self.assertEqual(post_response.status_code,
7474
HTTPStatus.INTERNAL_SERVER_ERROR)
7575
self.assertEqual(post_response.json, expected_response_json)
@@ -90,7 +90,7 @@ def test_good_client_response_feature(self, mock_get_preview_data: unittest.mock
9090
mock_get_preview_data.return_value = Response(response=response,
9191
status=HTTPStatus.OK)
9292
with local_app.test_client() as test:
93-
post_response = test.post('/api/preview/v0/feature_preview')
93+
post_response = test.post('/api/preview/v0/feature_preview', json={})
9494
self.assertEqual(post_response.status_code, HTTPStatus.OK)
9595
self.assertEqual(post_response.json, expected_response_json)
9696

@@ -108,7 +108,7 @@ def test_bad_client_response_feature(self, mock_get_preview_data: unittest.mock.
108108
mock_get_preview_data.return_value = Response(response=response,
109109
status=HTTPStatus.OK)
110110
with local_app.test_client() as test:
111-
post_response = test.post('/api/preview/v0/feature_preview')
111+
post_response = test.post('/api/preview/v0/feature_preview', json={})
112112
self.assertEqual(post_response.status_code,
113113
HTTPStatus.INTERNAL_SERVER_ERROR)
114114
self.assertEqual(post_response.json, expected_response_json)

‎metadata/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from setuptools import find_packages, setup
77

8-
__version__ = '3.12.3'
8+
__version__ = '3.13.0'
99

1010
requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt')
1111
with open(requirements_path) as requirements_file:

‎metadata/tests/unit/api/column/test_column_badge_api.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,26 @@ def tearDown(self) -> None:
2828
def test_block_bad_badge_name(self) -> None:
2929
self.app.config['WHITELIST_BADGES'] = []
3030
response = self.app.test_client().put(f'/table/{TABLE_NAME}/column/{COLUMN_NAME}'
31-
f'/badge/{BADGE_NAME}?category=table_status')
31+
f'/badge/{BADGE_NAME}?category=table_status',
32+
json={})
3233

3334
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)
3435

3536
def test_block_badge_missing_category(self) -> None:
3637
self.app.config['WHITELIST_BADGES'] = [Badge(badge_name='alpha',
3738
category='table_status')]
3839
response = self.app.test_client().put(f'/table/{TABLE_NAME}/column/{COLUMN_NAME}'
39-
f'/badge/{BADGE_NAME}')
40+
f'/badge/{BADGE_NAME}',
41+
json={})
4042

4143
self.assertEqual(response.status_code, HTTPStatus.BAD_REQUEST)
4244

4345
def test_badge_with_category(self) -> None:
4446
self.app.config['WHITELIST_BADGES'] = [Badge(badge_name='alpha',
4547
category='table_status')]
4648
response = self.app.test_client().put(f'/table/{TABLE_NAME}/column/{COLUMN_NAME}'
47-
f'/badge/{BADGE_NAME}?category=table_status')
49+
f'/badge/{BADGE_NAME}?category=table_status',
50+
json={})
4851

4952
self.assertEqual(response.status_code, HTTPStatus.OK)
5053

‎metadata/tests/unit/api/dashboard/test_dashboard_badge_api.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,24 @@ def tearDown(self) -> None:
2626

2727
def test_block_bad_badge_name(self) -> None:
2828
self.app.config['WHITELIST_BADGES'] = []
29-
response = self.app.test_client().put(f'/dashboard/{DASHBOARD_NAME}/badge/{BADGE_NAME}?category=table_status')
29+
response = self.app.test_client().put(f'/dashboard/{DASHBOARD_NAME}/badge/{BADGE_NAME}?category=table_status',
30+
json={})
3031

3132
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)
3233

3334
def test_block_badge_missing_category(self) -> None:
3435
self.app.config['WHITELIST_BADGES'] = [Badge(badge_name='alpha',
3536
category='table_status')]
36-
response = self.app.test_client().put(f'/dashboard/{DASHBOARD_NAME}/badge/{BADGE_NAME}')
37+
response = self.app.test_client().put(f'/dashboard/{DASHBOARD_NAME}/badge/{BADGE_NAME}',
38+
json={})
3739

3840
self.assertEqual(response.status_code, HTTPStatus.BAD_REQUEST)
3941

4042
def test_badge_with_category(self) -> None:
4143
self.app.config['WHITELIST_BADGES'] = [Badge(badge_name='alpha',
4244
category='table_status')]
43-
response = self.app.test_client().put(f'/dashboard/{DASHBOARD_NAME}/badge/{BADGE_NAME}?category=table_status')
45+
response = self.app.test_client().put(f'/dashboard/{DASHBOARD_NAME}/badge/{BADGE_NAME}?category=table_status',
46+
json={})
4447

4548
self.assertEqual(response.status_code, HTTPStatus.OK)
4649

‎metadata/tests/unit/api/dashboard/test_dashboard_tag_api.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class TestDashboardTagAPI(DashboardTestCase):
1616

1717
def test_should_update_tag(self) -> None:
18-
response = self.app.test_client().put(f'/dashboard/{ID}/tag/{TAG}')
18+
response = self.app.test_client().put(f'/dashboard/{ID}/tag/{TAG}', json={})
1919

2020
self.assertEqual(response.status_code, HTTPStatus.OK)
2121
self.mock_proxy.add_tag.assert_called_with(id=ID,
@@ -26,12 +26,12 @@ def test_should_update_tag(self) -> None:
2626
def test_should_fail_to_update_tag_when_table_not_found(self) -> None:
2727
self.mock_proxy.add_tag.side_effect = NotFoundException(message='foo')
2828

29-
response = self.app.test_client().put(f'/dashboard/{ID}/tag/{TAG}')
29+
response = self.app.test_client().put(f'/dashboard/{ID}/tag/{TAG}', json={})
3030

3131
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)
3232

3333
def test_should_delete_tag(self) -> None:
34-
response = self.app.test_client().delete(f'/dashboard/{ID}/tag/{TAG}')
34+
response = self.app.test_client().delete(f'/dashboard/{ID}/tag/{TAG}', json={})
3535

3636
self.assertEqual(response.status_code, HTTPStatus.OK)
3737
self.mock_proxy.delete_tag.assert_called_with(id=ID,
@@ -42,6 +42,6 @@ def test_should_delete_tag(self) -> None:
4242
def test_should_fail_to_delete_tag_when_table_not_found(self) -> None:
4343
self.mock_proxy.delete_tag.side_effect = NotFoundException(message='foo')
4444

45-
response = self.app.test_client().delete(f'/dashboard/{ID}/tag/{TAG}')
45+
response = self.app.test_client().delete(f'/dashboard/{ID}/tag/{TAG}', json={})
4646

4747
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)

‎metadata/tests/unit/api/feature/test_feature_badge_api.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ def tearDown(self) -> None:
2626

2727
def test_block_bad_badge_name(self) -> None:
2828
self.app.config['WHITELIST_BADGES'] = []
29-
response = self.app.test_client().put(f'/feature/{FEATURE_NAME}/badge/{BADGE_NAME}?category=data')
29+
response = self.app.test_client().put(f'/feature/{FEATURE_NAME}/badge/{BADGE_NAME}?category=data', json={})
3030

3131
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)
3232

3333
def test_block_badge_missing_category(self) -> None:
3434
self.app.config['WHITELIST_BADGES'] = [Badge(badge_name='pii',
3535
category='data')]
36-
response = self.app.test_client().put(f'/feature/{FEATURE_NAME}/badge/{BADGE_NAME}')
36+
response = self.app.test_client().put(f'/feature/{FEATURE_NAME}/badge/{BADGE_NAME}', json={})
3737

3838
self.assertEqual(response.status_code, HTTPStatus.BAD_REQUEST)
3939

4040
def test_badge_with_category(self) -> None:
4141
self.app.config['WHITELIST_BADGES'] = [Badge(badge_name='pii',
4242
category='data')]
43-
response = self.app.test_client().put(f'/feature/{FEATURE_NAME}/badge/{BADGE_NAME}?category=data')
43+
response = self.app.test_client().put(f'/feature/{FEATURE_NAME}/badge/{BADGE_NAME}?category=data', json={})
4444

4545
self.assertEqual(response.status_code, HTTPStatus.OK)
4646

‎metadata/tests/unit/api/feature/test_feature_lineage_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def tearDown(self) -> None:
5252

5353
def test_should_return_response(self) -> None:
5454
self.mock_proxy.get_lineage.return_value = LINEAGE_RESPONSE
55-
response = self.app.test_client().get(f'/feature/{FEATURE_URI}/lineage')
55+
response = self.app.test_client().get(f'/feature/{FEATURE_URI}/lineage', json={})
5656

5757
self.mock_proxy.get_lineage.assert_called_with(id=FEATURE_URI,
5858
resource_type=ResourceType.Feature,
@@ -64,6 +64,6 @@ def test_should_return_response(self) -> None:
6464
def test_should_fail_when_feature_doesnt_exist(self) -> None:
6565
self.mock_proxy.get_lineage.side_effect = NotFoundException(message='feature not found')
6666

67-
response = self.app.test_client().get(f'/feature/{FEATURE_URI}/lineage')
67+
response = self.app.test_client().get(f'/feature/{FEATURE_URI}/lineage', json={})
6868

6969
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)

‎metadata/tests/unit/api/feature/test_feature_tag_api.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class TestFeatureTagAPI(FeatureTestCase):
1616

1717
def test_should_update_tag(self) -> None:
18-
response = self.app.test_client().put(f'/feature/{FEATURE_URI}/tag/{TAG}')
18+
response = self.app.test_client().put(f'/feature/{FEATURE_URI}/tag/{TAG}', json={})
1919

2020
self.assertEqual(response.status_code, HTTPStatus.OK)
2121
self.mock_proxy.add_tag.assert_called_with(id=FEATURE_URI,
@@ -26,12 +26,12 @@ def test_should_update_tag(self) -> None:
2626
def test_should_fail_to_update_tag_when_feature_not_found(self) -> None:
2727
self.mock_proxy.add_tag.side_effect = NotFoundException(message='cannot find feature')
2828

29-
response = self.app.test_client().put(f'/feature/{FEATURE_URI}/tag/{TAG}')
29+
response = self.app.test_client().put(f'/feature/{FEATURE_URI}/tag/{TAG}', json={})
3030

3131
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)
3232

3333
def test_should_delete_tag(self) -> None:
34-
response = self.app.test_client().delete(f'/feature/{FEATURE_URI}/tag/{TAG}')
34+
response = self.app.test_client().delete(f'/feature/{FEATURE_URI}/tag/{TAG}', json={})
3535

3636
self.assertEqual(response.status_code, HTTPStatus.OK)
3737
self.mock_proxy.delete_tag.assert_called_with(id=FEATURE_URI,
@@ -42,6 +42,6 @@ def test_should_delete_tag(self) -> None:
4242
def test_should_fail_to_delete_tag_when_feature_not_found(self) -> None:
4343
self.mock_proxy.delete_tag.side_effect = NotFoundException(message='cannot find feature')
4444

45-
response = self.app.test_client().delete(f'/feature/{FEATURE_URI}/tag/{TAG}')
45+
response = self.app.test_client().delete(f'/feature/{FEATURE_URI}/tag/{TAG}', json={})
4646

4747
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)

‎metadata/tests/unit/api/table/test_table_badge_api.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ def tearDown(self) -> None:
2626

2727
def test_block_bad_badge_name(self) -> None:
2828
self.app.config['WHITELIST_BADGES'] = []
29-
response = self.app.test_client().put(f'/table/{TABLE_NAME}/badge/{BADGE_NAME}?category=table_status')
29+
response = self.app.test_client().put(f'/table/{TABLE_NAME}/badge/{BADGE_NAME}?category=table_status', json={})
3030

3131
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)
3232

3333
def test_block_badge_missing_category(self) -> None:
3434
self.app.config['WHITELIST_BADGES'] = [Badge(badge_name='alpha',
3535
category='table_status')]
36-
response = self.app.test_client().put(f'/table/{TABLE_NAME}/badge/{BADGE_NAME}')
36+
response = self.app.test_client().put(f'/table/{TABLE_NAME}/badge/{BADGE_NAME}', json={})
3737

3838
self.assertEqual(response.status_code, HTTPStatus.BAD_REQUEST)
3939

4040
def test_badge_with_category(self) -> None:
4141
self.app.config['WHITELIST_BADGES'] = [Badge(badge_name='alpha',
4242
category='table_status')]
43-
response = self.app.test_client().put(f'/table/{TABLE_NAME}/badge/{BADGE_NAME}?category=table_status')
43+
response = self.app.test_client().put(f'/table/{TABLE_NAME}/badge/{BADGE_NAME}?category=table_status', json={})
4444

4545
self.assertEqual(response.status_code, HTTPStatus.OK)
4646

‎metadata/tests/unit/api/table/test_table_lineage_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def tearDown(self) -> None:
7474

7575
def test_should_return_response(self) -> None:
7676
self.mock_proxy.get_lineage.return_value = LINEAGE_RESPONSE
77-
response = self.app.test_client().get(f'/table/{TABLE_URI}/lineage')
77+
response = self.app.test_client().get(f'/table/{TABLE_URI}/lineage', json={})
7878
self.assertEqual(response.json, API_RESPONSE)
7979
self.assertEqual(response.status_code, HTTPStatus.OK)
8080
self.mock_proxy.get_lineage.assert_called_with(id=TABLE_URI,
@@ -85,6 +85,6 @@ def test_should_return_response(self) -> None:
8585
def test_should_fail_when_table_doesnt_exist(self) -> None:
8686
self.mock_proxy.get_lineage.side_effect = NotFoundException(message='table not found')
8787

88-
response = self.app.test_client().get(f'/table/{TABLE_URI}/lineage')
88+
response = self.app.test_client().get(f'/table/{TABLE_URI}/lineage', json={})
8989

9090
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)

‎metadata/tests/unit/api/table/test_table_tag_api.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class TestTableTagAPI(TableTestCase):
1616

1717
def test_should_update_tag(self) -> None:
18-
response = self.app.test_client().put(f'/table/{TABLE_URI}/tag/{TAG}')
18+
response = self.app.test_client().put(f'/table/{TABLE_URI}/tag/{TAG}', json={})
1919

2020
self.assertEqual(response.status_code, HTTPStatus.OK)
2121
self.mock_proxy.add_tag.assert_called_with(id=TABLE_URI,
@@ -26,12 +26,12 @@ def test_should_update_tag(self) -> None:
2626
def test_should_fail_to_update_tag_when_table_not_found(self) -> None:
2727
self.mock_proxy.add_tag.side_effect = NotFoundException(message='cannot find table')
2828

29-
response = self.app.test_client().put(f'/table/{TABLE_URI}/tag/{TAG}')
29+
response = self.app.test_client().put(f'/table/{TABLE_URI}/tag/{TAG}', json={})
3030

3131
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)
3232

3333
def test_should_delete_tag(self) -> None:
34-
response = self.app.test_client().delete(f'/table/{TABLE_URI}/tag/{TAG}')
34+
response = self.app.test_client().delete(f'/table/{TABLE_URI}/tag/{TAG}', json={})
3535

3636
self.assertEqual(response.status_code, HTTPStatus.OK)
3737
self.mock_proxy.delete_tag.assert_called_with(id=TABLE_URI,
@@ -42,6 +42,6 @@ def test_should_delete_tag(self) -> None:
4242
def test_should_fail_to_delete_tag_when_table_not_found(self) -> None:
4343
self.mock_proxy.delete_tag.side_effect = NotFoundException(message='cannot find table')
4444

45-
response = self.app.test_client().delete(f'/table/{TABLE_URI}/tag/{TAG}')
45+
response = self.app.test_client().delete(f'/table/{TABLE_URI}/tag/{TAG}', json={})
4646

4747
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)

‎requirements-common.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
# Common dependencies (common, frontend, metadata, search) -------------------------------------------------------------
55

66
# It is recommended to always pin the exact version (not range) - otherwise common upgrade won't trigger unit tests
7-
# on all repositories reyling on this file and any issues that arise from common upgrade might be missed.
7+
# on all repositories relying on this file and any issues that arise from common upgrade might be missed.
88
amundsen-common>=0.27.0
99
attrs>=19.1.0
1010
boto3==1.17.23
11-
click==7.0
11+
click==8.1.7
1212
flasgger==0.9.5
13-
Flask==1.0.2
14-
Flask-RESTful>=0.3.6
13+
Flask==2.2.5
14+
Flask-RESTful>=0.3.9
1515
flask-cors==3.0.10
16-
itsdangerous<=2.0.1
17-
Jinja2>=2.10.1,<3.1
16+
itsdangerous==2.1.2
17+
Jinja2==3.1.2
1818
jsonschema>=3.0.1,<4.0
1919
marshmallow>=3.0,<=3.6
2020
marshmallow3-annotations>=1.1.0
@@ -23,5 +23,5 @@ requests>=2.25.0
2323
requests-aws4auth==1.1.0
2424
statsd==3.2.1
2525
typing==3.6.4
26-
werkzeug==2.0.3
26+
werkzeug==3.0.1
2727
wheel==0.38.1

‎search/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from setuptools import find_packages, setup
77

8-
__version__ = '4.1.4'
8+
__version__ = '4.2.0'
99

1010
oidc = ['flaskoidc>=1.0.0']
1111

‎search/tests/unit/api/dashboard/test_search_dashboard_api.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_should_get_result_for_search(self) -> None:
2828
result = mock_proxy_results()
2929
self.mock_proxy.fetch_dashboard_search_results.return_value = SearchResult(total_results=1, results=[result])
3030

31-
response = self.app.test_client().get('/search_dashboard?query_term=searchterm')
31+
response = self.app.test_client().get('/search_dashboard?query_term=searchterm', json={})
3232
expected_response = {
3333
"total_results": 1,
3434
"results": [mock_json_response()]
@@ -43,7 +43,7 @@ def test_should_give_empty_result_when_there_are_no_results_from_proxy(self) ->
4343
self.mock_proxy.fetch_dashboard_search_results.return_value = \
4444
SearchResult(total_results=0, results=[])
4545

46-
response = self.app.test_client().get('/search_dashboard?query_term=searchterm')
46+
response = self.app.test_client().get('/search_dashboard?query_term=searchterm', json={})
4747

4848
expected_response = {
4949
"total_results": 0,
@@ -52,13 +52,13 @@ def test_should_give_empty_result_when_there_are_no_results_from_proxy(self) ->
5252
self.assertEqual(response.json, expected_response)
5353

5454
def test_should_fail_without_query_term(self) -> None:
55-
response = self.app.test_client().get('/search_dashboard')
55+
response = self.app.test_client().get('/search_dashboard', json={})
5656

5757
self.assertEqual(response.status_code, HTTPStatus.BAD_REQUEST)
5858

5959
def test_should_fail_when_proxy_fails(self) -> None:
6060
self.mock_proxy.fetch_dashboard_search_results.side_effect = RuntimeError('search failed')
6161

62-
response = self.app.test_client().get('/search_dashboard?query_term=searchterm')
62+
response = self.app.test_client().get('/search_dashboard?query_term=searchterm', json={})
6363

6464
self.assertEqual(response.status_code, HTTPStatus.INTERNAL_SERVER_ERROR)

‎search/tests/unit/api/feature/test_search_feature_api.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_should_get_result_for_search(self) -> None:
3131
self.mock_proxy.fetch_feature_search_results.return_value = \
3232
SearchFeatureResult(total_results=1, results=[result])
3333

34-
response = self.app.test_client().get('/search_feature?query_term=searchterm')
34+
response = self.app.test_client().get('/search_feature?query_term=searchterm', json={})
3535

3636
expected_response = {
3737
"total_results": 1,
@@ -47,7 +47,7 @@ def test_should_give_empty_result_when_there_are_no_results_from_proxy(self) ->
4747
self.mock_proxy.fetch_feature_search_results.return_value = \
4848
SearchFeatureResult(total_results=0, results=[])
4949

50-
response = self.app.test_client().get('/search_feature?query_term=searchterm')
50+
response = self.app.test_client().get('/search_feature?query_term=searchterm', json={})
5151

5252
expected_response = {
5353
"total_results": 0,
@@ -56,11 +56,11 @@ def test_should_give_empty_result_when_there_are_no_results_from_proxy(self) ->
5656
self.assertEqual(response.json, expected_response)
5757

5858
def test_should_fail_without_query_term(self) -> None:
59-
response = self.app.test_client().get('/search_feature')
59+
response = self.app.test_client().get('/search_feature', json={})
6060
self.assertEqual(response.status_code, HTTPStatus.BAD_REQUEST)
6161

6262
def test_should_fail_when_proxy_fails(self) -> None:
6363
self.mock_proxy.fetch_feature_search_results.side_effect = RuntimeError('search failed')
6464

65-
response = self.app.test_client().get('/search_feature?query_term=searchterm')
65+
response = self.app.test_client().get('/search_feature?query_term=searchterm', json={})
6666
self.assertEqual(response.status_code, HTTPStatus.INTERNAL_SERVER_ERROR)

‎search/tests/unit/api/table/test_search_table_api.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_should_get_result_for_search(self) -> None:
3131
result = mock_proxy_results()
3232
self.mock_proxy.fetch_table_search_results.return_value = SearchTableResult(total_results=1, results=[result])
3333

34-
response = self.app.test_client().get('/search?query_term=searchterm')
34+
response = self.app.test_client().get('/search?query_term=searchterm', json={})
3535

3636
expected_response = {
3737
"total_results": 1,
@@ -47,7 +47,7 @@ def test_should_give_empty_result_when_there_are_no_results_from_proxy(self) ->
4747
self.mock_proxy.fetch_table_search_results.return_value = \
4848
SearchTableResult(total_results=0, results=[])
4949

50-
response = self.app.test_client().get('/search?query_term=searchterm')
50+
response = self.app.test_client().get('/search?query_term=searchterm', json={})
5151

5252
expected_response = {
5353
"total_results": 0,
@@ -60,7 +60,7 @@ def test_should_get_default_response_values_when_values_not_in_proxy_response(se
6060
SearchTableResult(total_results=1,
6161
results=[mock_default_proxy_results()])
6262

63-
response = self.app.test_client().get('/search?query_term=searchterm')
63+
response = self.app.test_client().get('/search?query_term=searchterm', json={})
6464

6565
expected_response = {
6666
"total_results": 1,
@@ -70,13 +70,13 @@ def test_should_get_default_response_values_when_values_not_in_proxy_response(se
7070
self.assertEqual(response.json, expected_response)
7171

7272
def test_should_fail_without_query_term(self) -> None:
73-
response = self.app.test_client().get('/search')
73+
response = self.app.test_client().get('/search', json={})
7474

7575
self.assertEqual(response.status_code, HTTPStatus.BAD_REQUEST)
7676

7777
def test_should_fail_when_proxy_fails(self) -> None:
7878
self.mock_proxy.fetch_table_search_results.side_effect = RuntimeError('search failed')
7979

80-
response = self.app.test_client().get('/search?query_term=searchterm')
80+
response = self.app.test_client().get('/search?query_term=searchterm', json={})
8181

8282
self.assertEqual(response.status_code, HTTPStatus.INTERNAL_SERVER_ERROR)

0 commit comments

Comments
 (0)
Please sign in to comment.