From 5596b19f0bbd81bd2e231100fcf780b97a1669d5 Mon Sep 17 00:00:00 2001 From: SteveScorfield Date: Tue, 10 Sep 2024 15:03:53 +0100 Subject: [PATCH 1/3] New endpoint to decrease frequency of associations being called --- response_operations_ui/controllers/party_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/response_operations_ui/controllers/party_controller.py b/response_operations_ui/controllers/party_controller.py index 0d47dff8b..ec0d559bf 100644 --- a/response_operations_ui/controllers/party_controller.py +++ b/response_operations_ui/controllers/party_controller.py @@ -30,7 +30,7 @@ def get_business_by_ru_ref(ru_ref: str): :raises ApiError: Raised if party returns a 4XX or 5XX status code. """ logger.info("Retrieving reporting unit", ru_ref=ru_ref) - url = f'{app.config["PARTY_URL"]}/party-api/v1/businesses/ref/{ru_ref}' + url = f'{app.config["PARTY_URL"]}/party-api/v1/businesses/ref/reporting-unit-only/{ru_ref}' response = requests.get(url, auth=app.config["BASIC_AUTH"]) try: From bf8d741a172173386f25ea20af395f0fa1e59be8 Mon Sep 17 00:00:00 2001 From: SteveScorfield Date: Tue, 10 Sep 2024 15:46:15 +0100 Subject: [PATCH 2/3] Fix tests --- tests/controllers/test_party_controller.py | 2 +- tests/views/test_change_response_status.py | 2 +- tests/views/test_message.py | 2 +- tests/views/test_reporting_units.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/controllers/test_party_controller.py b/tests/controllers/test_party_controller.py index 846885994..47ae8b46a 100644 --- a/tests/controllers/test_party_controller.py +++ b/tests/controllers/test_party_controller.py @@ -28,7 +28,7 @@ delete_attributes_by_sample_summary_id_url = ( f"{TestingConfig.PARTY_URL}/party-api/v1/businesses/attributes/sample-summary/{sample_summary_id}" ) -get_business_by_ru_ref_url = f"{TestingConfig.PARTY_URL}/party-api/v1/businesses/ref/{ru_ref}" +get_business_by_ru_ref_url = f"{TestingConfig.PARTY_URL}/party-api/v1/businesses/ref/reporting-unit-only/{ru_ref}" get_business_by_id_url = f"{TestingConfig.PARTY_URL}/party-api/v1/businesses/id/" get_respondents_by_survey_and_business_id_url = ( f"{TestingConfig.PARTY_URL}/party-api/v1/respondents/survey_id/{survey_id}/business_id/{business_id}" diff --git a/tests/views/test_change_response_status.py b/tests/views/test_change_response_status.py index e06b3e510..c44bce98f 100644 --- a/tests/views/test_change_response_status.py +++ b/tests/views/test_change_response_status.py @@ -24,7 +24,7 @@ url_get_collection_exercises_by_survey = ( f"{TestingConfig.COLLECTION_EXERCISE_URL}/collectionexercises/survey/{survey_id}" ) -url_get_business_by_ru_ref = f"{TestingConfig.PARTY_URL}/party-api/v1/businesses/ref/{ru_ref}" +url_get_business_by_ru_ref = f"{TestingConfig.PARTY_URL}/party-api/v1/businesses/ref/reporting-unit-only/{ru_ref}" url_get_available_case_group_statuses = ( f"{TestingConfig.CASE_URL}" f"/casegroups/transitions/{collection_exercise_id}/{ru_ref}" ) diff --git a/tests/views/test_message.py b/tests/views/test_message.py index 16e4a9610..16463bcda 100644 --- a/tests/views/test_message.py +++ b/tests/views/test_message.py @@ -32,7 +32,7 @@ iac_2 = "ljbgg3kgstr4" message_thread = "/messages/threads/fb0e79bd-e132-4f4f-a7fd-5e8c6b41b9af" -url_get_business_by_ru_ref = f"{TestingConfig.PARTY_URL}/party-api/v1/businesses/ref/" +url_get_business_by_ru_ref = f"{TestingConfig.PARTY_URL}/party-api/v1/businesses/ref/reporting-unit-only/" url_get_business_by_id = f"{TestingConfig.PARTY_URL}/party-api/v1/businesses/id/" url_get_respondent_party_by_list = f"{TestingConfig.PARTY_URL}/party-api/v1/respondents?id={respondent_party_id}" url_get_respondent_party_by_id = f"{TestingConfig.PARTY_URL}/party-api/v1/respondents/id/" diff --git a/tests/views/test_reporting_units.py b/tests/views/test_reporting_units.py index 131b4963a..14d33520e 100644 --- a/tests/views/test_reporting_units.py +++ b/tests/views/test_reporting_units.py @@ -33,7 +33,7 @@ f"{TestingConfig.PARTY_URL}/party-api/v1/respondents/edit-account-status/" f"{respondent_party_id}" ) -url_get_business_by_ru_ref = f"{TestingConfig.PARTY_URL}/party-api/v1/businesses/ref/{ru_ref}" +url_get_business_by_ru_ref = f"{TestingConfig.PARTY_URL}/party-api/v1/businesses/ref/reporting-unit-only/{ru_ref}" url_get_cases_by_business_party_id = f"{TestingConfig.CASE_URL}/cases/partyid/{business_party_id}" url_get_collection_exercise_by_id = f"{TestingConfig.COLLECTION_EXERCISE_URL}/collectionexercises" From 36fbebdcde1c50feea962534b1c3bf1ff06b3e91 Mon Sep 17 00:00:00 2001 From: ras-rm-pr-bot Date: Tue, 10 Sep 2024 14:57:36 +0000 Subject: [PATCH 3/3] auto patch increment --- _infra/helm/response-operations-ui/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_infra/helm/response-operations-ui/Chart.yaml b/_infra/helm/response-operations-ui/Chart.yaml index 8f80256fe..e92cc6a51 100644 --- a/_infra/helm/response-operations-ui/Chart.yaml +++ b/_infra/helm/response-operations-ui/Chart.yaml @@ -14,8 +14,8 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version -version: 3.1.85 +version: 3.1.86 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 3.1.85 +appVersion: 3.1.86