Skip to content

Comments

feat(riff-raff-generator)!: Support generation of a subset of GuStacks#2814

Draft
akash1810 wants to merge 1 commit intomainfrom
multiple-riff-raff.yaml
Draft

feat(riff-raff-generator)!: Support generation of a subset of GuStacks#2814
akash1810 wants to merge 1 commit intomainfrom
multiple-riff-raff.yaml

Conversation

@akash1810
Copy link
Member

@akash1810 akash1810 commented Feb 6, 2026

What does this change?

Add support for the scenario where we create a singleton stack for shared infrastructure alongside application stacks. For example, a singleton stack that provisions an Elastic Container Registry, and a CODE and PROD application stack that pulls images from the registry.

Previously, we had to create work-arounds with multiple Apps.

Warning

BREAKING CHANGE
RiffRaffYamlFile can no longer be directly instantiated. Instead of directly instantiating RiffRaffYamlFile, please use RiffRaffYamlFile.fromApp:

// Before
const app = new App();
new RiffRaffYamlFile(app);

// After
const app = new App();
RiffRaffYamlFile.fromApp(app);

This impacts these repositories.

How to test

See added unit tests. Also see guardian/mobile-n10n#1683 as a practical example of using RiffRaffYaml.fromStack in a repository that deploys multiple Riff-Raff projects.

How can we measure success?

Supporting more scenarios.

Have we considered potential risks?

Most repositories will not be impacted by the breaking change as they use RiffRaffYamlFile via GuRoot. Those that directly instantiate an instance of RiffRaffYamlFile would need to check if this change allows them to remove some custom logic.

Checklist

  • I have listed any breaking changes, along with a migration path 1
  • I have updated the documentation as required for the described changes 2

cc/ @jonathonherbert and @tjmw who have requested this capability.

Footnotes

  1. Consider whether this is something that will mean changes to projects that have already been migrated, or to the CDK CLI tool. If changes are required, consider adding a checklist here and/or linking to related PRs.

  2. If you are adding a new construct or pattern, has new documentation been added? If you are amending defaults or changing behaviour, are the existing docs still valid?

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

🦋 Changeset detected

Latest commit: c2cdbf2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@guardian/cdk Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@akash1810 akash1810 added the feature Departmental tracking: work on a new feature label Feb 6, 2026
@akash1810 akash1810 force-pushed the multiple-riff-raff.yaml branch 3 times, most recently from 8ffc432 to da71ba0 Compare February 6, 2026 13:39
@akash1810 akash1810 force-pushed the multiple-riff-raff.yaml branch from da71ba0 to 84dbd03 Compare February 6, 2026 14:38
@akash1810 akash1810 marked this pull request as ready for review February 6, 2026 14:50
@akash1810 akash1810 force-pushed the multiple-riff-raff.yaml branch 2 times, most recently from 75a04a3 to 2d52319 Compare February 6, 2026 16:01
@akash1810 akash1810 marked this pull request as draft February 6, 2026 16:23
@akash1810 akash1810 force-pushed the multiple-riff-raff.yaml branch 2 times, most recently from b69d89e to 248932b Compare February 6, 2026 17:21
Add support for the scenario where we create a singleton stack for shared infrastructure
alongside application stacks.
For example, a singleton stack that provisions an Elastic Container Registry,
and a CODE and PROD application stack that pulls images from the registry.

Previously, we had to create work-arounds with multiple `App`s.

BREAKING CHANGE: `RiffRaffYamlFile` can no longer be directly instantiated

Instead of directly instantiating `RiffRaffYamlFile`, please use `RiffRaffYamlFile.fromApp`:

```ts
// Before
const app = new App();
new RiffRaffYamlFile(app);

// After
const app = new App();
RiffRaffYamlFile.fromApp(app);
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant