Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove awkward cfn2ts script entries #8231

Merged
merged 4 commits into from
Jun 9, 2020

Conversation

RomainMuller
Copy link
Contributor

Packages that are not containers of L1 libraries (Cfn~ classes) have
no point in having a cfn2ts script registered. This causes problems
when trying to generate L1s across the whole repository using
lerna run cfn2ts.

This adds a pkglint rule that mandates the cfn2ts script is only
present when the related other metadata is also required to be present.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Packages that are not containers of L1 libraries (`Cfn~` classes) have
no point in having a `cfn2ts` script registered. This causes problems
when trying to generate L1s across the whole repository using
`lerna run cfn2ts`.

This adds a `pkglint` rule that mandates the `cfn2ts` script is only
present when the related other metadata is also required to be present.
@RomainMuller RomainMuller added the effort/small Small work item – less than a day of effort label May 27, 2020
@RomainMuller RomainMuller requested a review from a team May 27, 2020 10:16
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 27, 2020
@RomainMuller RomainMuller self-assigned this May 27, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 127dca2
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

const yarnLock: YarnLock = lockfile.parse(await fs.readFile(yarnLockLoc, { encoding: 'utf-8' }));
const yarnLock: YarnLock = lockfile.parse(await fs.readFile(yarnLockLoc, { encoding: 'utf8' }));
Copy link
Contributor

Choose a reason for hiding this comment

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

Yuck. Someone missed the ball on strong typing here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this might be some stuff in @types/node somehow becoming a little stricter than before (possibly due to changes in newer versions of node).

@@ -41,7 +41,6 @@
"pkglint": "pkglint -f",
"package": "cdk-package",
"awslint": "cdk-awslint",
"cfn2ts": "cfn2ts",
Copy link
Contributor

Choose a reason for hiding this comment

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

To prevent this from happening in the future, should we have a linter rule that cross-references against 'CloudFormation' key under 'cdk-build' in the package.json?

Copy link
Contributor Author

@RomainMuller RomainMuller Jun 9, 2020

Choose a reason for hiding this comment

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

Well in fact, the isAWS condition on the rule I modified is that cross-reference against the cdk-build.cloudformation key...

Copy link
Contributor

@nija-at nija-at left a comment

Choose a reason for hiding this comment

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

For the above mentioned linter rule.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 9cbc4e4
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jun 9, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: dcd45e5
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jun 9, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 706150e into master Jun 9, 2020
@mergify mergify bot deleted the rmuller/remove-useless-cfn2ts-script-entries branch June 9, 2020 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants