Skip to content

Conversation

@BJSS-russell-pollock
Copy link
Contributor

@BJSS-russell-pollock BJSS-russell-pollock commented Feb 10, 2026

Description

Context

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.

@BJSS-russell-pollock BJSS-russell-pollock self-assigned this Feb 10, 2026
@BJSS-russell-pollock BJSS-russell-pollock changed the title [GPCAPIM-260]-[Steel Thread integration testing]-[RP]-4 [GPCAPIM-260]-[Steel Thread integration testing]-[RP] Feb 10, 2026
@github-actions
Copy link

github-actions bot commented Feb 10, 2026

Trivy gate: no Critical/High issues.

Trivy IaC (Terraform) Summary

Severity Count
CRITICAL 0
HIGH 0
MEDIUM 0
LOW 0
UNKNOWN 0
Findings (top 50)
Severity ID Title File

@github-actions
Copy link

github-actions bot commented Feb 10, 2026

Trivy gate: no Critical/High vulnerabilities.

Trivy Image Scan Summary

Image: 900119715266.dkr.ecr.eu-west-2.amazonaws.com/whoami:feature-gpcapim-260

Severity Count
CRITICAL 0
HIGH 0
MEDIUM 0
LOW 1
UNKNOWN 0
Findings (top 50)
Severity ID Package Installed Fixed Source
LOW CVE-2026-1703 pip 25.3 26.0 Python

@BJSS-russell-pollock BJSS-russell-pollock force-pushed the feature/GPCAPIM-260 branch 4 times, most recently from 0279c0f to 5fc7fed Compare February 10, 2026 18:21
Comment on lines 32 to 33
target_base: ClassVar[str] = ""
cert: ClassVar[tuple[str, str] | None] = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should these attributes be class variables here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it worth naming these attributes with an underscore to highlight that they are private to the class also?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed that

Comment on lines 84 to 85
MtlsProxyHandler.target_base = base_url
MtlsProxyHandler.cert = get_mtls_cert()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rather than needing to set these class variables on the proxy handler itself, would it be cleaner to instead instantiate an instance of MtlsProxyHandler and provide these values in the constructor? I'm not sure if this created instance can then be provided to HTTPServer below however?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed that

self, base_url: str, hostname: str
) -> None:
"""Verify that the provider satisfies all consumer contracts.
server.shutdown()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this shutdown call also handle terminating the created thread?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. server.serve_forever() is running inside that thread. server.shutdown() signals the server to stop that loop.

Comment on lines 43 to 53
content_length = int(content_length_header) if content_length_header else 0
body = self.rfile.read(content_length) if content_length > 0 else None
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure that a content-length header always needs to be included when sending a body via HTTP. So long as the pact library always includes this header though this should be fine here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pact Verifier generates standard JSON payloads for contract tests. It calculates the body size and sends the Content-Length header explicitly. For our current needs, relying on Content-Length in this proxy is safe.

@BJSS-russell-pollock BJSS-russell-pollock force-pushed the feature/GPCAPIM-260 branch 2 times, most recently from 9e48075 to 1c54c91 Compare February 11, 2026 11:52
@BJSS-russell-pollock BJSS-russell-pollock force-pushed the feature/GPCAPIM-260 branch 3 times, most recently from 8d03c82 to b3f8fb6 Compare February 11, 2026 15:20
@BJSS-russell-pollock BJSS-russell-pollock marked this pull request as ready for review February 11, 2026 15:44
@BJSS-russell-pollock BJSS-russell-pollock requested a review from a team as a code owner February 11, 2026 15:44
@github-actions
Copy link

Deployment Complete

Copy link
Contributor

@williamjameswillis williamjameswillis left a comment

Choose a reason for hiding this comment

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

approved now comments resolved

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