Skip to content

Initial commit of RubyV2 test server#5

Merged
seebees merged 5 commits into
fireegg-test-serversfrom
ryanemer/ruby-v2-test-server
Sep 21, 2025
Merged

Initial commit of RubyV2 test server#5
seebees merged 5 commits into
fireegg-test-serversfrom
ryanemer/ruby-v2-test-server

Conversation

@seebees

@seebees seebees commented Sep 17, 2025

Copy link
Copy Markdown

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@lucasmcdonald3

Copy link
Copy Markdown

Requesting Copilot review since I can't Ruby

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces an initial implementation of a Ruby V2 test server for S3 Encryption Client compatibility testing. The server provides a REST API wrapper around the AWS S3 Encryption Client v2 to enable cross-language compatibility testing alongside existing Java and Python implementations.

Key changes include:

  • Complete Ruby server implementation with Sinatra-based REST API
  • Client management system with caching for S3 encryption client instances
  • Metadata serialization utilities and error handling to match Smithy model specifications
  • Updated Java test cases to accommodate Ruby-specific error message variations

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test-server/ruby-v2-server/app.rb Main Sinatra application implementing REST endpoints for client creation and S3 operations
test-server/ruby-v2-server/lib/client_manager.rb Manages S3 encryption client instances with thread-safe caching
test-server/ruby-v2-server/lib/metadata_utils.rb Utility class for metadata string/hash conversion matching Java/Python format
test-server/ruby-v2-server/lib/error_handlers.rb Error response utilities matching Smithy model types
test-server/ruby-v2-server/lib/logger.rb Centralized logging utility with structured request/response logging
test-server/ruby-v2-server/Gemfile Ruby dependency specification
test-server/ruby-v2-server/config.ru Rack configuration file
test-server/ruby-v2-server/README.md Documentation for setup and usage
test-server/java-tests/src/it/java/software/amazon/encryption/s3/RoundTripTests.java Updated test cases to handle Ruby-specific error messages

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread test-server/ruby-v2-server/app.rb Outdated
Comment thread test-server/ruby-v2-server/app.rb Outdated
Comment thread test-server/ruby-v2-server/lib/metadata_utils.rb
Comment thread test-server/ruby-v2-server/Gemfile Outdated

@lucasmcdonald3 lucasmcdonald3 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Questions

Comment thread test-server/ruby-v2-server/README.md Outdated
Comment thread test-server/ruby-v2-server/README.md
@seebees seebees force-pushed the ryanemer/ruby-v2-test-server branch 2 times, most recently from 333d4a9 to baca64a Compare September 17, 2025 23:51
Comment thread test-server/ruby-v2-server/app.rb Outdated
Comment thread test-server/ruby-v2-server/app.rb Outdated
Comment thread test-server/ruby-v2-server/app.rb
kms_key_id = config.dig('keyMaterial', 'kmsKeyId')
enable_legacy_wrapping = config['enableLegacyWrappingAlgorithms'] || false

raise 'KMS Key ID is required' if kms_key_id.nil? || kms_key_id.empty?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

eventually we'll need RSA and AES keys as well but this is fine for now.

Comment thread test-server/ruby-v3-server/app.rb Outdated
Comment thread test-server/ruby-v3-server/app.rb Outdated
Comment thread test-server/ruby-v3-server/app.rb Outdated
Comment thread test-server/ruby-v3-server/README.md Outdated

@kessplas kessplas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

only the comments about asserting Ruby when the message is the Ruby message are blocking

@ShubhamChaturvedi7 ShubhamChaturvedi7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. We might want to refactor out some of the repeated modules such as logger etc but it's a test server so not high priority.

Comment thread test-server/ruby-v2-server/Makefile Outdated
Comment thread .gitmodules
@seebees seebees force-pushed the ryanemer/ruby-v2-test-server branch from 710c9af to 0419eea Compare September 19, 2025 19:15
V2 and v3 pending changes
@seebees seebees force-pushed the ryanemer/ruby-v2-test-server branch from 7b4dc23 to 11c92bc Compare September 19, 2025 23:39
@seebees seebees force-pushed the ryanemer/ruby-v2-test-server branch from 765cb8c to 52ef9aa Compare September 20, 2025 04:37

@josecorella josecorella left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lgtm

@seebees seebees merged commit b047b11 into fireegg-test-servers Sep 21, 2025
2 checks passed
@seebees seebees deleted the ryanemer/ruby-v2-test-server branch September 21, 2025 21:49
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.

6 participants