Skip to content

Commit e466ec2

Browse files
authored
Merge branch 'master' into VED-1138--update-automation-test
2 parents ec8802e + 2925739 commit e466ec2

10 files changed

Lines changed: 87 additions & 87 deletions

File tree

.github/workflows/quality-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ jobs:
257257
fi
258258
259259
- name: SonarCloud Scan
260-
uses: SonarSource/sonarqube-scan-action@55e44800a8f495208cce6e4e82f5dedb45fcf0ef
260+
uses: SonarSource/sonarqube-scan-action@59db25f34e16620e48ab4bb9e4a5dce155cb5432
261261
env:
262262
GITHUB_TOKEN: ${{ github.token }} # Needed to get PR information, if any
263263
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

infrastructure/account/.terraform.lock.hcl

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infrastructure/instance/.terraform.lock.hcl

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infrastructure/mesh/.terraform.lock.hcl

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lambdas/backend/src/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
GENERIC_SERVER_ERROR_DIAGNOSTICS_MESSAGE = "Unable to process request. Issue may be transient."
44
# Maximum response size for an AWS Lambda function
5-
MAX_RESPONSE_SIZE_BYTES = 6 * 1024 * 1024
5+
MAX_SEARCH_RESPONSE_SIZE_BYTES = 1 * 1024 * 1024

lambdas/backend/src/controller/fhir_controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from fhir.resources.R4B.identifier import Identifier
1212

1313
from common.get_service_url import get_service_url
14-
from constants import MAX_RESPONSE_SIZE_BYTES
14+
from constants import MAX_SEARCH_RESPONSE_SIZE_BYTES
1515
from controller.aws_apig_event_utils import (
1616
get_multi_value_query_params,
1717
get_path_parameter,
@@ -213,7 +213,7 @@ def _search_immunizations_by_target_disease(self, search_params: dict[str, list[
213213
def _create_search_response(self, search_bundle: Bundle) -> dict:
214214
search_response_json = search_bundle.json(use_decimal=True)
215215

216-
if len(search_response_json) > MAX_RESPONSE_SIZE_BYTES:
216+
if len(search_response_json) > MAX_SEARCH_RESPONSE_SIZE_BYTES:
217217
raise TooManyResultsError("Search returned too many results. Please narrow down the search")
218218

219219
prepared_search_bundle = self._prepare_search_bundle(search_response_json)

lambdas/backend/tests/controller/test_fhir_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ def test_search_immunizations_returns_a_validation_error_when_optional_params_in
12071207
)
12081208
self.service.search_immunizations.assert_not_called()
12091209

1210-
@patch("controller.fhir_controller.MAX_RESPONSE_SIZE_BYTES", 5)
1210+
@patch("controller.fhir_controller.MAX_SEARCH_RESPONSE_SIZE_BYTES", 5)
12111211
def test_search_immunizations_raises_error_if_too_many_results_found(self):
12121212
"""it should return an error if there are too many results in the response for Lambda to handle. In reality,
12131213
highly unlikely. If a concern, pagination should be implemented."""

lambdas/backend/tests/controller/test_fhir_controller_target_disease.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def test_search_by_target_disease_with_mixed_valid_and_invalid_returns_200_with_
288288
self.assertIn("invalid-no-pipe", call_args[1]["invalid_target_diseases"][0])
289289
self.assertIn("Invalid format", call_args[1]["invalid_target_diseases"][0])
290290

291-
@patch("controller.fhir_controller.MAX_RESPONSE_SIZE_BYTES", 5)
291+
@patch("controller.fhir_controller.MAX_SEARCH_RESPONSE_SIZE_BYTES", 5)
292292
def test_search_by_target_disease_returns_400_when_response_too_large(self):
293293
"""it should return the same narrow-the-search error for oversized target-disease searches"""
294294
self.mock_redis.hget.side_effect = self._hget_target_disease_codes_and_mmr

package-lock.json

Lines changed: 32 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"license": "MIT",
1616
"homepage": "https://github.com/NHSDigital/immunisation-fhir-api",
1717
"devDependencies": {
18-
"@redocly/cli": "^2.30.1",
18+
"@redocly/cli": "^2.30.3",
1919
"husky": "^9.1.7",
2020
"lint-staged": "^16.4.0",
2121
"prettier": "^3.8.3"

0 commit comments

Comments
 (0)