feat(ecr): SDKs + introspection + website catch-up#721
Merged
vieiralucas merged 4 commits intomainfrom Apr 24, 2026
Merged
Conversation
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).
7d28d54 to
b5a8553
Compare
There was a problem hiding this comment.
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.
Codecov Report❌ Patch coverage is
📢 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 includesimageCount,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):
fakecloud_sdk::types::{EcrImage, EcrPullThroughRule, ...}ECRClientfc.ECR()EcrClientfc.ecrEcrClientfc.ecrFakeCloud.EcrClientfc.ecr()EcrClient$fc->ecr()Each exposes
getRepositories(),getImages(repoName?),getPullThroughRules().Website / docs:
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.blog/ecr-localstack-moto-docker-push.md.Test plan
cargo build --workspacecargo clippy --workspace --all-targets -- -D warningscargo fmt --checkcargo test -p fakecloud-e2e --test ecr --test ecr_oci --test ecr_images --test ecr_persistence— 22 green (6 + 7 + 8 + 1)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
/_fakecloud/ecr/repositoriesnow includesimageCount,layerCount,hasLifecyclePolicy./_fakecloud/ecr/images[?repo=<name>]to list images, optionally by repository./_fakecloud/ecr/pull-through-rulesto list pull-through cache rules.getRepositories(),getImages(repoName?),getPullThroughRules().fc.ECR(), Pythonfc.ecr, TypeScriptfc.ecr, Javafc.ecr(), PHP$fc->ecr(). Rust addsEcrImage,EcrImagesResponse,EcrPullThroughRule,EcrPullThroughRulesResponse, and new repository fields.local-ecr.md) and blog post on localdocker push.vs/localstack.md,vs/moto.md,vs/ministack.md,vs/floci.mdwith ECR coverage and service counts.Bug Fixes
EcrPullThroughRuleoptional fields tostring | nullto match wire format.aws --endpointwithaws --endpoint-urlinlocal-ecr.mdand the blog post smoke tests.Written for commit 81a868b. Summary will update on new commits.