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

refactor: create function for repeating logic #249

Merged
merged 5 commits into from
May 14, 2024
Merged

Conversation

necipallef
Copy link
Contributor

No description provided.

Orkuncakilkaya
Orkuncakilkaya previously approved these changes May 13, 2024
Copy link
Contributor

github-actions bot commented May 13, 2024

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
93.36% (+0.34% 🔼)
647/693
🟢 Branches
86.71% (+4.78% 🔼)
150/173
🟢 Functions
92.48% (+2.55% 🔼)
123/133
🟢 Lines
93.59% (+0.39% 🔼)
613/655
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / cloudfrontUtils.ts
100% 88.89% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / updateHandler.ts
87.22% (-1.75% 🔻)
75.86% (-0.61% 🔻)
87.5% (-6.25% 🔻)
87.12% (-1.34% 🔻)

Test suite run success

169 tests passing in 18 suites.

Report generated by 🧪jest coverage report action from 430c5d4

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟢 All files 93.36 86.7 92.48 93.58
🟢  mgmt-lambda 98.93 93.33 100 98.93
🟢   DefaultSettings.ts 100 100 100 100
🟢   app.ts 97.91 95 100 97.91 26
🟢   auth.ts 100 100 100 100
🟢   exceptions.ts 100 66.66 100 100 20
🟢   routing.ts 100 100 100 100
🟢  mgmt-lambda/handlers 87.22 72.5 93.33 87.15
🟢   errorHandlers.ts 100 71.42 100 100 22,41
🟡   statusHandler.ts 80 50 100 80 76-80,84-89
🟢   updateHandler.ts 87.21 75.86 87.5 87.12 50-51,67-68,139-142,214,219-228,290-291,319
🟢  mgmt-lambda/utils 81.25 88.88 66.66 100
🟢   cloudfrontUtils.ts 100 88.88 100 100 6
🔴   delay.ts 40 100 0 100
🟢  proxy/handlers 87.77 86.36 90.32 88.5
🟢   handleAgentDowloading.ts 96.29 66.66 100 96.15 31
🟡   handleResult.ts 76.19 100 76.92 77.5 88-103
🟢   handleStatus.ts 100 100 100 100
🟡  proxy/test 77.77 100 50 71.42
🟡   aws.ts 77.77 100 50 71.42 4-5
🟢  proxy/test/utils/customer-variables 100 100 100 100
🟢   in-memory-customer-variables.ts 100 100 100 100
🟢  proxy/utils 98.11 85.71 97.05 97.94
🟢   buffer.ts 100 100 100 100
🟢   cache-control.ts 100 100 100 100
🟢   cookie.ts 100 100 100 100
🟢   headers.ts 100 100 100 100
🔴   is-blob.ts 0 0 0 0 6-7
🟢   log.ts 85.71 33.33 100 83.33 11
🟢   request.ts 100 100 100 100
🟢   routing.ts 100 100 100 100
🟢   traffic.ts 100 100 100 100
🟢  proxy/utils/customer-variables 100 100 100 100
🟢   customer-variables.ts 100 100 100 100
🟢   defaults.ts 100 100 100 100
🟢   header-customer-variables.ts 100 100 100 100
🟢   maybe-obfuscate-variable.ts 100 100 100 100
🟢   selectors.ts 100 100 100 100
🟢   types.ts 100 100 100 100
🟢  proxy/utils/customer-variables/secrets-manager 95.58 100 100 95.52
🟢   normalize-secret.ts 100 100 100 100
🟢   retrieve-secret.ts 100 100 100 100
🟢   secrets-manager-variables.ts 86.95 100 100 86.95 28,50-55
🟢   validate-secret.ts 100 100 100 100

Copy link
Contributor

This PR will create a major release 🚀

2.0.0 (2024-05-14)

⚠ BREAKING CHANGES

  • use node 20

Features

  • add ability to override API hosts in AWS Secret (11af4c4)
  • add endpoints structure and error handlers (c473539)
  • add event and ctx types (82c053b)
  • add lambda function update (38b445f)
  • add settings secret, update mgmt lambda permissions (#162) (ab3caa5)
  • check CodeSha256 before upgrading consequent resources (7fdbd21)
  • check version's state after Lambda@Edge function upgrade (12e5aad)
  • do not throw error if the secret manager has unexpected key (c6e3078)
  • improve error handling in mgmt-lambda (3736d14)
  • increase timeout for Fingerprint lambda (1e0ae54)
  • introduce deployment settings (ec13d5f)
  • introduce mgmt-token scheme for authorization (#176) (c884027)
  • mgmt-lambda-update: introduce error codes (6929756)
  • pass AWS clients into handlers (1aa3dc8)
  • remove fpjs_behavior_path variable (4c78f62)
  • rework logging (#184) (a88941c)
  • reworked getting env, updated tests (0b29764)
  • rollout as a code (#161) (0636c1a)
  • status endpoint: return necessary information about Lambda and CloudFront (2f3ceed)
  • update all cache behavior that has fingerprint pro association (#186) (2970364)
  • update lambda existence check (403680c)
  • update package management (#189) (5135b1b)
  • update secrets manager to V3, retrieve secret in mgmt-lambda (a60bee4)
  • upgrade Lambda functions runtime to Node 20 (2818c30)
  • use AWS SDK v3 Client mock for testing (0bb22ce)
  • use revisionId for Lambda code deployment (934dd37)

Bug Fixes

  • agent download reqs did not keep custom queries (e9ee3c4)
  • agent download request headers (b2dcb89)
  • browser cache req headers (4569f5e)
  • cache behavior origin matching logic (7b1ff11)
  • check set log level if true (15d9d53)
  • cloudformation templatex (#188) (a32e4ff)
  • cloudfront update logic add attempt (106b332)
  • don't set code 500 in status endpoint responses (b4a4d04)
  • handle requests with trailing and leading slashes in URI (cabe27a)
  • mgmt lambda counter bug (dbd4642)
  • normalize secret before retrieving values (26ab35f)
  • remove aws-sdk v2 usage (b1d0d72)
  • remove CodePipeline client (ed7d52d)
  • remove CodePipeline part from mgmt code (fb79578)
  • remove FPJS_DEBUG header from the template (e58d6cd)
  • set correct type for public URL events (379ec65)
  • set log level (a02fbf9)
  • treat request.uri as the path, not the URL (131f2b7)
  • update handleResult tests with comparing hrefs (aeb49c8)
  • update logging (07664bc)
  • use default region for getting secret (ec596ec)

Documentation

  • README: fix typo (cac192c)
  • README: update links to v2, add deprecation notice (caa5cfa)

@necipallef necipallef merged commit 708b4b3 into rc May 14, 2024
8 of 9 checks passed
@necipallef necipallef deleted the refactor/mgmt_lambda branch May 14, 2024 10:36
@fingerprint-dx-team
Copy link
Contributor

🎉 This PR is included in version 2.0.0-rc.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants