feat(spec2cdk): support for auto-generated grants in alpha modules#36206
feat(spec2cdk): support for auto-generated grants in alpha modules#36206mergify[bot] merged 7 commits intomainfrom
Conversation
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
| public write(module: Module, filePath: string): string { | ||
| log.debug(module.name, filePath, 'render'); | ||
| const fullPath = path.join(this.rootDir, filePath); | ||
| public write(module: Module, fullPath: string): string { |
There was a problem hiding this comment.
The behavior here has changed: the second parameter is an absolute path, instead of relative to some root directory passed to the constructor.
# Conflicts: # packages/@aws-cdk/aws-elasticache-alpha/lib/serverless-cache-base.ts # tools/@aws-cdk/spec2cdk/lib/cdk/aws-cdk-lib.ts # tools/@aws-cdk/spec2cdk/lib/cdk/grants-module.ts # tools/@aws-cdk/spec2cdk/lib/cdk/library-builder.ts # tools/@aws-cdk/spec2cdk/test/grants.test.ts
|
||||||||||||||
|
||||||||||||||
# Conflicts: # tools/@aws-cdk/spec2cdk/test/expect-to-contain-code.ts
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Merge Queue Status✅ The pull request has been merged at 10789e9 This pull request spent 38 minutes 24 seconds in the queue, including 29 minutes 18 seconds running CI. Required conditions to merge
|
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Grants classes are only generated in the
aws-cdk-libmodule (if agrants.jsonfile is present). However, for alpha modules, we want the auto-generated files to be treated as alpha.This PR adds support for generating Grants classes in alpha modules, if a
grants.jsonfile is present.Also added a new
grants.jsoninaws-elasticache-alphato demonstrate that the change works.Main changes:
generateAll()now takes an additional output directory: the root of the alpha modules.GrantsPropsstruct is being passed around, that contains the config itself plus a flag indicating whether the module is stable.import * as <service> from "./<service>.generated";, for stable modules, orimport * as <service> from "aws-cdk-lib/aws-<service>";, for unstable modules.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license