Skip to content

Conversation

p4yl04d3r
Copy link

✨ Feature / Enhancement PR

πŸ”— Epic / Issue

Link to the epic or parent issue:
Closes #1138


πŸš€ Summary (1-2 sentences)

What does this PR add or change?
This feature adds support to build MCP gateway container for s390x platform.


πŸ§ͺ Checks

  • make lint passes
  • make test passes
  • CHANGELOG:
    Update Makefile to address issue that prevents podman from being used as container runtime when docker is not installed.
    Update Makefile to add "linux/s390x" to "container-build-multi"
    Added s390x support to Container.lite and Container files to successfully build "linux/s390x" container.

πŸ““ Notes (optional)

Design sketch, screenshots, or extra context.

If the change introduces or alters an architectural decision, add or update an ADR in docs/docs/adr/ and link it here._

%% Example diagram - delete if not needed
flowchart TD
    A[Client] -->|POST /completions| B(MCPGateway)
    B --> C[Completion Service]
Loading

Address issue with setting CONTAINER_RUNTIME when podman is the only runtime installed.
Add s390x container build support
Add s390x support for multi-arch container builds
Add support to build container image for s390x platform
@jonpspri
Copy link
Contributor

@crivetimihai Feel free to add me as a reviewer here. I need an excuse to fire up an s390x qemu today.

@MohanLaksh
Copy link
Collaborator

Thanks for the contribution Chris (@p4yl04d3r).

Please review the below code and let me know your thoughts.


Hi @p4yl04d3r , Can we do this instead (in both Containerfile and .lite file)?

RUN set -eux;
if [ "$TARGETPLATFORM" = "linux/s390x" ]; then
echo "Building for s390x platform.";
echo 'export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True' > /etc/profile.d/use-openssl.sh;
else
echo "Building for other platform: $TARGETPLATFORM.";
echo 'export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=False' > /etc/profile.d/use-openssl.sh;
fi

RUN chmod 644 /etc/profile.d/use-openssl.sh

I have made the following suggestions:

  1. set -eux - Fail fast and loud
  2. using export
  3. Single > instead of >> ... Writes a fresh file instead of appending on rebuilds.
  4. Changed permission to readable by all since it is a sourced script. No need to be executable
  5. Used single quotes ' to avoid Hadolint issues

PR REVIEW SUMMARY:

  1. make serve - PASS

  2. make test - PASS - (Coverage: , 73%, === 3392 passed, 45 skipped, 949 warnings in 458.32s (0:07:38) ===)

  3. make autoflake isort black flake8 - PASS - No major code formatting/clean-up issues detected.

  4. make pylint - PASS - Your code has been rated at 10.00/10

  5. make smoketest - PASS - βœ… Smoketest passed!

  6. make doctest - PASS - (Coverage: 41%, 782 passed, 8 skipped, 99 warnings in 46.94s)

@MohanLaksh MohanLaksh marked this pull request as draft October 13, 2025 11:24
Address code review comments
Address code review comments
Copy link
Author

@p4yl04d3r p4yl04d3r left a comment

Choose a reason for hiding this comment

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

Changes have been made to the 2 files as suggested.

@p4yl04d3r p4yl04d3r marked this pull request as ready for review October 14, 2025 19:42
@MohanLaksh
Copy link
Collaborator

Hi @jonpspri,
Can you help us review this please?

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.

[Feature Request]: Support for container builds for s390x

3 participants