Skip to content

chore(deps-dev): bump mike from 0.6.0 to 1.1.2 #95

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 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
666f2e2
chore(deps-dev): bump mypy-boto3-ssm from 1.24.39.post2 to 1.24.69 (#…
dependabot[bot] Sep 9, 2022
d20fc60
chore(deps-dev): bump mike from 0.6.0 to 1.1.2
dependabot[bot] Sep 9, 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
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;
}
}
}
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 "[email protected]"
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
71 changes: 0 additions & 71 deletions .github/workflows/python_docs.yml

This file was deleted.

Loading