Skip to content

fix(project): allow commercial-only additions in mixed-partition projects - #2983

Open
Kerem-Kocak wants to merge 1 commit into
aws:v1.xfrom
Kerem-Kocak:fix/china-add-mixed-targets
Open

Kerem-Kocak wants to merge 1 commit into
aws:v1.xfrom
Kerem-Kocak:fix/china-add-mixed-targets

Conversation

@Kerem-Kocak

@Kerem-Kocak Kerem-Kocak commented Dec 1, 2026 •

Copy link
Copy Markdown

Description

Previously, FsProjectManager.addResource gated on targets.some(isChinaRegion), so having any China (aws-cn) target blocked commercial-only additions across the whole project even though deploy enforces China restrictions per target.

This classifies add-time China checks into commercial, china-only and mixed scopes. Mixed-partition projects can now add commercial-only resources and runtimes (preserving default memory) while emitting warnings naming the China targets that cannot deploy them. Projects with only China targets (or a China resolved region before targets are created) keep the existing errors and memory-stripping behavior.

Related Issue

Closes #2962

Documentation PR

Not applicable.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran bun test src/core/project/manager.test.ts (226 pass, 0 fail)
  • I ran the relevant end-to-end tests with bun run test:e2e, or explained why they are not applicable: not applicable (changes only local add-time target validation; deploy and AWS resource paths are unchanged).
  • I ran bun run typecheck
  • I ran bun run lint:check
  • I ran bun run format:check
  • I ran bun run audit
  • I ran bun run secrets:check
  • I ran bun run build
  • If I modified src/assets/, I updated affected snapshots with bun test <test-file> --update-snapshots and committed them
  • If I re-recorded fixtures or golden files, every change beyond account identifiers is explained
    by this PR
  • This PR does not change command.md (the release workflow regenerates it)

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly (no doc changes needed)
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@Kerem-Kocak
Kerem-Kocak requested review from a team and a balanced review from Copilot December 1, 2026 10:03
@github-actions github-actions Bot added the size/m PR size: M label Dec 1, 2026

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Kerem-Kocak
Kerem-Kocak force-pushed the fix/china-add-mixed-targets branch from 1410300 to 8b4c318 Compare December 3, 2026 11:42

This branch has not been deployed

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

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

China add gate is cross-target while the deploy gate is per-target, blocking adds that would deploy fine

2 participants