aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.58k stars 3.88k forks source link

(awslint): awslint and all dependent modules builds failing #12303

Closed Jacob-Doetsch closed 3 years ago

Jacob-Doetsch commented 3 years ago

awslint tests check LICENSE and NOTICE for consistency in the current year, but the LICENSE and NOTICE files still have 2020 as the copyright year rather than 2021

Reproduction Steps

reproducing in the aws-ec2 module checkout latest master, run the following in the project root

git clean -fdx
yarn
cd packages/@aws-cdk/aws-ec2
../../../scripts/buildup  # awslint checks of LICENSE and NOTICE fail since it's 2021 now

Every module is probably affected because they presumably all rely on awslint

What did you expect to happen?

Expected buildup script against aws-ec2 to complete successfully against master

What actually happened?

buildup script fails due to awslint checking LICENSE and NOTICE files and out-of-date copyrights

In package package.json
- [license/license-file] LICENSE should contain exactly '                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.
...omitted...
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
' (fixable)
[license/notice-file] NOTICE does NOT begin with AWS Cloud Development Kit (AWS CDK),Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.,'
Error: Some package.json files had errors
    at main (/home/jake/aws-cdk/tools/pkglint/bin/pkglint.js:26:15)
    at Object.<anonymous> (/home/jake/aws-cdk/tools/pkglint/bin/pkglint.js:29:1)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14)
    at Module.require (node:internal/modules/cjs/loader:991:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/home/jake/aws-cdk/tools/pkglint/bin/pkglint:2:1)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
npm ERR! code 1
npm ERR! path /home/jake/aws-cdk/packages/awslint
npm ERR! command failed
npm ERR! command sh -c eslint . --ext=.ts && pkglint

Environment

Other

Proposed fix at https://github.com/aws/aws-cdk/pull/12304 Updating the LICENSE and NOTICE files from 2020 to 2021 solves the issue.


This is :bug: Bug Report

Jacob-Doetsch commented 3 years ago

Resolved by https://github.com/aws/aws-cdk/pull/12314

github-actions[bot] commented 3 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.