Skip to content

feat(ecr): SDKs + introspection + website catch-up#721

Merged
vieiralucas merged 4 commits intomainfrom
worktree-worktree-ecr-sdks-web
Apr 24, 2026
Merged

feat(ecr): SDKs + introspection + website catch-up#721
vieiralucas merged 4 commits intomainfrom
worktree-worktree-ecr-sdks-web

Conversation

@vieiralucas
Copy link
Copy Markdown
Member

@vieiralucas vieiralucas commented Apr 24, 2026

Summary

Follow-up to the four-PR ECR buildout (#717-#720). Batch 1 shipped the Rust SDK type + one introspection endpoint; the rest of the customer-facing surface (5 non-Rust SDKs, deeper introspection, website landing, vs/* comparison pages, blog post) got missed and is caught up here.

What lands

Server introspection (new endpoints):

  • /_fakecloud/ecr/repositories — now includes imageCount, layerCount, hasLifecyclePolicy.
  • /_fakecloud/ecr/images[?repo=<name>] — lists stored images, optionally filtered by repository.
  • /_fakecloud/ecr/pull-through-rules — lists configured pull-through cache rules.

SDKs (all 6 languages):

Language Client Accessor
Rust fakecloud_sdk::types::{EcrImage, EcrPullThroughRule, ...} existing types
Go ECRClient fc.ECR()
Python EcrClient fc.ecr
TypeScript EcrClient fc.ecr
Java FakeCloud.EcrClient fc.ecr()
PHP EcrClient $fc->ecr()

Each exposes getRepositories(), getImages(repoName?), getPullThroughRules().

Website / docs:

  • New landing page website/content/local-ecr.md — feature matrix + 5-command smoke test.
  • vs/localstack.md — new ECR row (paid + flaky).
  • vs/moto.md — new row noting Moto doesn't do OCI v2; bumped service count.
  • vs/ministack.md / vs/floci.md — bumped service count and mention full ECR.
  • New blog post blog/ecr-localstack-moto-docker-push.md.

Test plan

  • cargo build --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo fmt --check
  • cargo test -p fakecloud-e2e --test ecr --test ecr_oci --test ecr_images --test ecr_persistence — 22 green (6 + 7 + 8 + 1)
  • Each language SDK compiles — these ship with published tests in their own CI workflows, so the next sdk-* workflow run validates them

Summary by cubic

Adds ECR introspection APIs, ships ECR clients for Go/Python/TypeScript/Java/PHP (plus new Rust types), and updates the website with an ECR landing and comparison notes. Also fixes TypeScript ECR rule types and corrects AWS CLI flags in docs.

  • New Features

    • Server introspection:
      • /_fakecloud/ecr/repositories now includes imageCount, layerCount, hasLifecyclePolicy.
      • New /_fakecloud/ecr/images[?repo=<name>] to list images, optionally by repository.
      • New /_fakecloud/ecr/pull-through-rules to list pull-through cache rules.
    • SDKs:
      • Shared methods: getRepositories(), getImages(repoName?), getPullThroughRules().
      • Accessors: Go fc.ECR(), Python fc.ecr, TypeScript fc.ecr, Java fc.ecr(), PHP $fc->ecr(). Rust adds EcrImage, EcrImagesResponse, EcrPullThroughRule, EcrPullThroughRulesResponse, and new repository fields.
    • Website/docs:
      • New ECR landing page (local-ecr.md) and blog post on local docker push.
      • Updated comparison pages: vs/localstack.md, vs/moto.md, vs/ministack.md, vs/floci.md with ECR coverage and service counts.
  • Bug Fixes

    • TypeScript SDK: widen EcrPullThroughRule optional fields to string | null to match wire format.
    • Docs: replace aws --endpoint with aws --endpoint-url in local-ecr.md and the blog post smoke tests.

Written for commit 81a868b. Summary will update on new commits.

Follow-up to the four-PR ECR buildout (#717-#720). Batch 1 wired
Rust SDK + one introspection endpoint; the rest of the surface (5
non-Rust SDKs, deeper introspection, website landing, comparison
pages, blog post) was missed and is caught up here.

Server introspection:
- `/_fakecloud/ecr/repositories` now reports `imageCount`, `layerCount`,
  and `hasLifecyclePolicy` alongside the existing fields.
- New `/_fakecloud/ecr/images[?repo=...]` — lists stored images across
  repositories with optional filter.
- New `/_fakecloud/ecr/pull-through-rules` — lists configured pull-
  through cache rules.

SDKs (all 6 languages now wrap the ECR introspection API):
- Rust: `fakecloud_sdk::types` gains EcrImage / EcrImagesResponse /
  EcrPullThroughRule / EcrPullThroughRulesResponse; EcrRepository
  picks up the new fields.
- Go: `sdks/go/ecr.go` with ECRClient, types in `types.go`, wired as
  `fc.ECR()` in `fakecloud.go`.
- Python: new `EcrClient` in `client.py`, dataclasses in `types.py`,
  exposed as `fc.ecr` property and re-exported from `__init__`.
- TypeScript: new `EcrClient` in `client.ts`, types in `types.ts`,
  `fc.ecr` getter, re-exported from `index.ts`.
- Java: new `EcrClient` nested class + records in `Types.java`,
  accessor `fc.ecr()` on the top-level `FakeCloud`.
- PHP: new `EcrClient` final class, types in `Types.php`, `fc->ecr()`
  accessor on `FakeCloud`.

Website / docs:
- New landing page `website/content/local-ecr.md`.
- `vs/localstack.md` gains an ECR row (paid + flaky).
- `vs/moto.md` gains a real-docker-push row and bumps service count.
- `vs/ministack.md` / `vs/floci.md` bump service count to 24 and
  mention full ECR.
- New blog post `blog/ecr-localstack-moto-docker-push.md` framing the
  gap and what fakecloud ships.

No regressions: rust clippy clean, fmt clean, ecr + ecr_oci +
ecr_images + ecr_persistence E2E tests all green (22 total).
@vieiralucas vieiralucas force-pushed the worktree-worktree-ecr-sdks-web branch from 7d28d54 to b5a8553 Compare April 24, 2026 00:16
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

3 issues found across 22 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="website/content/local-ecr.md">

<violation number="1" location="website/content/local-ecr.md:31">
P2: Use `--endpoint-url` instead of `--endpoint`; the documented AWS CLI flag is `--endpoint-url`, so this command will fail as written.</violation>
</file>

<file name="website/content/blog/ecr-localstack-moto-docker-push.md">

<violation number="1" location="website/content/blog/ecr-localstack-moto-docker-push.md:28">
P2: The AWS CLI examples use `--endpoint`, which is not a valid AWS CLI endpoint flag. Use `--endpoint-url` so the documented smoke test commands actually run.</violation>
</file>

<file name="sdks/typescript/src/types.ts">

<violation number="1" location="sdks/typescript/src/types.ts:536">
P2: These response fields should allow `null` (not just optional/undefined), otherwise the SDK type is inaccurate for actual ECR pull-through rule payloads.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread website/content/local-ecr.md Outdated
Comment thread website/content/blog/ecr-localstack-moto-docker-push.md Outdated
Comment thread sdks/typescript/src/types.ts Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

❌ Patch coverage is 0% with 76 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/fakecloud-server/src/main.rs 0.00% 40 Missing ⚠️
crates/fakecloud-server/src/introspection.rs 0.00% 36 Missing ⚠️

📢 Thoughts on this report? Let us know!

- Replace `aws --endpoint` with `aws --endpoint-url` in the
  local-ecr.md landing page and the blog post — `--endpoint` is not
  a valid AWS CLI flag, so the documented smoke tests would fail as
  written.
- Widen the optional fields on the TypeScript `EcrPullThroughRule`
  shape to `string | null` so they match the wire format (the server
  skips serializing these when absent, but axios/fetch responses
  legitimately surface null when JSON carries it; allowing both is
  more accurate than optional-only).
@vieiralucas vieiralucas merged commit b675e95 into main Apr 24, 2026
52 checks passed
@vieiralucas vieiralucas deleted the worktree-worktree-ecr-sdks-web branch April 24, 2026 00:58
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.

1 participant