Skip to content

Conversation

@joshAtRula
Copy link

Issue #, if available: N/A

Description of changes: This PR adds support to the controller for managing Registries and Schemas.

Testing & Documentation for AWS Glue Schema Controller

This PR adds comprehensive testing infrastructure and documentation examples for the AWS Glue Schema controller resource.

Changes

Test Coverage Added

Unit Tests (pkg/resource/schema/schema_test.go)

  • 18 unit tests covering CRUD operations, status conditions, and error handling
  • Validates resource lifecycle management and field operations

Integration Tests (test/integration/schema_integration_test.go)

  • 13 integration tests with mock AWS Glue API
  • Tests create, read, update, delete operations with actual API interactions
  • Validates registry references, compatibility modes, and data formats (AVRO, JSON, Protobuf)

End-to-End Tests (test/e2e/schema_e2e_test.go)

  • 13 E2E tests covering complete resource lifecycle
  • Tests multi-resource scenarios, concurrent operations, and cleanup
  • Validates registry integration and schema evolution

Validation Tests (pkg/resource/schema/validation_test.go)

  • 44 validation tests ensuring field constraints and business rules
  • Covers required fields, enum validation, format validation, cross-field validation
  • Tests compatibility modes, data formats, naming conventions, and tags

Documentation Tests (pkg/resource/schema/documentation_test.go)

  • 10 test categories validating example accuracy and API coverage
  • Tests all 7 compatibility modes and 3 data formats
  • Validates example YAML files match current API structure

Documentation & Examples

Test Documentation (test/documentation/README.md)

  • Comprehensive guide for running and extending documentation tests
  • Explains test categories and validation levels

Example YAML Manifests (examples/)

  • schema-basic.yaml - Basic AVRO schema
  • schema-with-registry.yaml - Schema with registry reference
  • schema-json.yaml - JSON Schema format
  • schema-protobuf.yaml - Protobuf format
  • schema-complex.yaml - Complex nested structures

Test Results

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow bot requested review from michaelhtm and rushmash91 October 17, 2025 19:27
@ack-prow
Copy link

ack-prow bot commented Oct 17, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: joshAtRula
Once this PR has been reviewed and has the lgtm label, please assign knottnt for approval by writing /assign @knottnt in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow ack-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 17, 2025
@ack-prow
Copy link

ack-prow bot commented Oct 17, 2025

Hi @joshAtRula. Thanks for your PR.

I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant