Skip to content

Conversation

@nhsd-jack-wainwright
Copy link
Collaborator

@nhsd-jack-wainwright nhsd-jack-wainwright commented Jan 20, 2026

Description

Updating hello world lambda to instead provide support for posting an Test Result (Bundle)

Context

This change alters the existing very simple lambda to instead accept a provided Test Result. As part of these changes the supported Test Result (Bundle) is very lightweight, but this will be built on as part of subsequent tickets.

As part of these changes, a new api-gateway-mock container is also included, allowing calls to the lambda locally in the same way that calls would be made to API gateway when running in AWS.

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming
  • Exceptions/Exclusions to coding standards (e.g. #noqa or #NOSONAR) are included within this Pull Request.

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

4 similar comments
@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

@nhsd-jack-wainwright nhsd-jack-wainwright marked this pull request as ready for review January 22, 2026 18:53
@nhsd-jack-wainwright nhsd-jack-wainwright requested a review from a team as a code owner January 22, 2026 18:53
@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

neil-sproston
neil-sproston previously approved these changes Jan 23, 2026
Copy link
Contributor

@neil-sproston neil-sproston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane and reasonable.

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

5 similar comments
@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

Copy link

@nhsd-rebecca-flynn nhsd-rebecca-flynn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After our run-through the code changes yesterday and a thorough look today, from my point of view it looks fine.

I've highlighted a few minor points, but the main one being I think we are adding too many unnecessary comments. I'd rather we named the tests well and resisted from leaving a comment explaining what the test is supposed to achieve unless it is a complicated test. None of these tests appear to be in the category and I believe we are just creating noise. Let me know your thoughts.

Comment on lines 25 to 31
Send a request to the APIs with some given parameters.
Args:
data: The data to send in the request payload
path: The path to send the request to
request_method: The HTTP method to use for the request
Returns:
Response object from the request

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be more succinct if necessary at all.
Send a request to the APIs with data, path, request_method and returns a response object from the request

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this client is intended to be used in multiple places, I think it's worth including a docstring to include some details around the details of this method here. I've included the docstring in this format is this is rendered by vscode in a nice standard format when displaying the docs inline.

Happy to remove these docstrings though if you do think they're not necessary even when used outside of this file?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok fair enough. Let's leave as is.

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

1 similar comment
@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

… API gateway format

Also updated tests to account for new _status endpoint and new create Test Result path.
@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

@github-actions
Copy link

Preview Lambda: pr-feature-cdapi-55
Preview URL: https://feature-cdapi-55.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants