Skip to content

test(opensearch): pin the wire encoding of reserved-instance purchases after the SDK serializer change #89

Open

Description

@cristim

Follow-up from the review of #88, the Dependabot gomod bump.

aws-sdk-go-v2/service/opensearch went from v1.52.3 to v1.85.1, and smithy-go from v1.24.2 to v1.28.5. The OpenSearch client now serializes requests through the new schema-based engine and the restjson1 protocol. The PurchaseReservedInstanceOffering input struct is unchanged, with the same fields and types, and the other five purchase services keep their old serializers.

This repo's tests mock the provider client interface, so nothing checks the wire encoding of InstanceCount, ReservationName and ReservedInstanceOfferingId on the new path.

Suggested fix: add an httptest-backed test that points the OpenSearch client at a local server. It should capture the serialized PurchaseReservedInstanceOffering request body and assert the JSON field names and values, including InstanceCount. No real AWS calls. This may belong in cloud-commitments-go's opensearch provider, which owns the client.

Activity

  1. IAmJSD commented on Oct 19, 2026

    @IAmJSD
    Collaborator

    Claiming: working on this

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions