Skip to content

chore(deps): bump pydantic from 1.10.1 to 1.10.2 #288

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

Closed
wants to merge 55 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
fef70b0
docs(core): match code snippet name with filename (#1286)
heitorlessa Jul 8, 2022
d918387
fix(ci): accept core arg in label related issue workflow
heitorlessa Jul 8, 2022
13558d9
chore(ci): update changelog with latest changes
Aug 9, 2022
40ce509
docs(apigateway): removes duplicate admonition (#1426)
peterschutt Aug 9, 2022
5951ab0
chore(ci): update changelog with latest changes
Aug 9, 2022
6b23903
docs(parser): minor grammar fix (#1427)
peterschutt Aug 9, 2022
6380b63
chore(ci): update changelog with latest changes
Aug 9, 2022
8e24ae3
chore(ci): update changelog with latest changes
Aug 9, 2022
af99733
Merge branch 'develop' of https://github.com/ran-isenberg/aws-lambda-…
ran-isenberg Aug 11, 2022
becb38c
chore(ci): add linter for GitHub Actions as pre-commit hook (#1479)
heitorlessa Aug 25, 2022
ad29807
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa Aug 25, 2022
62a976f
chore(ci): add workflow to suggest splitting large PRs (#1480)
heitorlessa Aug 25, 2022
e184a8e
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa Aug 25, 2022
631c570
docs(layer): upgrade to 1.28.0 (v33)
heitorlessa Aug 26, 2022
937ed38
update changelog with latest changes
Aug 26, 2022
8a608c5
fix(ci): event resolution for on_label_added workflow
heitorlessa Aug 26, 2022
fef99e9
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa Aug 26, 2022
366b326
fix(ci): gracefully and successful exit changelog upon no changes
heitorlessa Aug 26, 2022
cae9557
update changelog with latest changes
Aug 26, 2022
06fb255
chore(ci): enable ci checks for v2
heitorlessa Aug 26, 2022
e473312
chore(deps-dev): bump mypy-boto3-dynamodb from 1.24.55.post1 to 1.24.…
dependabot[bot] Aug 26, 2022
c85d94d
chore(deps-dev): bump mypy-boto3-dynamodb from 1.24.55.post1 to 1.24.…
dependabot[bot] Aug 29, 2022
c962046
fix(ci): ensure PR_AUTHOR is present for large_pr_split workflow
heitorlessa Aug 29, 2022
6f8769d
feat(event_sources): add CloudWatch dashboard custom widget event (#1…
sthuber90 Aug 29, 2022
ee4b46a
update changelog with latest changes
Aug 29, 2022
fc791a1
fix(ci): on_label permissioning model & workflow execution
heitorlessa Aug 29, 2022
cd262b9
chore(ci): record pr details upon labeling
heitorlessa Aug 29, 2022
bca9695
chore(ci): destructure assignment on comment_large_pr
heitorlessa Aug 29, 2022
5a12125
fix(ci): pass core fns to large pr workflow script
heitorlessa Aug 29, 2022
74ec893
chore(ci): add note for state persistence on comment_large_pr
heitorlessa Aug 29, 2022
973dc46
chore(ci): format comment on comment_large_pr script
heitorlessa Aug 29, 2022
acd7af1
chore(ci): create reusable docs publishing workflow (#1482)
heitorlessa Aug 29, 2022
30708d5
chore(ci): create docs workflow for v2
heitorlessa Aug 29, 2022
1e9fadd
Merge branch 'develop' of https://github.com/heitorlessa/aws-lambda-p…
heitorlessa Aug 29, 2022
d09f6d7
chore(ci): create adhoc docs workflow for v2
heitorlessa Aug 29, 2022
fe78ae8
chore(ci): create adhoc docs workflow for v2
heitorlessa Aug 29, 2022
a832be8
chore(deps-dev): bump mkdocs-material from 8.4.1 to 8.4.2 (#1483)
dependabot[bot] Aug 30, 2022
2cf38cc
chore(ci): sync package version with pypi
heitorlessa Aug 30, 2022
c907140
feat(event_handler): improved support for headers and cookies in v2 (…
rubenfonseca Aug 29, 2022
e62b6cc
docs(homepage): note about v2 version
heitorlessa Aug 29, 2022
db4a594
fix(event_handler): fix bug with previous array implementation
rubenfonseca Aug 31, 2022
0678af2
chore(bandit): update baseline
rubenfonseca Aug 31, 2022
b5f4ad9
update changelog with latest changes
Aug 31, 2022
8e00fd9
chore(deps-dev): bump flake8-variables-names from 0.0.4 to 0.0.5 (#1490)
dependabot[bot] Sep 1, 2022
9eed782
chore(deps): bump pydantic from 1.10.0 to 1.10.1 (#1491)
dependabot[bot] Sep 1, 2022
30b8d71
refactor(batch): remove legacy sqs_batch_processor (#1492)
rubenfonseca Sep 1, 2022
0c52e28
update changelog with latest changes
Sep 1, 2022
ace020f
chore(maintenance): add discord link to first PR and first issue (#1493)
rubenfonseca Sep 1, 2022
a8ca8f3
chore(deps-dev): bump aws-cdk-lib from 2.39.1 to 2.40.0 (#1495)
dependabot[bot] Sep 1, 2022
d24c6c5
chore(deps-dev): bump black from 22.6.0 to 22.8.0 (#1494)
dependabot[bot] Sep 1, 2022
246738b
feat(event_handler): add cookies as 1st class citizen in v2 (#1487)
rubenfonseca Sep 2, 2022
522bae0
update changelog with latest changes
Sep 2, 2022
6c405fa
merge
Sep 4, 2022
f2a6c9b
update changelog with latest changes
Sep 4, 2022
e1fdb21
chore(deps): bump pydantic from 1.10.1 to 1.10.2
dependabot[bot] Sep 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ labelPRBasedOnFilePath:
firstPRWelcomeComment: >
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.

In the meantime, check out the #python channel on our AWS Lambda Powertools Discord: [Invite link](https://discord.gg/B8zZKbbyET)

# Comment to be posted to congratulate user on their first merged PR
firstPRMergeComment: >
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!
Expand All @@ -103,6 +105,8 @@ firstPRMergeComment: >
firstIssueWelcomeComment: >
Thanks for opening your first issue here! We'll come back to you as soon as we can.

In the meantime, check out the #python channel on our AWS Lambda Powertools Discord: [Invite link](https://discord.gg/B8zZKbbyET)

###### IssueLink Adder #################################################################################################
# Insert Issue (Jira/Github etc) link in PR description based on the Issue ID in PR title.
#insertIssueLinkInPrDescription:
Expand Down
73 changes: 73 additions & 0 deletions .github/scripts/comment_on_large_pr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
const {
PR_NUMBER,
PR_ACTION,
PR_AUTHOR,
IGNORE_AUTHORS,
} = require("./constants")


/**
* Notify PR author to split XXL PR in smaller chunks
*
* @param {object} core - core functions instance from @actions/core
* @param {object} gh_client - Pre-authenticated REST client (Octokit)
* @param {string} owner - GitHub Organization
* @param {string} repository - GitHub repository
*/
const notifyAuthor = async ({
core,
gh_client,
owner,
repository,
}) => {
core.info(`Commenting on PR ${PR_NUMBER}`)

let msg = `### ⚠️Large PR detected⚠️

Please consider breaking into smaller PRs to avoid significant review delays. Ignore if this PR has naturally grown to this size after reviews.
`;

try {
await gh_client.rest.issues.createComment({
owner: owner,
repo: repository,
body: msg,
issue_number: PR_NUMBER,
});
} catch (error) {
core.setFailed("Failed to notify PR author to split large PR");
console.error(err);
}
}

module.exports = async ({github, context, core}) => {
if (IGNORE_AUTHORS.includes(PR_AUTHOR)) {
return core.notice("Author in IGNORE_AUTHORS list; skipping...")
}

if (PR_ACTION != "labeled") {
return core.notice("Only run on PRs labeling actions; skipping")
}


/** @type {string[]} */
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: PR_NUMBER,
})

// Schema: https://docs.github.com/en/rest/issues/labels#list-labels-for-an-issue
for (const label of labels) {
core.info(`Label: ${label}`)
if (label.name == "size/XXL") {
await notifyAuthor({
core: core,
gh_client: github,
owner: context.repo.owner,
repository: context.repo.repo,
})
break;
}
}
}
66 changes: 21 additions & 45 deletions .github/scripts/label_related_issue.js
Original file line number Diff line number Diff line change
@@ -1,53 +1,29 @@
const {
PR_AUTHOR,
PR_BODY,
PR_NUMBER,
IGNORE_AUTHORS,
LABEL_PENDING_RELEASE,
HANDLE_MAINTAINERS_TEAM,
PR_IS_MERGED,
} = require("./constants")

module.exports = async ({github, context, core}) => {
if (IGNORE_AUTHORS.includes(PR_AUTHOR)) {
return core.notice("Author in IGNORE_AUTHORS list; skipping...")
}

if (PR_IS_MERGED == "false") {
return core.notice("Only merged PRs to avoid spam; skipping")
}
const prBody = context.payload.body;
const prNumber = context.payload.number;
const releaseLabel = process.env.RELEASE_LABEL;
const maintainersTeam = process.env.MAINTAINERS_TEAM

const RELATED_ISSUE_REGEX = /Issue number:[^\d\r\n]+(?<issue>\d+)/;

const isMatch = RELATED_ISSUE_REGEX.exec(PR_BODY);

try {
if (!isMatch) {
core.setFailed(`Unable to find related issue for PR number ${PR_NUMBER}.\n\n Body details: ${PR_BODY}`);
return await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
body: `${HANDLE_MAINTAINERS_TEAM} No related issues found. Please ensure '${LABEL_PENDING_RELEASE}' label is applied before releasing.`,
issue_number: PR_NUMBER,
});
}
} catch (error) {
core.setFailed(`Unable to create comment on PR number ${PR_NUMBER}.\n\n Error details: ${error}`);
throw new Error(error);
}

const { groups: {issue} } = isMatch

try {
core.info(`Auto-labeling related issue ${issue} for release`)
return await github.rest.issues.addLabels({
issue_number: issue,
const isMatch = RELATED_ISSUE_REGEX.exec(prBody);
if (!isMatch) {
core.setFailed(`Unable to find related issue for PR number ${prNumber}.\n\n Body details: ${prBody}`);
return await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
labels: [LABEL_PENDING_RELEASE]
})
} catch (error) {
core.setFailed(`Is this issue number (${issue}) valid? Perhaps a discussion?`);
throw new Error(error);
body: `${maintainersTeam} No related issues found. Please ensure '${releaseLabel}' label is applied before releasing.`,
issue_number: prNumber,
});
}

const { groups: {relatedIssueNumber} } = isMatch

core.info(`Auto-labeling related issue ${relatedIssueNumber} for release`)
return await github.rest.issues.addLabels({
issue_number: relatedIssueNumber,
owner: context.repo.owner,
repo: context.repo.repo,
labels: [releaseLabel]
})
}
30 changes: 15 additions & 15 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "CodeQL"

on:
push:
branches: [develop]
branches: [develop, v2]

jobs:
analyze:
Expand All @@ -14,23 +14,23 @@ jobs:
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['python']
language: ["python"]
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
38 changes: 38 additions & 0 deletions .github/workflows/on_label_added.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: On Label added

on:
workflow_run:
workflows: ["Record PR details"]
types:
- completed

jobs:
get_pr_details:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/reusable_export_pr_details.yml
with:
record_pr_workflow_id: ${{ github.event.workflow_run.id }}
workflow_origin: ${{ github.event.repository.full_name }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

split-large-pr:
needs: get_pr_details
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v3
# Maintenance: Persist state per PR as an artifact to avoid spam on label add
- name: "Suggest split large Pull Request"
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ needs.get_pr_details.outputs.prNumber }}
PR_ACTION: ${{ needs.get_pr_details.outputs.prAction }}
PR_AUTHOR: ${{ needs.get_pr_details.outputs.prAuthor }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const script = require('.github/scripts/comment_on_large_pr.js');
await script({github, context, core});
35 changes: 35 additions & 0 deletions .github/workflows/on_push_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Docs

on:
push:
branches:
- develop
paths:
- "docs/**"
- "mkdocs.yml"
- "examples/**"

jobs:
changelog:
permissions:
contents: write
uses: ./.github/workflows/reusable_publish_changelog.yml

release-docs:
needs: changelog
permissions:
contents: write
pages: write
uses: ./.github/workflows/reusable_publish_docs.yml
with:
version: develop
alias: stage
# Maintenance: Only necessary in repo migration
# - name: Create redirect from old docs
# run: |
# git checkout gh-pages
# test -f 404.html && echo "Redirect already set" && exit 0
# git checkout develop -- 404.html
# git add 404.html
# git commit -m "chore: set docs redirect" --no-verify
# git push origin gh-pages -f
54 changes: 9 additions & 45 deletions .github/workflows/on_release_notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ jobs:
id: release_version
# transform tag format `v<version` to `<version`
run: |
RELEASE_VERSION=${RELEASE_TAG_VERSION:1}
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
RELEASE_VERSION="${RELEASE_TAG_VERSION:1}"
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "$GITHUB_ENV"
echo "::set-output name=RELEASE_VERSION::${RELEASE_VERSION}"
- name: Install dependencies
run: make dev
- name: Run all tests, linting and baselines
if: ${{ !inputs.skip_code_quality }}
run: make pr
- name: Bump package version
run: poetry version ${RELEASE_VERSION}
run: poetry version "${RELEASE_VERSION}"
- name: Build python package and wheel
if: ${{ !inputs.skip_pypi }}
run: poetry build
Expand All @@ -101,7 +101,7 @@ jobs:
role-to-assume: ${{ secrets.AWS_SAR_ROLE_ARN }}
- name: publish lambda layer in SAR by triggering the internal codepipeline
run: |
aws ssm put-parameter --name "powertools-python-release-version" --value $RELEASE_VERSION --overwrite
aws ssm put-parameter --name "powertools-python-release-version" --value "$RELEASE_VERSION" --overwrite
aws codepipeline start-pipeline-execution --name ${{ secrets.AWS_SAR_PIPELINE_NAME }}

changelog:
Expand All @@ -115,47 +115,11 @@ jobs:
permissions:
contents: write
pages: write
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ needs.release.outputs.RELEASE_VERSION }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Git client setup and refresh tip
run: |
git config user.name "Release bot"
git config user.email "aws-devax-open-source@amazon.com"
git config pull.rebase true
git config remote.origin.url >&- || git remote add origin https://github.com/$origin # Git Detached mode (release notes) doesn't have origin
git pull origin $BRANCH
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: "poetry"
- name: Install dependencies
run: make dev
- name: Build docs website and API reference
run: |
make release-docs VERSION=${RELEASE_VERSION} ALIAS="latest"
poetry run mike set-default --push latest
- name: Release API docs to release version
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 # v3.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./api
keep_files: true
destination_dir: ${{ env.RELEASE_VERSION }}/api
- name: Release API docs to latest
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 # v3.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./api
keep_files: true
destination_dir: latest/api
uses: ./.github/workflows/reusable_publish_docs.yml
with:
version: ${{ needs.release.outputs.RELEASE_VERSION }}
alias: latest
detached_mode: true

post_release:
needs: release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- "mypy.ini"
branches:
- develop
- v2
push:
paths:
- "aws_lambda_powertools/**"
Expand All @@ -19,6 +20,7 @@ on:
- "mypy.ini"
branches:
- develop
- v2

jobs:
build:
Expand Down Expand Up @@ -54,7 +56,5 @@ jobs:
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # 3.1.0
with:
file: ./coverage.xml
# flags: unittests
env_vars: PYTHON
name: aws-lambda-powertools-python-codecov
# fail_ci_if_error: true # failing more consistently making CI unreliable despite all tests above passing
Loading