-
Notifications
You must be signed in to change notification settings - Fork 235
Upgrade to py3.8 + latest CDK, pylint, and others #313
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c024a4c to
0a94366
Compare
0a94366 to
3b06a01
Compare
Upgrade to Python 3.8, CDK v1.88 and latest version of pylint and other libraries. Upgraded to use STANDARD:5.0 CodeBuild image. Due to requirements defined in aws-sam-cli, boto3 and botocore had to be set to 1.14.63 and 1.17.63 respectively. Upgrade of pylint resulted in new errors as listed below. These errors have been fixed as part of this commit too. ```bash find src/ -iname "*.py" | xargs pylint --rcfile .pylintrc ************* Module adf-build.organization_policy src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/organization_policy.py:23:0: R1721: Unnecessary use of a comprehension (unnecessary-comprehension) ************* Module adf-build.shared.cdk.cdk_stacks.main src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_stacks/main.py:86:16: R1724: Unnecessary "elif" after "continue" (no-else-continue) ************* Module adf-build.shared.cdk.clean_pipelines src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/clean_pipelines.py:77:16: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) ************* Module adf-build.shared.python.parameter_store src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/python/parameter_store.py:66:12: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from) src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/python/parameter_store.py:82:12: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from) ************* Module adf-build.shared.python.cloudformation src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/python/cloudformation.py:206:12: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from) ************* Module adf-build.shared.python.organizations src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/python/organizations.py:160:12: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from) ************* Module adf-build.shared.python.codepipeline src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/python/codepipeline.py:28:0: R1721: Unnecessary use of a comprehension (unnecessary-comprehension) ************* Module adf-build.shared.resolver src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/resolver.py:39:12: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from) src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/resolver.py:92:16: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from) ************* Module main src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/provisioner/main.py:13:0: C0411: third party import "from organizations import Organizations" should be placed before "from src import read_config_files, delete_default_vpc, Support" (wrong-import-order) src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/provisioner/main.py:14:0: C0411: third party import "from logger import configure_logger" should be placed before "from src import read_config_files, delete_default_vpc, Support" (wrong-import-order) src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/provisioner/main.py:15:0: C0411: third party import "from parameter_store import ParameterStore" should be placed before "from src import read_config_files, delete_default_vpc, Support" (wrong-import-order) src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/provisioner/main.py:16:0: C0411: third party import "from sts import STS" should be placed before "from src import read_config_files, delete_default_vpc, Support" (wrong-import-order) ************* Module src.vpc src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/provisioner/src/vpc.py:60:16: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from) src/lambda_codebase/account/main.py:113:0: E0012: Bad option value 'bad-continuation' (bad-option-value) ```
**Why** CDK generate the CloudFormation changes, using jsii v1.20.0 generated an issue where it reported: `ValueError: write to closed file`. **What?** CDK 1.88.0 is compatible with older versions of jsii, so relying on that instead.
**Why?** The `apt-get update` could fail as it fetches the latest updates that might break the build. Instead, we should rely on the packages that have been installed in the CodeBuild image instead. **What?** Changed to rely on the latest STANDARD:5.0 container image packages. **References** * Fix for issue awslabs#325
3b06a01 to
c78ac9c
Compare
Collaborator
Author
|
Updated PR to use CDK v1.88.0, CodeBuild STANDARD:5.0, and fixing the yarnpkg GPG issue #325. |
thomasmcgannon
approved these changes
Feb 5, 2021
Collaborator
thomasmcgannon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
deltagarrett
approved these changes
Feb 12, 2021
deltagarrett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
sbkok
added a commit
to sbkok/aws-deployment-framework
that referenced
this pull request
Feb 12, 2021
**Features 🏗** * Adds Enterprise Support to account creation process awslabs#233, closes awslabs#232: * ADF will raise a ticket to add the account to an existing AWS support subscription when an account is created. As a prerequisite, your organization master account must already have enterprise support activated. * Adds nested deployment map support awslabs#266 and awslabs#328, closes awslabs#265: * This enables usage of sub directories within the deployment_maps folder. **Fixes 🐞** * Fixes specific role usage to be used in Build and Deploy only awslabs#295. * Corrects removing pipelines anchor in docs awslabs#279. * Fixes CI builds due to isort version mismatch awslabs#284. * Fixes error handling of generate_params intrinsic upload function awslabs#277, closes awslabs#276. * Fixes spec_inline attribute of CodeBuild in docs awslabs#289. * Fixes provider spec_inline support of CodeBuild in awslabs#293. * Fixes supported list of intrinsic upload path styles, enables usage of s3-url and s3-key-only awslabs#275, closes awslabs#299. * Fixes create deployment account concurrency failure awslabs#287, closes awslabs#280. * Fixes approval stage usage, by limiting specific role usage to Build and Deploy steps awslabs#295. * Fixes yarnpkg GPG awslabs#313, closes awslabs#325. * Removes dependency on botocore.vendored.requests awslabs#326, closes awslabs#324. **Improvements ✨** * Improves docs on providers and their properties awslabs#274. * Separates pipeline cleanup from input generation script awslabs#288. * Upgrades Python from v3.7 to v3.8 awslabs#313. * Upgrades CodeBuild image from "aws/codebuild/standard:2.0" to "aws/codebuild/standard:5.0" awslabs#313, closes awslabs#267, closes awslabs#300. * Upgrades CDK from v1.32 to v1.88 awslabs#313, closes awslabs#292.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Upgrade to Python 3.8 and latest version of CDK, pylint, and other
libraries.
Due to requirements defined in aws-sam-cli, boto3 and botocore had to be
set to 1.14.63 and 1.17.63 respectively.
Upgrade of pylint resulted in new errors as listed below.
These errors have been fixed as part of this commit too.
This fixes issues #267, #300, and #325.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.