From 0f77c26af2a157e1258b0106425f91014305569a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 09:19:43 +0100 Subject: [PATCH 1/7] chore(deps-dev): bump mypy-boto3-secretsmanager from 1.23.0.post1 to 1.23.8 (#1225) chore(deps-dev): bump mypy-boto3-secretsmanager Bumps [mypy-boto3-secretsmanager](https://github.com/youtype/mypy_boto3_builder) from 1.23.0.post1 to 1.23.8. - [Release notes](https://github.com/youtype/mypy_boto3_builder/releases) - [Commits](https://github.com/youtype/mypy_boto3_builder/commits) --- updated-dependencies: - dependency-name: mypy-boto3-secretsmanager dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index d2d9c4a9c6b..c6d408fe153 100644 --- a/poetry.lock +++ b/poetry.lock @@ -638,8 +638,8 @@ typing-extensions = ">=4.1.0" [[package]] name = "mypy-boto3-secretsmanager" -version = "1.23.0.post1" -description = "Type annotations for boto3.SecretsManager 1.23.0 service generated with mypy-boto3-builder 7.5.14" +version = "1.23.8" +description = "Type annotations for boto3.SecretsManager 1.23.8 service generated with mypy-boto3-builder 7.6.0" category = "dev" optional = false python-versions = ">=3.6" @@ -1101,7 +1101,7 @@ pydantic = ["pydantic", "email-validator"] [metadata] lock-version = "1.1" python-versions = "^3.6.2" -content-hash = "2e703a44e1cabcd2ed930861b1aeb170b9fafd5cf96cf17cd6a3bebc6804055f" +content-hash = "3338b6725aca49dba6d26d5db7019ba23c2281af6e4f7f581a4760da3af546e3" [metadata.files] atomicwrites = [ @@ -1438,8 +1438,8 @@ mypy-boto3-dynamodb = [ {file = "mypy_boto3_dynamodb-1.23.0.post1-py3-none-any.whl", hash = "sha256:fed40bd6e987d4dbe2551b2a33106f23965111570e0a84e9e7a3caf65d1c79f9"}, ] mypy-boto3-secretsmanager = [ - {file = "mypy-boto3-secretsmanager-1.23.0.post1.tar.gz", hash = "sha256:f411acaa90b2a84c6372ff81e038740d0cfb9f09b6280c3e1f0dc5468a7ef0f2"}, - {file = "mypy_boto3_secretsmanager-1.23.0.post1-py3-none-any.whl", hash = "sha256:3aa8970bcf2bdb756629b5b0accce44ac5ff58bd7c1258e20e2848bb36f200b6"}, + {file = "mypy-boto3-secretsmanager-1.23.8.tar.gz", hash = "sha256:f6679b6e3844ac1e766efefedbffcf09924c02b1cdd05af5f8675d80383d6243"}, + {file = "mypy_boto3_secretsmanager-1.23.8-py3-none-any.whl", hash = "sha256:fbf5aa340ee239d7ed50b37b70afb2d9869980f4567ebe47ee9241c5a94486d9"}, ] mypy-boto3-ssm = [ {file = "mypy-boto3-ssm-1.23.0.post1.tar.gz", hash = "sha256:78333811d184432ddfaa1d14bfb9586badc763d5ff8c876b7a224ebe629f9de8"}, diff --git a/pyproject.toml b/pyproject.toml index ee379dd0e2e..698f2cd7bf6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ mkdocs-git-revision-date-plugin = "^0.3.2" mike = "^0.6.0" mypy = "^0.950" mkdocs-material = "^8.2.7" -mypy-boto3-secretsmanager = "^1.23.0" +mypy-boto3-secretsmanager = "^1.23.8" mypy-boto3-ssm = "^1.23.0" mypy-boto3-appconfig = "^1.23.0" mypy-boto3-dynamodb = "^1.23.0" From fc42f2e4e2318d9d694a65982f1a68cd761475be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 10:16:07 +0100 Subject: [PATCH 2/7] chore(deps-dev): bump mypy from 0.950 to 0.960 (#1224) Bumps [mypy](https://github.com/python/mypy) from 0.950 to 0.960. - [Release notes](https://github.com/python/mypy/releases) - [Commits](https://github.com/python/mypy/compare/v0.950...v0.960) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Simon Thulbourn --- poetry.lock | 48 ++++++++++++++++++++++++------------------------ pyproject.toml | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/poetry.lock b/poetry.lock index c6d408fe153..b74407a612b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -597,7 +597,7 @@ python-versions = ">=3.6" [[package]] name = "mypy" -version = "0.950" +version = "0.960" description = "Optional static typing for Python" category = "dev" optional = false @@ -1405,29 +1405,29 @@ mkdocs-material-extensions = [ {file = "mkdocs_material_extensions-1.0.3-py3-none-any.whl", hash = "sha256:a82b70e533ce060b2a5d9eb2bc2e1be201cf61f901f93704b4acf6e3d5983a44"}, ] mypy = [ - {file = "mypy-0.950-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cf9c261958a769a3bd38c3e133801ebcd284ffb734ea12d01457cb09eacf7d7b"}, - {file = "mypy-0.950-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5b5bd0ffb11b4aba2bb6d31b8643902c48f990cc92fda4e21afac658044f0c0"}, - {file = "mypy-0.950-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5e7647df0f8fc947388e6251d728189cfadb3b1e558407f93254e35abc026e22"}, - {file = "mypy-0.950-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:eaff8156016487c1af5ffa5304c3e3fd183edcb412f3e9c72db349faf3f6e0eb"}, - {file = "mypy-0.950-cp310-cp310-win_amd64.whl", hash = "sha256:563514c7dc504698fb66bb1cf897657a173a496406f1866afae73ab5b3cdb334"}, - {file = "mypy-0.950-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:dd4d670eee9610bf61c25c940e9ade2d0ed05eb44227275cce88701fee014b1f"}, - {file = "mypy-0.950-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ca75ecf2783395ca3016a5e455cb322ba26b6d33b4b413fcdedfc632e67941dc"}, - {file = "mypy-0.950-cp36-cp36m-win_amd64.whl", hash = "sha256:6003de687c13196e8a1243a5e4bcce617d79b88f83ee6625437e335d89dfebe2"}, - {file = "mypy-0.950-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4c653e4846f287051599ed8f4b3c044b80e540e88feec76b11044ddc5612ffed"}, - {file = "mypy-0.950-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e19736af56947addedce4674c0971e5dceef1b5ec7d667fe86bcd2b07f8f9075"}, - {file = "mypy-0.950-cp37-cp37m-win_amd64.whl", hash = "sha256:ef7beb2a3582eb7a9f37beaf38a28acfd801988cde688760aea9e6cc4832b10b"}, - {file = "mypy-0.950-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0112752a6ff07230f9ec2f71b0d3d4e088a910fdce454fdb6553e83ed0eced7d"}, - {file = "mypy-0.950-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ee0a36edd332ed2c5208565ae6e3a7afc0eabb53f5327e281f2ef03a6bc7687a"}, - {file = "mypy-0.950-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:77423570c04aca807508a492037abbd72b12a1fb25a385847d191cd50b2c9605"}, - {file = "mypy-0.950-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5ce6a09042b6da16d773d2110e44f169683d8cc8687e79ec6d1181a72cb028d2"}, - {file = "mypy-0.950-cp38-cp38-win_amd64.whl", hash = "sha256:5b231afd6a6e951381b9ef09a1223b1feabe13625388db48a8690f8daa9b71ff"}, - {file = "mypy-0.950-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:0384d9f3af49837baa92f559d3fa673e6d2652a16550a9ee07fc08c736f5e6f8"}, - {file = "mypy-0.950-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1fdeb0a0f64f2a874a4c1f5271f06e40e1e9779bf55f9567f149466fc7a55038"}, - {file = "mypy-0.950-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:61504b9a5ae166ba5ecfed9e93357fd51aa693d3d434b582a925338a2ff57fd2"}, - {file = "mypy-0.950-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a952b8bc0ae278fc6316e6384f67bb9a396eb30aced6ad034d3a76120ebcc519"}, - {file = "mypy-0.950-cp39-cp39-win_amd64.whl", hash = "sha256:eaea21d150fb26d7b4856766e7addcf929119dd19fc832b22e71d942835201ef"}, - {file = "mypy-0.950-py3-none-any.whl", hash = "sha256:a4d9898f46446bfb6405383b57b96737dcfd0a7f25b748e78ef3e8c576bba3cb"}, - {file = "mypy-0.950.tar.gz", hash = "sha256:1b333cfbca1762ff15808a0ef4f71b5d3eed8528b23ea1c3fb50543c867d68de"}, + {file = "mypy-0.960-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3a3e525cd76c2c4f90f1449fd034ba21fcca68050ff7c8397bb7dd25dd8b8248"}, + {file = "mypy-0.960-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7a76dc4f91e92db119b1be293892df8379b08fd31795bb44e0ff84256d34c251"}, + {file = "mypy-0.960-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ffdad80a92c100d1b0fe3d3cf1a4724136029a29afe8566404c0146747114382"}, + {file = "mypy-0.960-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:7d390248ec07fa344b9f365e6ed9d205bd0205e485c555bed37c4235c868e9d5"}, + {file = "mypy-0.960-cp310-cp310-win_amd64.whl", hash = "sha256:925aa84369a07846b7f3b8556ccade1f371aa554f2bd4fb31cb97a24b73b036e"}, + {file = "mypy-0.960-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:239d6b2242d6c7f5822163ee082ef7a28ee02e7ac86c35593ef923796826a385"}, + {file = "mypy-0.960-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f1ba54d440d4feee49d8768ea952137316d454b15301c44403db3f2cb51af024"}, + {file = "mypy-0.960-cp36-cp36m-win_amd64.whl", hash = "sha256:cb7752b24528c118a7403ee955b6a578bfcf5879d5ee91790667c8ea511d2085"}, + {file = "mypy-0.960-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:826a2917c275e2ee05b7c7b736c1e6549a35b7ea5a198ca457f8c2ebea2cbecf"}, + {file = "mypy-0.960-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3eabcbd2525f295da322dff8175258f3fc4c3eb53f6d1929644ef4d99b92e72d"}, + {file = "mypy-0.960-cp37-cp37m-win_amd64.whl", hash = "sha256:f47322796c412271f5aea48381a528a613f33e0a115452d03ae35d673e6064f8"}, + {file = "mypy-0.960-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2c7f8bb9619290836a4e167e2ef1f2cf14d70e0bc36c04441e41487456561409"}, + {file = "mypy-0.960-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:fbfb873cf2b8d8c3c513367febde932e061a5f73f762896826ba06391d932b2a"}, + {file = "mypy-0.960-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cc537885891382e08129d9862553b3d00d4be3eb15b8cae9e2466452f52b0117"}, + {file = "mypy-0.960-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:481f98c6b24383188c928f33dd2f0776690807e12e9989dd0419edd5c74aa53b"}, + {file = "mypy-0.960-cp38-cp38-win_amd64.whl", hash = "sha256:29dc94d9215c3eb80ac3c2ad29d0c22628accfb060348fd23d73abe3ace6c10d"}, + {file = "mypy-0.960-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:33d53a232bb79057f33332dbbb6393e68acbcb776d2f571ba4b1d50a2c8ba873"}, + {file = "mypy-0.960-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8d645e9e7f7a5da3ec3bbcc314ebb9bb22c7ce39e70367830eb3c08d0140b9ce"}, + {file = "mypy-0.960-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:85cf2b14d32b61db24ade8ac9ae7691bdfc572a403e3cb8537da936e74713275"}, + {file = "mypy-0.960-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a85a20b43fa69efc0b955eba1db435e2ffecb1ca695fe359768e0503b91ea89f"}, + {file = "mypy-0.960-cp39-cp39-win_amd64.whl", hash = "sha256:0ebfb3f414204b98c06791af37a3a96772203da60636e2897408517fcfeee7a8"}, + {file = "mypy-0.960-py3-none-any.whl", hash = "sha256:bfd4f6536bd384c27c392a8b8f790fd0ed5c0cf2f63fc2fed7bce56751d53026"}, + {file = "mypy-0.960.tar.gz", hash = "sha256:d4fccf04c1acf750babd74252e0f2db6bd2ac3aa8fe960797d9f3ef41cf2bfd4"}, ] mypy-boto3-appconfig = [ {file = "mypy-boto3-appconfig-1.23.0.post1.tar.gz", hash = "sha256:78442ffc2850a5234f72a4c2b3d5eeae87e3e1cc67e689bb3bee33e35cbb31a9"}, diff --git a/pyproject.toml b/pyproject.toml index 698f2cd7bf6..4ed3dae87b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ flake8-eradicate = "^1.2.1" flake8-bugbear = "^22.4.25" mkdocs-git-revision-date-plugin = "^0.3.2" mike = "^0.6.0" -mypy = "^0.950" +mypy = "^0.960" mkdocs-material = "^8.2.7" mypy-boto3-secretsmanager = "^1.23.8" mypy-boto3-ssm = "^1.23.0" From a64a00623b07e9faa30f5adff5fa3b9a092c2fff Mon Sep 17 00:00:00 2001 From: Heitor Lessa Date: Thu, 2 Jun 2022 13:05:42 +0200 Subject: [PATCH 3/7] docs(maintainers): initial maintainers playbook (#1222) --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 + .github/ISSUE_TEMPLATE/static_typing.yml | 2 +- .github/auto_assign-issues.yml | 8 - .github/boring-cyborg.yml | 57 +++-- .github/release-drafter.yml | 36 ++- .github/workflows/post_release.js | 2 +- .github/workflows/publish.yml | 155 +++++++------ .github/workflows/release-drafter.yml | 1 + MAINTAINERS.md | 279 +++++++++++++++++++++++ 9 files changed, 414 insertions(+), 128 deletions(-) delete mode 100644 .github/auto_assign-issues.yml create mode 100644 MAINTAINERS.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 8c557bdbed0..6d441bf0c64 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -7,6 +7,8 @@ body: attributes: value: | Thank you for submitting a bug report. Please add as much information as possible to help us reproduce, and remove any potential sensitive data. + + Please become familiar with [our definition of bug](https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/MAINTAINERS.md#is-that-a-bug). - type: textarea id: expected_behaviour attributes: diff --git a/.github/ISSUE_TEMPLATE/static_typing.yml b/.github/ISSUE_TEMPLATE/static_typing.yml index c197fba4967..863dde7d33f 100644 --- a/.github/ISSUE_TEMPLATE/static_typing.yml +++ b/.github/ISSUE_TEMPLATE/static_typing.yml @@ -1,7 +1,7 @@ name: Static typing mismatch report description: Report a static type mismatch caught by a static type checker title: "Static typing: TITLE" -labels: ["static_typing", "triage"] +labels: ["typing", "triage"] body: - type: markdown attributes: diff --git a/.github/auto_assign-issues.yml b/.github/auto_assign-issues.yml deleted file mode 100644 index 1b7aa13da77..00000000000 --- a/.github/auto_assign-issues.yml +++ /dev/null @@ -1,8 +0,0 @@ -addAssignees: true - -# The list of users to assign to new issues. -# If empty or not provided, the repository owner is assigned -assignees: - - heitorlessa - - nmoutschen - - cakepietoast diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml index 31aa24bc94f..9f6554fc784 100644 --- a/.github/boring-cyborg.yml +++ b/.github/boring-cyborg.yml @@ -1,66 +1,84 @@ ##### Labeler ########################################################################################################## labelPRBasedOnFilePath: - area/logger: + logger: - aws_lambda_powertools/logging/* - aws_lambda_powertools/logging/**/* - aws_lambda_powertools/package_logger.py - area/tracer: + tracer: - aws_lambda_powertools/tracing/* - aws_lambda_powertools/tracing/**/* - area/metrics: + metrics: - aws_lambda_powertools/metrics/* - aws_lambda_powertools/metrics/**/* - area/event_handlers: + event_handlers: - aws_lambda_powertools/event_handler/* - aws_lambda_powertools/event_handler/**/* - area/middleware_factory: + middleware_factory: - aws_lambda_powertools/middleware_factory/* - aws_lambda_powertools/middleware_factory/**/* - area/parameters: + parameters: - aws_lambda_powertools/parameters/* - aws_lambda_powertools/parameters/**/* - area/batch: + batch: - aws_lambda_powertools/batch/* - aws_lambda_powertools/batch/**/* - area/validator: + validator: - aws_lambda_powertools/validation/* - aws_lambda_powertools/validation/**/* - area/event_sources: + event_sources: - aws_lambda_powertools/data_classes/* - aws_lambda_powertools/data_classes/**/* - area/parser: + parser: - aws_lambda_powertools/parser/* - aws_lambda_powertools/parser/**/* - area/idempotency: + idempotency: - aws_lambda_powertools/idempotency/* - aws_lambda_powertools/idempotency/**/* - area/feature_flags: + feature_flags: - aws_lambda_powertools/feature_flags/* - aws_lambda_powertools/feature_flags/**/* - area/jmespath_util: + jmespath_util: - aws_lambda_powertools/utilities/jmespath_utils/* - area/utilities: + typing: + - aws_lambda_powertools/utilities/typing/* + - mypy.ini + utilities: - aws_lambda_powertools/utilities/* - aws_lambda_powertools/utilities/**/* - - aws_lambda_powertools/middleware_factory/* - - aws_lambda_powertools/middleware_factory/**/* documentation: - docs/* - docs/**/* - mkdocs.yml + github-actions: + - .github/workflows/* + - .github/workflows/**/* + - .github/dependabot.yml + - .github/boring-cyborg.yml + - .github/release-drafter.yml + - .github/semantic.yml + - .github/stale.yml + - .github/mergify.yml + + github-templates: + - .github/ISSUE_TEMPLATE/* + - .github/PULL_REQUEST_TEMPLATE.md + - .github/.chglog/* + - .github/.chglog/**/* + internal: - - .github/* - - .github/**/* - - .chglog/* - .flake8 + - .bandit.baseline - .gitignore - .pre-commit-config.yaml + - MANIFEST.in - Makefile - CONTRIBUTING.md + - MAINTAINERS.md - CODE_OF_CONDUCT.md - LICENSE + - THIRD-PARTY-LICENSES - aws_lambda_powertools_python/shared/* - aws_lambda_powertools_python/shared/** @@ -86,7 +104,6 @@ firstPRMergeComment: > firstIssueWelcomeComment: > Thanks for opening your first issue here! We'll come back to you as soon as we can. - ###### IssueLink Adder ################################################################################################# # Insert Issue (Jira/Github etc) link in PR description based on the Issue ID in PR title. #insertIssueLinkInPrDescription: diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 44ad5a61779..b590898b517 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,32 +1,28 @@ change-template: "* $TITLE (#$NUMBER) by @$AUTHOR" categories: - - title: '⚑ Breaking Changes' + - title: "⚑ Breaking Changes" labels: - - 'breaking-change' - - title: '🌟New features and non-breaking changes' + - "breaking-change" + - title: "🌟New features and non-breaking changes" labels: - - 'major' - - 'feature' - - title: '🌟 Minor Changes' + - "feature" + - title: "πŸ“œ Documentation updates" labels: - - 'enhancement' - - title: 'πŸ“œ Documentation updates' + - "documentation" + - title: "πŸ› Bug and hot fixes" labels: - - 'documentation' - - title: 'πŸ› Bug and hot fixes' + - "bug" + - "fix" + - title: "πŸš’ Deprecations" labels: - - 'bug' - - 'fix' - - title: 'πŸš’ Deprecations' + - "deprecated" + - title: "πŸ”§ Maintenance" labels: - - 'deprecated' - - title: 'πŸ”§ Maintenance' - labels: - - 'internal' - - 'dependencies' + - "internal" + - "dependencies" exclude-labels: - - 'skip-changelog' -tag-template: 'v$NEXT_PATCH_VERSION' + - "skip-changelog" +tag-template: "v$NEXT_PATCH_VERSION" template: | ## Summary diff --git a/.github/workflows/post_release.js b/.github/workflows/post_release.js index 4b67a6965ec..70474740e2e 100644 --- a/.github/workflows/post_release.js +++ b/.github/workflows/post_release.js @@ -1,4 +1,4 @@ -const STAGED_LABEL = "status/staged-next-release"; +const STAGED_LABEL = "pending-release"; /** * Fetch issues using GitHub REST API diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f72c6bb4f20..6a4bb3b3cf5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,7 +22,7 @@ name: Publish to PyPi # 8. Builds a fresh version of docs including Changelog updates # 9. Push latest release source code to master using release title as the commit message # 10. Builds latest documentation for new release, and update latest alias pointing to the new release tag -# 11. Close and notify all issues labeled "status/staged-next-release" about the release details +# 11. Close and notify all issues labeled "pending-release" about the release details # # === Fallback mechanism due to external failures === @@ -36,7 +36,6 @@ name: Publish to PyPi # # Look for rebuild latest docs workflow - on: release: types: [published] @@ -45,84 +44,84 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: "3.8" - - name: Set release notes tag - run: | - RELEASE_TAG_VERSION=${{ github.event.release.tag_name }} - echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV - - name: Ensure new version is also set in pyproject and CHANGELOG - run: | - grep --regexp "${RELEASE_TAG_VERSION}" CHANGELOG.md - grep --regexp "version \= \"${RELEASE_TAG_VERSION}\"" pyproject.toml - - name: Install dependencies - run: make dev - - name: Run all tests, linting and baselines - run: make pr - - name: Build python package and wheel - run: poetry build - - name: Upload to PyPi test - run: make release-test - env: - PYPI_USERNAME: __token__ - PYPI_TEST_TOKEN: ${{ secrets.PYPI_TEST_TOKEN }} - - name: Upload to PyPi prod - run: make release-prod - env: - PYPI_USERNAME: __token__ - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - - name: publish lambda layer in SAR by triggering the internal codepipeline - run: | - aws ssm put-parameter --name "powertools-python-release-version" --value $RELEASE_TAG_VERSION --overwrite - aws codepipeline start-pipeline-execution --name ${{ secrets.CODEPIPELINE_NAME }} - env: - # Maintenance: Migrate to new OAuth mechanism - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: eu-west-1 - AWS_DEFAULT_OUTPUT: json - - name: Setup doc deploy - run: | - git config --global user.name Docs deploy - git config --global user.email aws-devax-open-source@amazon.com - - name: Build docs website and API reference - run: | - make release-docs VERSION=${RELEASE_TAG_VERSION} ALIAS="latest" - poetry run mike set-default --push latest - - name: Release API docs to release version - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./api - keep_files: true - destination_dir: ${{ env.RELEASE_TAG_VERSION }}/api - - name: Release API docs to latest - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./api - keep_files: true - destination_dir: latest/api - - name: Close issues related to this release - uses: actions/github-script@v6 - with: - script: | - const post_release = require('.github/workflows/post_release.js') - await post_release({github, context, core}) + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: "3.8" + - name: Set release notes tag + run: | + RELEASE_TAG_VERSION=${{ github.event.release.tag_name }} + echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV + - name: Ensure new version is also set in pyproject and CHANGELOG + run: | + grep --regexp "${RELEASE_TAG_VERSION}" CHANGELOG.md + grep --regexp "version \= \"${RELEASE_TAG_VERSION}\"" pyproject.toml + - name: Install dependencies + run: make dev + - name: Run all tests, linting and baselines + run: make pr + - name: Build python package and wheel + run: poetry build + - name: Upload to PyPi test + run: make release-test + env: + PYPI_USERNAME: __token__ + PYPI_TEST_TOKEN: ${{ secrets.PYPI_TEST_TOKEN }} + - name: Upload to PyPi prod + run: make release-prod + env: + PYPI_USERNAME: __token__ + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + - name: publish lambda layer in SAR by triggering the internal codepipeline + run: | + aws ssm put-parameter --name "powertools-python-release-version" --value $RELEASE_TAG_VERSION --overwrite + aws codepipeline start-pipeline-execution --name ${{ secrets.CODEPIPELINE_NAME }} + env: + # Maintenance: Migrate to new OAuth mechanism + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: eu-west-1 + AWS_DEFAULT_OUTPUT: json + - name: Setup doc deploy + run: | + git config --global user.name Docs deploy + git config --global user.email aws-devax-open-source@amazon.com + - name: Build docs website and API reference + run: | + make release-docs VERSION=${RELEASE_TAG_VERSION} ALIAS="latest" + poetry run mike set-default --push latest + - name: Release API docs to release version + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./api + keep_files: true + destination_dir: ${{ env.RELEASE_TAG_VERSION }}/api + - name: Release API docs to latest + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./api + keep_files: true + destination_dir: latest/api + - name: Close issues related to this release + uses: actions/github-script@v6 + with: + script: | + const post_release = require('.github/workflows/post_release.js') + await post_release({github, context, core}) sync_master: needs: release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Sync master from detached head - # If version matches CHANGELOG and pyproject.toml - # If it passes all checks, successfully releases to test and prod - # Then sync up master with latest source code release - # where commit message will be Release notes title - run: git push origin HEAD:refs/heads/master --force + - uses: actions/checkout@v3 + - name: Sync master from detached head + # If version matches CHANGELOG and pyproject.toml + # If it passes all checks, successfully releases to test and prod + # Then sync up master with latest source code release + # where commit message will be Release notes title + run: git push origin HEAD:refs/heads/master --force diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 59633a634b6..ecc2251ec43 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -5,6 +5,7 @@ on: # branches to consider in the event; optional, defaults to all branches: - develop + workflow_dispatch: jobs: update_release_draft: diff --git a/MAINTAINERS.md b/MAINTAINERS.md new file mode 100644 index 00000000000..8db5f42fd59 --- /dev/null +++ b/MAINTAINERS.md @@ -0,0 +1,279 @@ + +## Table of contents + +- [Overview](#overview) +- [Current Maintainers](#current-maintainers) +- [Emeritus](#emeritus) +- [Labels](#labels) +- [Maintainer Responsibilities](#maintainer-responsibilities) + - [Uphold Code of Conduct](#uphold-code-of-conduct) + - [Prioritize Security](#prioritize-security) + - [Review Pull Requests](#review-pull-requests) + - [Triage New Issues](#triage-new-issues) + - [Triage Bug Reports](#triage-bug-reports) + - [Triage RFCs](#triage-rfcs) + - [Releasing a new version](#releasing-a-new-version) + - [Changelog generation](#changelog-generation) + - [Bumping the version](#bumping-the-version) + - [Drafting release notes](#drafting-release-notes) + - [Releasing a documentation hotfix](#releasing-a-documentation-hotfix) + - [Maintain Overall Health of the Repo](#maintain-overall-health-of-the-repo) + - [Manage Roadmap](#manage-roadmap) + - [Add Continuous Integration Checks](#add-continuous-integration-checks) + - [Negative Impact on the Project](#negative-impact-on-the-project) + - [Becoming a maintainer](#becoming-a-maintainer) +- [Common scenarios](#common-scenarios) + - [Contribution is stuck](#contribution-is-stuck) + - [Insufficient feedback or information](#insufficient-feedback-or-information) + - [Crediting contributions](#crediting-contributions) + - [Is that a bug?](#is-that-a-bug) + - [Mentoring contributions](#mentoring-contributions) + - [Long running issues or PRs](#long-running-issues-or-prs) + +## Overview + +> **This document is currently a WORK-IN-PROGRESS** + +This is document explains who the maintainers are (see below), what they do in this repo, and how they should be doing it. If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md). + +## Current Maintainers + +| Maintainer | GitHub ID | Affiliation | +| ---------------- | --------------------------------------------- | ----------- | +| Heitor Lessa | [heitorlessa](https://github.com/heitorlessa) | Amazon | +| Alexander Melnyk | [am29d](https://github.com/am29d) | Amazon | +| Michal Ploski | [mploski](https://github.com/mploski) | Amazon | +| Simon Thulbourn | [sthulb](https://github.com/sthulb) | Amazon | + +## Emeritus + +Previous active maintainers who contributed to this project. + +| Maintainer | GitHub ID | Affiliation | +| ----------------- | ----------------------------------------------- | ----------- | +| Tom McCarthy | [cakepietoast](https://github.com/cakepietoast) | MongoDB | +| Nicolas Moutschen | [nmoutschen](https://github.com/nmoutschen) | Amazon | + +## Labels + +These are the most common labels used by maintainers to triage issues, pull requests (PR), and for project management: + +| Label | Usage | Notes | +| ---------------------- | ---------------------------------------------------------------- | --------------------------------------------------------------- | +| triage | New issues that require maintainers review | Issue template | +| bug | Unexpected, reproducible and unintended software behavior | PR/Release automation; Doc snippets are excluded; | +| not-a-bug | New and existing bug reports incorrectly submitted as bug | Analytics | +| documentation | Documentation improvements | PR/Release automation; Doc additions, fixes, etc.; | +| feature-request | New or enhancements to existing features | Issue template | +| typing | New or enhancements to static typing | Issue template | +| RFC | Technical design documents related to a feature request | Issue template | +| bug-upstream | Bug caused by upstream dependency | | +| help wanted | Tasks you want help from anyone to move forward | Bandwidth, complex topics, etc. | +| need-customer-feedback | Tasks that need more feedback before proceeding | 80/20% rule, uncertain, etc. | +| need-more-information | Missing information before making any calls | | +| need-documentation | PR is missing or has incomplete documentation | | +| need-issue | PR is missing a related issue for tracking change | Needs to be automated | +| need-rfc | Feature request requires a RFC to improve discussion | | +| pending-release | Merged changes that will be available soon | Release automation auto-closes/notifies it | +| revisit-in-3-months | Blocked issues/PRs that need to be revisited | Often related to `need-customer-feedback`, prioritization, etc. | +| breaking-change | Changes that will cause customer impact and need careful triage | | +| do-not-merge | PRs that are blocked for varying reasons | Timeline is uncertain | +| size/XS | PRs between 0-9 LOC | PR automation | +| size/S | PRs between 10-29 LOC | PR automation | +| size/M | PRs between 30-99 LOC | PR automation | +| size/L | PRs between 100-499 LOC | PR automation | +| size/XL | PRs between 500-999 LOC, often PRs that grown with feedback | PR automation | +| size/XXL | PRs with 1K+ LOC, largely documentation related | PR automation | +| tests | PRs that add or change tests | PR automation | +| `` | PRs related to a Powertools utility, e.g. `parameters`, `tracer` | PR automation | +| feature | New features or minor changes | PR/Release automation | +| dependencies | Changes that touch dependencies, e.g. Dependabot, etc. | PR/ automation | +| github-actions | Changes in GitHub workflows | PR automation | +| github-templates | Changes in GitHub issue/PR templates | PR automation | +| internal | Changes in governance and chores (linting setup, baseline, etc.) | PR automation | + +## Maintainer Responsibilities + +Maintainers are active and visible members of the community, and have [maintain-level permissions on a repository](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization). Use those privileges to serve the community and evolve code as follows. + +Be aware of recurring ambiguous situations and [document them](#common-scenarios) to help your fellow maintainers. + +### Uphold Code of Conduct + +Model the behavior set forward by the [Code of Conduct](CODE_OF_CONDUCT.md) and raise any violations to other maintainers and admins. There could be unusual circumstances where inappropriate behavior does not immediately fall within the [Code of Conduct](CODE_OF_CONDUCT.md). These might be nuanced and should be handled with extra care - when in doubt, do not engage and reach out to other maintainers and admins. + +### Prioritize Security + +Security is your number one priority. Maintainer's Github keys must be password protected securely and any reported security vulnerabilities are addressed before features or bugs. + +Note that this repository is monitored and supported 24/7 by Amazon Security, see [Reporting a Vulnerability](SECURITY.md) for details. + +### Review Pull Requests + +Review pull requests regularly, comment, suggest, reject, merge and close. Accept only high quality pull-requests. Provide code reviews and guidance on incoming pull requests. + +PRs are [labeled](#labels) based on file changes and semantic title. Pay attention to whether labels reflect the current state of the PR and correct accordingly. + +Use and enforce [semantic versioning](https://semver.org/) pull request titles, as these will be used for [CHANGELOG](CHANGELOG.md) and [Release notes](https://github.com/awslabs/aws-lambda-powertools-python/releases) - make sure they communicate their intent at the human level. + +> TODO: This is an area we want to automate using the new GitHub GraphQL API. + +For issues linked to a PR, make sure `pending release` label is applied to them when merging. [Upon release](#releasing-a-new-version), these issues will be notified which release version contains their change. + +See [Common scenarios](#common-scenarios) section for additional guidance. + +### Triage New Issues + +Manage [labels](#labels), review issues regularly, and create new labels as needed by the project. Remove `triage` label when you're able to confirm the validity of a request, a bug can be reproduced, etc. Give priority to the original author for implementation, unless it is a sensitive task that is best handled by maintainers. + +> TODO: This is an area we want to automate using the new GitHub GraphQL API. + +Make sure issues are assigned to our [board of activities](https://github.com/orgs/awslabs/projects/51/) and have the right [status](https://awslabs.github.io/aws-lambda-powertools-python/latest/roadmap/#roadmap-status-definition). + +Use our [labels](#labels) to signal good first issues to new community members, and to set expectation that this might need additional feedback from the author, other customers, experienced community members and/or maintainers. + +Be aware of [casual contributors](https://opensource.com/article/17/10/managing-casual-contributors) and recurring contributors. Provide the experience and attention you wish you had if you were starting in open source. + +See [Common scenarios](#common-scenarios) section for additional guidance. + +### Triage Bug Reports + +Be familiar with [our definition of bug](#is-that-a-bug). If it's not a bug, you can close it or adjust its title and labels - always communicate the reason accordingly. + +For bugs caused by upstream dependencies, replace `bug` with `bug-upstream` label. Ask the author whether they'd like to raise the issue upstream or if they prefer us to do so. + +Assess the impact and make the call on whether we need an emergency release. Contact other [maintainers](#current-maintainers) when in doubt. + +See [Common scenarios](#common-scenarios) section for additional guidance. + +### Triage RFCs + +RFC is a collaborative process to help us get to the most optimal solution given the context. Their purpose is to ensure everyone understands what this context is, their trade-offs, and alternative solutions that were part of the research before implementation begins. + +Make sure you ask these questions in mind when reviewing: + +* Does it use our [RFC template](https://github.com/awslabs/aws-lambda-powertools-python/issues/new?assignees=&labels=RFC%2Ctriage&template=rfc.yml&title=RFC%3A+TITLE)? +* Does the match our [Tenets](https://awslabs.github.io/aws-lambda-powertools-python/latest/#tenets)? +* Does the proposal address the use case? If so, is the recommended usage explicit? +* Does it focus on the mechanics to solve the use case over fine-grained implementation details? +* Can anyone familiar with the code base implement it? +* If approved, are they interested in contributing? Do they need any guidance? +* Does this significantly increase the overall project maintenance? Do we have the skills to maintain it? +* If we can't take this use case, are there alternative projects we could recommend? Or does it call for a new project altogether? + +When necessary, be upfront that the time to review, approve, and implement a RFC can vary - see [Contribution is stuck](#contribution-is-stuck). Some RFCs may be further updated after implementation, as certain areas become clearer. + +Some examples using our initial and new RFC templates: #92, #94, #95, #991, #1226 + +### Releasing a new version + +> TODO: This is an area we want to increase automation while keeping communication at human level. + +Firstly, make sure you are using the `develop` branch and it is up to date with the origin. + +There are three main steps to release a new version: Changelog generation, version bumping, and drafting release notes. + +#### Changelog generation + +You can pre-generate a temporary CHANGELOG using `make changelog`. This will generate a `TMP_CHANGELOG.md` with all staged changes under the `unreleased` section. + +Each unreleased line item is a commit. You can adjust them if you find the commit titles are insufficient to describe their intent. Once you're comfortable, bring these changes to the `CHANGELOG.md` with a new version heading like in previous versions. + +#### Bumping the version + +Use `poetry version ` to bump the version. For example, you can use `poetry version minor` when releasing a minor version. + +NOTE. Make sure both `CHANGELOG` and `pyproject.toml` are committed and pushed to the remote `develop` branch before proceeding. + +#### Drafting release notes + +Visit the [Releases page](https://github.com/awslabs/aws-lambda-powertools-python/releases) and choose the edit pencil button. + +Make sure the `tag` field reflects the new version you're releasing, the target branch field is set to `develop`, and `release title` matches your tag e.g., `v1.26.0`. + +You'll notice we group all changes based on their [labels](#labels) like `feature`, `bug`, `documentation`, etc. + +> **Q: What if there's an incorrect title or grouping?** + +Edit the respective PR title and update their [labels](#labels). Then run the [Release Drafter workflow](https://github.com/awslabs/aws-lambda-powertools-python/actions/workflows/release-drafter.yml) to update the Draft release. + +The best part comes now. Replace the placeholder `[Human readable summary of changes]` with what you'd like to communicate to customers what this release is all about. Always put yourself in the customers shoes. For that, these are some questions to keep in mind when drafting your first or future release notes: + +* Can customers understand at a high level what changed in this release? +* Is there a link to the documentation where they can read more about each main change? +* Are there any graphics or code snippets that can enhance readability? +* Are we calling out any key contributor(s) to this release? + - All contributors are automatically credited, use this as an exceptional case to feature them + +Once you're happy, hit `Publish release`. This will kick off the [Publishing workflow](https://github.com/awslabs/aws-lambda-powertools-python/actions/workflows/publish.yml) and within a few minutes you should see the latest version in PyPi, and all issues labeled as `pending-release` will be notified. + +> TODO: Wait for @am29d new Lambda Layers pipeline work to complete, then add how Lambda Layers are published + +### Releasing a documentation hotfix + +You can rebuild the latest documentation without a full release via this [GitHub Actions Workflow](https://github.com/awslabs/aws-lambda-powertools-python/actions/workflows/rebuild_latest_docs.yml). Choose `Run workflow`, keep `develop` as the branch, and input the latest Powertools version available. + +This workflow will update both user guide and API documentation. + +### Maintain Overall Health of the Repo + +> TODO: Coordinate removing `master` and renaming `develop` to `main` + +Keep the `develop` branch at production quality at all times. Backport features as needed. Cut release branches and tags to enable future patches. + +### Manage Roadmap + +See [Roadmap section](https://awslabs.github.io/aws-lambda-powertools-python/latest/roadmap/) + +Ensure the repo highlights features that should be elevated to the project roadmap. Be clear about the feature’s status, priority, target version, and whether or not it should be elevated to the roadmap. + +### Add Continuous Integration Checks + +Add integration checks that validate pull requests and pushes to ease the burden on Pull Request reviewers. Continuously revisit areas of improvement to reduce operational burden in all parties involved. + +### Negative Impact on the Project + +Actions that negatively impact the project will be handled by the admins, in coordination with other maintainers, in balance with the urgency of the issue. Examples would be [Code of Conduct](CODE_OF_CONDUCT.md) violations, deliberate harmful or malicious actions, spam, monopolization, and security risks. + +### Becoming a maintainer + +In 2023, we will revisit this. We need to improve our understanding of how other projects are doing, their mechanisms to promote key contributors, and how they interact daily. + +We suspect this process might look similar to the [OpenSearch project](https://github.com/opensearch-project/.github/blob/main/MAINTAINERS.md#becoming-a-maintainer). +## Common scenarios + +These are recurring ambiguous situations that new and existing maintainers may encounter. They serve as guidance. It is up to each maintainer to follow, adjust, or handle in a different manner as long as [our conduct is consistent](#uphold-code-of-conduct) + +### Contribution is stuck + +A contribution can get stuck often due to lack of bandwidth and language barrier. For bandwidth issues, check whether the author needs help. Make sure you get their permission before pushing code into their existing PR - do not create a new PR unless strictly necessary. + +For language barrier and others, offer a 1:1 chat to get them unblocked. Often times, English might not be their primary language, and writing in public might put them off, or come across not the way they intended to be. + +In other cases, you may have constrained capacity. Use `help wanted` label when you want to signal other maintainers and external contributors that you could use a hand to move it forward. + +### Insufficient feedback or information + +When in doubt, use `need-more-information` or `need-customer-feedback` labels to signal more context and feedback are necessary before proceeding. You can also use `revisit-in-3-months` label when you expect it might take a while to gather enough information before you can decide. + +### Crediting contributions + +We credit all contributions as part of each [release note](https://github.com/awslabs/aws-lambda-powertools-python/releases) as an automated process. If you find contributors are missing from the release note you're producing, please add them manually. + +### Is that a bug? + +A bug produces incorrect or unexpected results at runtime that differ from its intended behavior. Bugs must be reproducible. They directly affect customers experience at runtime despite following its recommended usage. + +Documentation snippets, use of internal components, or unadvertised functionalities are not considered bugs. + +### Mentoring contributions + +Always favor mentoring issue authors to contribute, unless they're not interested or the implementation is sensitive (_e.g., complexity, time to release, etc._). + +Make use of `help wanted` and `good first issue` to signal additional contributions the community can help. + +### Long running issues or PRs + +Try offering a 1:1 call in the attempt to get to a mutual understanding and clarify areas that maintainers could help. + +In the rare cases where both parties don't have the bandwidth or expertise to continue, it's best to use the `revisit-in-3-months` label. By then, see if it's possible to break the PR or issue in smaller chunks, and eventually close if there is no progress. From c79dce8384b56938fbffec893ae2ad1e88fbbd2c Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Thu, 2 Jun 2022 13:20:50 +0200 Subject: [PATCH 4/7] docs(governance): link roadmap and maintainers doc --- MAINTAINERS.md | 2 +- docs/roadmap.md | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 8db5f42fd59..a706b94c6ab 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -32,7 +32,7 @@ ## Overview -> **This document is currently a WORK-IN-PROGRESS** +> **Please treat this content as a living document.** This is document explains who the maintainers are (see below), what they do in this repo, and how they should be doing it. If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md). diff --git a/docs/roadmap.md b/docs/roadmap.md index 00dc6e82dc0..bbc362f8561 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -2,7 +2,8 @@ ???+ info "We are currently paused for new features [until end of July 2022](https://github.com/awslabs/aws-lambda-powertools-python/issues/1009){target="_blank"}." -This is our public roadmap that outlines the high level direction we are working towards, namely [Themes](#themes). We update this document on a periodic basis to reflect any changing priorities - Security and stability is our top priority. +This is our public roadmap that outlines the high level direction we are working towards, namely [Themes](#themes). We update this document when our priorities change: security and stability is our top priority. + [See our latest list of activities Β»](https://github.com/orgs/awslabs/projects/51/views/1?query=is%3Aopen+sort%3Aupdated-desc){target="_blank"} @@ -70,18 +71,18 @@ graph LR Our end-to-end mechanism follows four major steps: -* **Feature Request**. Ideas start with a [feature request issue template](https://github.com/awslabs/aws-lambda-powertools-python/issues/new?assignees=&labels=feature-request%2Ctriage&template=feature_request.yml&title=Feature+request%3A+TITLE){target="_blank"} to highlight their use case at a high level. Maintainers review each request based on the **(1)** [project tenets](index.md#tenets){target="_blank"}, **(2)** customers reaction (πŸ‘) and use cases, and comment whether we'll need a RFC for further discussion before any work begins. +* **Feature Request**. Ideas start with a [feature request issue template](https://github.com/awslabs/aws-lambda-powertools-python/issues/new?assignees=&labels=feature-request%2Ctriage&template=feature_request.yml&title=Feature+request%3A+TITLE){target="_blank"} to highlight their use case at a high level. Maintainers review each request based on **(1)** [project tenets](index.md#tenets){target="_blank"}, **(2)** customers reaction (πŸ‘) and use cases, and comment whether we'll need a RFC for further discussion before any work begins. * **Request-for-comments (RFC)**. Design proposals use our [RFC issue template](https://github.com/awslabs/aws-lambda-powertools-python/issues/new?assignees=&labels=RFC%2Ctriage&template=rfc.yml&title=RFC%3A+TITLE){target="_blank"} to describe its implementation, challenges, developer experience, dependencies, and alternative solutions. This helps refine the initial idea with community feedback before a decision is made. * **Decision**. After carefully reviewing and discussing them, maintainers make a final decision on whether to start implementation, defer or reject it, and update everyone with the next steps. -* **Implementation**. For approved features, maintainers will build a prototype and invite customers for feedback in the original request. Alternatively, maintainers will proactively use the [help wanted](https://github.com/awslabs/aws-lambda-powertools-python/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22){target="_blank"} tag to signal contributions are welcome to accelerate development. -* **Implementation**. For approved features, maintainers will build a prototype for early feedback, or use [`help wanted`](https://github.com/awslabs/aws-lambda-powertools-python/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22){target="_blank"} label welcoming contributions to accelerate development. - -???+ info "Bug reports, documentation improvements, etc. are not covered by this process. See Maintainers process instead (coming soon)." +* **Implementation**. For approved features, maintainers give priority to the original authors for implementation unless it is a sensitive task that is best handled by maintainers. +???+ info "See [Maintainers](https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/MAINTAINERS.md) document to understand how we triage issues and pull requests, labels and governance." ## Disclaimer -The AWS Lambda Powertools team values feedback and guidance from its community of users, although final decisions on inclusion into the project will be made by AWS. We determine the high-level direction for our open roadmap based on customer feedback and popularity (πŸ‘πŸ½ and comments), security and operational impacts, and business value. Where features don’t meet our goals and longer-term strategy, we will communicate that clearly and openly as quickly as possible with an explanation of why the decision was made. +The AWS Lambda Powertools team values feedback and guidance from its community of users, although final decisions on inclusion into the project will be made by AWS. + +We determine the high-level direction for our open roadmap based on customer feedback and popularity (πŸ‘πŸ½ and comments), security and operational impacts, and business value. Where features don’t meet our goals and longer-term strategy, we will communicate that clearly and openly as quickly as possible with an explanation of why the decision was made. ## FAQs From f62d07ac76ad3597c88600f07a13cf33eb6d2434 Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Thu, 2 Jun 2022 15:36:22 +0200 Subject: [PATCH 5/7] docs(roadmap): use pinned pause issue instead --- docs/roadmap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/roadmap.md b/docs/roadmap.md index bbc362f8561..231a63927ec 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1,6 +1,6 @@ ## Overview -???+ info "We are currently paused for new features [until end of July 2022](https://github.com/awslabs/aws-lambda-powertools-python/issues/1009){target="_blank"}." +???+ info "We are currently paused for new features [until end of July 2022](https://github.com/awslabs/aws-lambda-powertools-python/issues/1076){target="_blank"}." This is our public roadmap that outlines the high level direction we are working towards, namely [Themes](#themes). We update this document when our priorities change: security and stability is our top priority. From f4fdcbae2d55c8267c2b1c5d7435ecb77d993141 Mon Sep 17 00:00:00 2001 From: Heitor Lessa Date: Tue, 7 Jun 2022 16:41:36 +0200 Subject: [PATCH 6/7] fix(metrics): raise SchemaValidationError for >8 metric dimensions (#1240) --- aws_lambda_powertools/metrics/base.py | 3 ++- docs/core/metrics.md | 10 +++++----- tests/functional/test_metrics.py | 6 ++++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/aws_lambda_powertools/metrics/base.py b/aws_lambda_powertools/metrics/base.py index 48a6f019e40..fde191a8d94 100644 --- a/aws_lambda_powertools/metrics/base.py +++ b/aws_lambda_powertools/metrics/base.py @@ -178,7 +178,8 @@ def serialize_metric_set( metadata = self.metadata_set if self.service and not self.dimension_set.get("service"): - self.dimension_set["service"] = self.service + # self.service won't be a float + self.add_dimension(name="service", value=self.service) # type: ignore[arg-type] if len(metrics) == 0: raise SchemaValidationError("Must contain at least one metric.") diff --git a/docs/core/metrics.md b/docs/core/metrics.md index 99ee17106b3..713ae874fe6 100644 --- a/docs/core/metrics.md +++ b/docs/core/metrics.md @@ -30,10 +30,10 @@ If you're new to Amazon CloudWatch, there are two terminologies you must be awar Metric has two global settings that will be used across all metrics emitted: -Setting | Description | Environment variable | Constructor parameter -------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- -**Metric namespace** | Logical container where all metrics will be placed e.g. `ServerlessAirline` | `POWERTOOLS_METRICS_NAMESPACE` | `namespace` -**Service** | Optionally, sets **service** metric dimension across all metrics e.g. `payment` | `POWERTOOLS_SERVICE_NAME` | `service` +| Setting | Description | Environment variable | Constructor parameter | +| -------------------- | ------------------------------------------------------------------------------- | ------------------------------ | --------------------- | +| **Metric namespace** | Logical container where all metrics will be placed e.g. `ServerlessAirline` | `POWERTOOLS_METRICS_NAMESPACE` | `namespace` | +| **Service** | Optionally, sets **service** metric dimension across all metrics e.g. `payment` | `POWERTOOLS_SERVICE_NAME` | `service` | ???+ tip Use your application or main service as the metric namespace to easily group all metrics. @@ -191,7 +191,7 @@ This decorator also **validates**, **serializes**, and **flushes** all your metr ???+ tip "Tip: Metric validation" If metrics are provided, and any of the following criteria are not met, **`SchemaValidationError`** exception will be raised: - * Maximum of 9 dimensions + * Maximum of 8 user-defined dimensions * Namespace is set, and no more than one * Metric units must be [supported by CloudWatch](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html) diff --git a/tests/functional/test_metrics.py b/tests/functional/test_metrics.py index 4a5df151dd1..4dbefd34603 100644 --- a/tests/functional/test_metrics.py +++ b/tests/functional/test_metrics.py @@ -319,9 +319,11 @@ def test_schema_no_metrics(service, namespace): my_metrics.serialize_metric_set() -def test_exceed_number_of_dimensions(metric, namespace): +def test_exceed_number_of_dimensions(metric, namespace, monkeypatch): # GIVEN we we have more dimensions than CloudWatch supports - dimensions = [{"name": f"test_{i}", "value": "test"} for i in range(11)] + # and that service dimension is injected like a user-defined dimension (N+1) + monkeypatch.setenv("POWERTOOLS_SERVICE_NAME", "test_service") + dimensions = [{"name": f"test_{i}", "value": "test"} for i in range(9)] # WHEN we attempt to serialize them into a valid EMF object # THEN it should fail validation and raise SchemaValidationError From 9d8dd1b71a771be6c8a30a90a0dd855f02e0d758 Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Tue, 7 Jun 2022 16:44:07 +0200 Subject: [PATCH 7/7] chore: bump version 1.26.1 --- CHANGELOG.md | 17 +++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f8205e2526..03f7ad2919f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file. This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format for changes and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.26.1 - 2022-06-07 +### Bug Fixes + +* **metrics:** raise SchemaValidationError for >8 metric dimensions ([#1240](https://github.com/awslabs/aws-lambda-powertools-python/issues/1240)) + +### Documentation + +* **governance:** link roadmap and maintainers doc +* **maintainers:** initial maintainers playbook ([#1222](https://github.com/awslabs/aws-lambda-powertools-python/issues/1222)) +* **roadmap:** use pinned pause issue instead + +### Maintenance + +* **deps-dev:** bump mypy from 0.950 to 0.960 ([#1224](https://github.com/awslabs/aws-lambda-powertools-python/issues/1224)) +* **deps-dev:** bump mypy-boto3-secretsmanager from 1.23.0.post1 to 1.23.8 ([#1225](https://github.com/awslabs/aws-lambda-powertools-python/issues/1225)) + + ## 1.26.0 - 2022-05-20 ### Bug Fixes diff --git a/pyproject.toml b/pyproject.toml index 4ed3dae87b7..9eeedcd63c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "aws_lambda_powertools" -version = "1.26.0" +version = "1.26.1" description = "A suite of utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, batching, idempotency, feature flags, and more." authors = ["Amazon Web Services"] include = ["aws_lambda_powertools/py.typed", "THIRD-PARTY-LICENSES"]