GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore(ci): migrate E2E tests to CDK CLI and off Docker (#1501) · duc00/powertools-lambda-python@e201bd2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • run-e2e-tests.yml
  • .gitignore
  • MAINTAINERS.md
  • aws_lambda_powertools/tracing
    • tracer.py
  • package-lock.json
  • package.json
  • parallel_run_e2e.py
  • poetry.lock
  • pyproject.toml
  • tests/e2e
    • conftest.py
    • event_handler
      • conftest.py
      • infrastructure.py
    • logger
      • conftest.py
      • infrastructure.py
    • metrics
      • conftest.py
      • infrastructure.py
    • tracer
      • conftest.py
      • handlers
        • async_capture.py
        • basic_handler.py
        • same_function_name.py
      • infrastructure.py
      • test_tracer.py
    • utils
      • Dockerfile
      • asset.py
      • base.py
      • constants.py
      • infrastructure.py
      • lambda_layer
        • __init__.py
        • base.py
        • powertools_layer.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/run-e2e-tests.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/run-e2e-tests.yml
+10-2Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
strategy:
2929
matrix:
3030
# Maintenance: disabled until we discover concurrency lock issue with multiple versions and tmp
31-
# version: ["3.7", "3.8", "3.9"]
32-
version: ["3.7"]
31+
version: ["3.7", "3.8", "3.9"]
32+
# version: ["3.7"]
3333
steps:
3434
- name: "Checkout"
3535
uses: actions/checkout@v3
@@ -41,6 +41,14 @@ jobs:
4141
python-version: ${{ matrix.version }}
4242
architecture: "x64"
4343
cache: "poetry"
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v3
46+
with:
47+
node-version: "16.12"
48+
- name: Install CDK CLI
49+
run: |
50+
npm install
51+
cdk --version
4452
- name: Install dependencies
4553
run: make dev
4654
- name: Configure AWS credentials
Collapse file

‎.gitignore‎

Copy file name to clipboardExpand all lines: .gitignore
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,3 +310,7 @@ site/
310310

311311
!.github/workflows/lib
312312
examples/**/sam/.aws-sam
313+
314+
cdk.out
315+
# NOTE: different accounts will be used for E2E thus creating unnecessary git clutter
316+
cdk.context.json
Collapse file

‎MAINTAINERS.md‎

Copy file name to clipboardExpand all lines: MAINTAINERS.md
+326-67Lines changed: 326 additions & 67 deletions
  • Display the source diff
  • Display the rich diff
Large diffs are not rendered by default.
Collapse file

‎aws_lambda_powertools/tracing/tracer.py‎

Copy file name to clipboardExpand all lines: aws_lambda_powertools/tracing/tracer.py
+13-12Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -300,16 +300,6 @@ def handler(event, context):
300300
@functools.wraps(lambda_handler)
301301
def decorate(event, context, **kwargs):
302302
with self.provider.in_subsegment(name=f"## {lambda_handler_name}") as subsegment:
303-
global is_cold_start
304-
logger.debug("Annotating cold start")
305-
subsegment.put_annotation(key="ColdStart", value=is_cold_start)
306-
307-
if is_cold_start:
308-
is_cold_start = False
309-
310-
if self.service:
311-
subsegment.put_annotation(key="Service", value=self.service)
312-
313303
try:
314304
logger.debug("Calling lambda handler")
315305
response = lambda_handler(event, context, **kwargs)
@@ -325,7 +315,18 @@ def decorate(event, context, **kwargs):
325315
self._add_full_exception_as_metadata(
326316
method_name=lambda_handler_name, error=err, subsegment=subsegment, capture_error=capture_error
327317
)
318+
328319
raise
320+
finally:
321+
global is_cold_start
322+
logger.debug("Annotating cold start")
323+
subsegment.put_annotation(key="ColdStart", value=is_cold_start)
324+
325+
if is_cold_start:
326+
is_cold_start = False
327+
328+
if self.service:
329+
subsegment.put_annotation(key="Service", value=self.service)
329330

330331
return response
331332

@@ -672,7 +673,7 @@ def _add_response_as_metadata(
672673
if data is None or not capture_response or subsegment is None:
673674
return
674675

675-
subsegment.put_metadata(key=f"{method_name} response", value=data, namespace=self._config["service"])
676+
subsegment.put_metadata(key=f"{method_name} response", value=data, namespace=self.service)
676677

677678
def _add_full_exception_as_metadata(
678679
self,
@@ -697,7 +698,7 @@ def _add_full_exception_as_metadata(
697698
if not capture_error:
698699
return
699700

700-
subsegment.put_metadata(key=f"{method_name} error", value=error, namespace=self._config["service"])
701+
subsegment.put_metadata(key=f"{method_name} error", value=error, namespace=self.service)
701702

702703
@staticmethod
703704
def _disable_tracer_provider():
Collapse file

‎package-lock.json‎

Copy file name to clipboardExpand all lines: package-lock.json
+58Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎package.json‎

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "aws-lambda-powertools-python-e2e",
3+
"version": "1.0.0",
4+
"devDependencies": {
5+
"aws-cdk": "2.40.0"
6+
}
7+
}
Collapse file

‎parallel_run_e2e.py‎

Copy file name to clipboardExpand all lines: parallel_run_e2e.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ def main():
88
workers = len(list(features)) - 1
99

1010
command = f"poetry run pytest -n {workers} --dist loadfile -o log_cli=true tests/e2e"
11-
print(f"Running E2E tests with: {command}")
1211
subprocess.run(command.split(), shell=False)
1312

1413

Collapse file

‎poetry.lock‎

Copy file name to clipboardExpand all lines: poetry.lock
+35-67Lines changed: 35 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎pyproject.toml‎

Copy file name to clipboardExpand all lines: pyproject.toml
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ xenon = "^0.9.0"
5050
flake8-eradicate = "^1.2.1"
5151
flake8-bugbear = "^22.9.23"
5252
mkdocs-git-revision-date-plugin = "^0.3.2"
53-
mike = "^0.6.0"
53+
mike = "^1.1.2"
5454
mypy = "^0.971"
5555
retry = "^0.9.2"
5656
pytest-xdist = "^2.5.0"
@@ -73,6 +73,7 @@ types-requests = "^2.28.11"
7373
typing-extensions = "^4.4.0"
7474
mkdocs-material = "^8.5.4"
7575
filelock = "^3.8.0"
76+
checksumdir = "^1.2.0"
7677

7778
[tool.poetry.extras]
7879
pydantic = ["pydantic", "email-validator"]

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.