Skip to content

test(common,logger,metrics): run e2e tests for metrics in both Node runtimes #678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 24, 2022

Conversation

ijemmy
Copy link
Contributor

@ijemmy ijemmy commented Mar 23, 2022

Description of your changes

Changes in this PR.

  • refactor metrics e2e tests to make stack and resource name unique (so that they can be run in parallel)
  • refactor metrics e2e tests to be consistent with logger and move common code to commons
  • run e2e tests on both Node12 and Node14 runtimes

How to verify this change

Run npm run lerna-test:e2e at the root.

Every test should pass and metrics tests should be on both node14 and node12

Related issues, RFCs

#497

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.

Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the PR, I like the direction you're giving to the integration tests. It'll make them much easier to maintain moving forward.

My only concern relates to exporting the e2e utilities in the commons package. This package is depended and bundled by all the other utilities and as such it will be included in the deployment package of each function that uses Powertools.

While I think there's definitely value in providing test utilities (see #445), I don't know if it should be in commons and in general, if it's code that should be deployed in Lambda.

What's your take?

@dreamorosi dreamorosi added metrics This item relates to the Metrics Utility internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) labels Mar 23, 2022
@dreamorosi dreamorosi added this to the production-ready-release milestone Mar 23, 2022
@ijemmy
Copy link
Contributor Author

ijemmy commented Mar 23, 2022

Thanks a lot for the PR, I like the direction you're giving to the integration tests. It'll make them much easier to maintain moving forward.

My only concern relates to exporting the e2e utilities in the commons package. This package is depended and bundled by all the other utilities and as such it will be included in the deployment package of each function that uses Powertools.

While I think there's definitely value in providing test utilities (see #445), I don't know if it should be in commons and in general, if it's code that should be deployed in Lambda.

What's your take?

I totally agree with you. We'll unnecessarily increase package size. I'll change this.
Found that I modify quite a few files with #676 . I'll wait until that one is merge first, resolve conflict, and change this.

@ijemmy ijemmy changed the title test(metrics): run e2e tests for both Node runtimes test(common,logger,metrics): run e2e tests for both Node runtimes Mar 23, 2022
@ijemmy ijemmy changed the title test(common,logger,metrics): run e2e tests for both Node runtimes test(common,logger,metrics): run e2e tests for metrics in both Node runtimes Mar 23, 2022
@ijemmy ijemmy requested review from dreamorosi and flochaz March 23, 2022 15:41
@ijemmy ijemmy marked this pull request as ready for review March 23, 2022 15:41
@ijemmy ijemmy dismissed flochaz’s stale review March 23, 2022 15:42

I've remove the module from the --group param.

@dreamorosi dreamorosi merged commit 652defc into main Mar 24, 2022
@dreamorosi dreamorosi deleted the ijemmy/parallel-metrics-e2e-tests branch March 24, 2022 08:25
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.) metrics This item relates to the Metrics Utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants