ExportXMLWordPrintableJSON

    • DB Integration & Observability
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description

      Background

      The extension_sdk crate (Rust SDK for MongoDB server extensions) has no CI, no publishing pipeline, and no test coverage beyond unit tests. Consumers must install libclang to build it and depend on it via git tags rather than a registry.

      Work

      • Pre-generated committed bindings (src/bindings.rs): drop the build script and bindgen dependency so consumers compile pure Rust with no libclang; regeneration documented in RELEASING.md
      • CodeArtifact publishing: registry config with AWS credential provider, deterministic package fileset, tag-triggered Evergreen publish task (scripts/publish.sh, tag/version cross-checked), post-publish smoke-test crate
      • Evergreen CI: check task (build --no-default-features, clippy, unit tests, API-compat, integration); mainline-only check-registry-consumer that consumes the latest published crate — not patchable, since its build phase holds the CodeArtifact publish role
      • API compatibility test: C++ ABI probe against the upstream api.h (version negotiation, struct/vtable layout), then load into a real mongod requiring successful negotiation and initializer invocation
      • End-to-end integration test: consumer extension with a real registry dependency registers a $sdkEcho stage through the full safe Rust API; a driver client asserts streaming transforms, negative parse tests, host-stage composition, and explain at both verbosities
      • compatibility.yaml: supported server range (Extensions API 1.0 → MongoDB 9.0.2–latest), validated by both test scripts; shared scripts/lib/mongod.sh with tarball caching

      Verification

      • Test suite validated by mutation: renamed SDK method, bogus API version, and four doctored-api.h drift scenarios — all caught or fixed
      • CodeArtifact path proven end-to-end from Evergreen with a throwaway 0.0.1 canary: publish role assumable (patches 1428/1429), cargo publish succeeds (1429), consumer resolves and builds (1430), registry-built extension passes all 7 $sdkEcho checks in a real master-nightly mongod (1431)

      Acceptance criteria

      • Evergreen check green on PRs and mainline
      • Consumer cargo build requires no libclang
      • Pushing a vX.Y.Z tag publishes exactly that version to CodeArtifact; mismatches rejected
      • Both test scripts pass against 9.0.2 and the latest nightly; fail fast on older servers

      Follow-ups

      • Confirm the authorized tag-pushers list in Evergreen project settings (admins are not authorized by default)
      • Bump to v1.1.0 (Cargo.toml, CHANGELOG, consumer manifest pin), wait for mainline green, push the tag to trigger the first real publish
      • Optionally have DevProd delete the 0.0.1 canary from the registry

            Assignee:
            Lee Maguire
            Reporter:
            Lee Maguire
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: