Skip to content

fix(ci): add missing test deps to Moto workflow#6

Merged
vieiralucas merged 2 commits into
mainfrom
fix/moto-ci-deps
Apr 4, 2026
Merged

fix(ci): add missing test deps to Moto workflow#6
vieiralucas merged 2 commits into
mainfrom
fix/moto-ci-deps

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Apr 4, 2026

Copy link
Copy Markdown
Member

Summary

  • Add freezegun to pip install — moto[all] doesn't include test dependencies, causing @freeze_time-decorated test files to fail collection
  • Change --tb=no to --tb=short so collection errors are visible in logs

Without this fix, services like STS (28 tests), IAM (384 tests), and SQS (172 tests) report near-zero test counts because entire files fail to import.


Summary by cubic

Add freezegun to the Moto CI workflow and switch pytest to --tb=short to surface collection errors, fixing @freeze_time imports and restoring accurate test counts (e.g., STS, IAM, SQS).
Limit runs to services FakeCloud implements (sqs, sns, events, iam, sts, ssm) to cut CI time from ~5min to ~1min.

Written for commit 13e6b5c. Summary will update on new commits.

- Add freezegun to pip install (moto[all] doesn't include test deps)
- Change --tb=no to --tb=short so collection errors are visible in logs

Without freezegun, test files using @freeze_time fail to collect,
causing entire services (STS, IAM, SQS, etc.) to report 0-1 tests
instead of the actual test count.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

Only run Moto tests for services FakeCloud implements:
sqs, sns, events, iam, sts, ssm

Cuts CI time from ~5min (100+ services) to ~1min.
@vieiralucas vieiralucas merged commit faad82b into main Apr 4, 2026
8 checks passed
@vieiralucas vieiralucas deleted the fix/moto-ci-deps branch April 4, 2026 19:04
ericz7900 pushed a commit to ericz7900/fakecloud that referenced this pull request Jun 27, 2026
…a, lazy read

Bug-hunt 2026-06-26 cycle 3, batch 2 — fixes three regressions from the cycle-3
AMI-seed work (faiscadev#1964/faiscadev#1965) plus a pre-existing stub.

- faiscadev#2 (MEDIUM): DeregisterImage / ModifyImageAttribute had no owner guard, so a
  caller could remove or mutate the seeded amazon/Canonical-owned public AMIs in
  its own account — permanently breaking `data.aws_ami { owners=["amazon"] }`
  (the exact thing the catalogue exists for). Now reject ops on an AMI owned by
  another owner with AuthFailure, matching AWS. A user-registered AMI
  (owner_id == None) is still freely deregistered/modified.
- faiscadev#5 (LOW): a snapshot written by a pre-faiscadev#1964 binary restored an account whose
  images map lacked the seeds, and the read-path fallback only seeds ABSENT
  accounts — so after upgrade+restart `aws_ami` returned empty. On restore,
  idempotently reseed the public catalogue into every restored account
  (deterministic ids -> no-op for already-seeded).
- faiscadev#4 (LOW): ReplaceImageCriteriaInAllowedImagesSettings was a write-succeeds/
  read-default stub. Now persist the ImageCriterion ImageProviders on state and
  emit them from GetAllowedImagesSettings (round-trips).
- faiscadev#6 (LOW): DescribeImages eagerly built the (now seed-heavier) throwaway
  Ec2State on every read; use a deferred fallback so it's constructed only for a
  not-yet-created account.

Tests: new e2e ec2_ami_catalogue (seed deregister/modify rejected + user AMI ok;
ReplaceImageCriteria round-trip; catalogue survives restart). ec2 image
conformance (register/modify/deregister/get-allowed/replace) green.
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