Skip to content
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

feat (build): Add package size check in PR workflow #878

Merged
merged 93 commits into from
Jun 20, 2022
Merged

Conversation

flochaz
Copy link
Contributor

@flochaz flochaz commented May 16, 2022

Description of your changes

Add package size check in PR workflow

This first version will 1 comments per package (tracer, logger, metrics) displaying this kind of info:

📊 Package size report   104%↑

File Before After
aws-lambda-powertools-commons-0.9.1.tgz 6.5 kB 1%↑6.5 kB
aws-lambda-powertools-logger-0.9.1.tgz 22.0 kB 0.2%↑22.1 kB
aws-lambda-powertools-metrics-0.9.1.tgz 17.6 kB 0.3%↑17.6 kB
aws-lambda-powertools-tracer-0.9.1.tgz 21.1 kB 0.2%↑21.2 kB
commons-uber.zip 7.1 kB
logger-uber.zip 22.6 kB
metrics-uber.zip 18.1 kB
tracer-uber.zip 21.7 kB
Total (Includes all files) 67.1 kB 104%↑136.8 kB
Tarball size 67.4 kB 101%↑135.7 kB

🤖 This report was automatically generated by [pkg-size-action](https://github.com/flochaz/pkg-size-action/(options hash: 09e6f6f389c0a5504aab91fb5fb0a73f)

This is done through a customization of https://github.com/pkg-size/action.

How to verify this change

Check the comment on this PR: #878 (comment)

Related issues, RFCs

#398

PR status

Is this ready for review?: NO
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the examples
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published in downstream module
  • The PR title follows the conventional commit semantics

Breaking change checklist

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@flochaz flochaz force-pushed the flochaz-patch-1 branch from aae3e52 to 3a1538b Compare May 16, 2022 10:37
@github-actions
Copy link
Contributor

📊 Package size report   No changes

File Before After
Total (Includes all files) 17.5 kB 17.5 kB
Tarball size 17.7 kB 17.7 kB
Unchanged files
File Size
aws-lambda-powertools-metrics-0.9.0.tgz 17.5 kB

🤖 This report was automatically generated by pkg-size-action
(options hash: 99a4b54ca220f161245a3e4790106ffc)

@github-actions
Copy link
Contributor

📊 Package size report   No changes

File Before After
Total (Includes all files) 21.1 kB 21.1 kB
Tarball size 21.3 kB 21.3 kB
Unchanged files
File Size
aws-lambda-powertools-tracer-0.9.0.tgz 21.1 kB

🤖 This report was automatically generated by pkg-size-action
(options hash: a5ebc13e0c555f23fee970d6a3cdbf61)

@github-actions
Copy link
Contributor

📊 Package size report   No changes

File Before After
Total (Includes all files) 21.7 kB 21.7 kB
Tarball size 21.9 kB 0%↑21.9 kB
Unchanged files
File Size
aws-lambda-powertools-logger-0.9.0.tgz 21.7 kB

🤖 This report was automatically generated by pkg-size-action
(options hash: c8565984d7f60e8961d897186e69925f)

@aws-powertools aws-powertools deleted a comment from github-actions bot May 16, 2022
@aws-powertools aws-powertools deleted a comment from github-actions bot May 16, 2022
@aws-powertools aws-powertools deleted a comment from github-actions bot May 16, 2022
@flochaz flochaz marked this pull request as ready for review May 16, 2022 12:25
@dreamorosi dreamorosi added the internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) label May 23, 2022
@saragerion
Copy link
Contributor

Hi Florian, from a DX perspective is there a way to customize the way the comment looks?
Opportunity for improvement:

  • 1 comment for all utilities before/after, each with a distinct table.
  • Display the utility type as heading on top of the table, not hidden as detail
  • Highlight with colors or emojis when there is an increase, a decrease or it's the same size

Looking at these examples

@saragerion saragerion linked an issue May 24, 2022 that may be closed by this pull request
5 tasks
Dmitry Balabanov and others added 22 commits June 3, 2022 15:14
* fix(logger): enable logging of arbitrary objects

* Update docs

* Add E2E test

* Use nested objects in tests

* Update usage docs
* feat: added node16 to e2e test

* Added runtime to e2eUtils

* feat: added node16 to e2e test

* chore: added runtime key

* chore: update occurrences of nodejs14x

* test sam version

* test sam version

* revert

* sam

* sam

* sam

* sam

* chore: added .nvmrc

* chore: updated cdk example runtime

* Update packages/metrics/tests/e2e/basicFeatures.decorators.test.ts

Co-authored-by: Florian Chazal <florianchazal@gmail.com>

Co-authored-by: Florian Chazal <florianchazal@gmail.com>
* chore: updated contributing & docs with SAM

* chore: updated contributing & docs with SAM

* chore: updated contributing & docs with SAM

* chore: updated contributing & docs with SAM

* chore: updated contributing & docs with SAM

* chore: updated contributing & docs with SAM

* chore: add sam to gitpod

* chore: updated gitpod.yml

* chore: updated gitpod.yml

* chore: updated gitpod.yml

* Update CONTRIBUTING.md

Co-authored-by: ijemmy <ijemmy@users.noreply.github.com>

* Update .devcontainer/devcontainer.json

Co-authored-by: Florian Chazal <florianchazal@gmail.com>

Co-authored-by: ijemmy <ijemmy@users.noreply.github.com>
Co-authored-by: Florian Chazal <florianchazal@gmail.com>
…d by tools such as node-prune (#882)

* rename commons sub folder from tests to samples

* update doc

Co-authored-by: Florian Chazal <chazalf@amazon.com>
Bumps [axios](https://github.com/axios/axios) from 0.27.1 to 0.27.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](axios/axios@v0.27.1...v0.27.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.25.0 to 5.26.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.26.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 17.0.0 to 17.0.1.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v17.0.1/@commitlint/cli)

---
updated-dependencies:
- dependency-name: "@commitlint/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#918)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.25.0 to 5.26.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.26.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint](https://github.com/eslint/eslint) from 8.15.0 to 8.16.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.15.0...v8.16.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.7.0 to 10.8.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](TypeStrong/ts-node@v10.7.0...v10.8.0)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.14.39 to 0.14.40.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.14.39...v0.14.40)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/lodash.clonedeep](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash.clonedeep) from 4.5.6 to 4.5.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash.clonedeep)

---
updated-dependencies:
- dependency-name: "@types/lodash.clonedeep"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/lodash.pickby](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash.pickby) from 4.6.6 to 4.6.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash.pickby)

---
updated-dependencies:
- dependency-name: "@types/lodash.pickby"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-cdk-lib](https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib) from 2.24.1 to 2.25.0.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/v2.25.0/CHANGELOG.v2.md)
- [Commits](https://github.com/aws/aws-cdk/commits/v2.25.0/packages/aws-cdk-lib)

---
updated-dependencies:
- dependency-name: aws-cdk-lib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [cdk-assets](https://github.com/aws/aws-cdk/tree/HEAD/packages/cdk-assets) from 2.24.1 to 2.25.0.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/v2.25.0/CHANGELOG.v2.md)
- [Commits](https://github.com/aws/aws-cdk/commits/v2.25.0/packages/cdk-assets)

---
updated-dependencies:
- dependency-name: cdk-assets
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…5.0 (#911)

Bumps [@aws-cdk/cloudformation-diff](https://github.com/aws/aws-cdk/tree/HEAD/packages/@aws-cdk/cloudformation-diff) from 2.24.1 to 2.25.0.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/v2.25.0/CHANGELOG.v2.md)
- [Commits](https://github.com/aws/aws-cdk/commits/v2.25.0/packages/@aws-cdk/cloudformation-diff)

---
updated-dependencies:
- dependency-name: "@aws-cdk/cloudformation-diff"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@aws-cdk/cx-api](https://github.com/aws/aws-cdk/tree/HEAD/packages/@aws-cdk/cx-api) from 2.24.1 to 2.25.0.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/v2.25.0/CHANGELOG.v2.md)
- [Commits](https://github.com/aws/aws-cdk/commits/v2.25.0/packages/@aws-cdk/cx-api)

---
updated-dependencies:
- dependency-name: "@aws-cdk/cx-api"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [constructs](https://github.com/aws/constructs) from 10.1.12 to 10.1.19.
- [Release notes](https://github.com/aws/constructs/releases)
- [Commits](aws/constructs@v10.1.12...v10.1.19)

---
updated-dependencies:
- dependency-name: constructs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: add setup-local script

* feat(logger): add removeKeys functionality

* chore(logger): lint fix

* Update packages/logger/tests/unit/Logger.test.ts

Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com>

* Update packages/logger/tests/unit/Logger.test.ts

Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com>

* docs: added single command for local setup in contribuiting

* chore: fixed propriety typo

Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2022

📊 Package size report   104%↑

File Before After
aws-lambda-powertools-commons-0.10.0.tgz 6.4 kB 0.7%↑6.5 kB
aws-lambda-powertools-logger-0.10.0.tgz 22.2 kB 0.2%↑22.3 kB
aws-lambda-powertools-metrics-0.10.0.tgz 17.4 kB 0.2%↑17.5 kB
aws-lambda-powertools-tracer-0.10.0.tgz 21.4 kB 0.2%↑21.4 kB
commons-bundle.zip 7.0 kB
logger-bundle.zip 22.8 kB
metrics-bundle.zip 18.0 kB
tracer-bundle.zip 21.9 kB
Total (Includes all files) 67.5 kB 104%↑137.3 kB
Tarball size 67.7 kB 101%↑136.2 kB

🤖 This report was automatically generated by pkg-size-action
(options hash: b01a4b46311594a6cfb60eab755ae48c)

@dreamorosi dreamorosi merged commit c6622ad into main Jun 20, 2022
@dreamorosi dreamorosi deleted the flochaz-patch-1 branch June 20, 2022 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: code performance tests in CI/CD pipelines
4 participants