Skip to content

Commit

Permalink
Enable logging on the L3 CDK construct (#2814)
Browse files Browse the repository at this point in the history
* log config

* add: logConfig main logic

* add: test for logConfig

* update: API.md

* update: clean up code, update docs, add test, add reimport and reexport

* update: redefine LogConfig

* update: docs and export Logging

* update: docs

* Update packages/amplify-graphql-api-construct/src/types.ts

Co-authored-by: Tim Schmelter <[email protected]>

* Update packages/amplify-graphql-api-construct/src/types.ts

Co-authored-by: Tim Schmelter <[email protected]>

* Update packages/amplify-graphql-api-construct/src/types.ts

Co-authored-by: Tim Schmelter <[email protected]>

* update: docs and specify default values

* chore: prettier

* break circular dependency in setupLogConfig with scoped down policy (#2938)

* add: code that creates circular dependency

* add: create standalone policy and attach it to break dependency cycle

* update: comments

* remove ampliy owned log group logic, keep to appsync owned log group with managed policy

* added retention day logic, merged main

* finalized PR, extracted api and dependency licenses

* added e2e tests for log config

* chore for PR

* added e2e to workflow

* replicate unit tests in transformer-core

* dropped api-construct package coverage from 90 to 89.5

* updated dependency licenses

* removed redundent import

* fix: linting errors

* chore: resolved comments

* Update packages/amplify-graphql-api-construct-tests/src/__tests__/log-config.test.ts

Co-authored-by: Peter V. <[email protected]>

* fix: addressed comments

* chore: prettier

* fix: use SDK v3 for verifyLogConfig

* merged main

* fix: verifyLogsWithRequestId before verifyLogConfig

* chore: lint, extract-api

* debug: added log statement for region

* fix: specify the region for client

* chore: standardize sdk version to 3.624.0

* fix: change abort-controller version

* fix: streamlined e2e and unit tests

* chore: lint

---------

Co-authored-by: Tim Schmelter <[email protected]>
Co-authored-by: Peter V. <[email protected]>
  • Loading branch information
3 people authored Nov 22, 2024
1 parent a6e994d commit 32d3854
Show file tree
Hide file tree
Showing 26 changed files with 1,621 additions and 73 deletions.
24 changes: 12 additions & 12 deletions codebuild_specs/e2e_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -755,73 +755,73 @@ batch:
CLI_REGION: ap-northeast-2
depend-on:
- publish_to_local_registry
- identifier: utils_ddb_iam_access_data_construct_custom_logic_amplify_table_5
- identifier: utils_log_config_ddb_iam_access_data_construct_custom_logic
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
NODE_OPTIONS: '--max-old-space-size=14848'
TEST_SUITE: >-
src/__tests__/utils.test.ts|src/__tests__/ddb-iam-access.test.ts|src/__tests__/data-construct.test.ts|src/__tests__/custom-logic.test.ts|src/__tests__/amplify-table-5.test.ts
src/__tests__/utils.test.ts|src/__tests__/log-config.test.ts|src/__tests__/ddb-iam-access.test.ts|src/__tests__/data-construct.test.ts|src/__tests__/custom-logic.test.ts
CLI_REGION: eu-west-2
depend-on:
- publish_to_local_registry
- identifier: >-
add_resources_references_migration_migration_validation_many_to_many_migration_base_migration
amplify_table_5_add_resources_references_migration_migration_validation_many_to_many_migration
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
NODE_OPTIONS: '--max-old-space-size=14848'
TEST_SUITE: >-
src/__tests__/add-resources.test.ts|src/__tests__/migration/references-migration.test.ts|src/__tests__/migration/migration-validation.test.ts|src/__tests__/migration/many-to-many-migration.test.ts|src/__tests__/migration/base-migration.test.ts
src/__tests__/amplify-table-5.test.ts|src/__tests__/add-resources.test.ts|src/__tests__/migration/references-migration.test.ts|src/__tests__/migration/migration-validation.test.ts|src/__tests__/migration/many-to-many-migration.test.ts
CLI_REGION: ap-southeast-1
depend-on:
- publish_to_local_registry
- identifier: >-
single_gsi_single_record_single_gsi_empty_table_single_gsi_1k_records_single_gsi_10k_records_replace_2_gsis_update_attr_single_
base_migration_single_gsi_single_record_single_gsi_empty_table_single_gsi_1k_records_single_gsi_10k_records
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
NODE_OPTIONS: '--max-old-space-size=14848'
TEST_SUITE: >-
src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-single-record.test.ts
src/__tests__/migration/base-migration.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-10k-records.test.ts
CLI_REGION: ap-northeast-3
depend-on:
- publish_to_local_registry
- identifier: >-
replace_2_gsis_update_attr_empty_table_replace_2_gsis_update_attr_1k_records_replace_2_gsis_update_attr_10k_records_replace_2_g
replace_2_gsis_update_attr_single_record_replace_2_gsis_update_attr_empty_table_replace_2_gsis_update_attr_1k_records_replace_2
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
NODE_OPTIONS: '--max-old-space-size=14848'
TEST_SUITE: >-
src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-empty-table.test.ts
src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-single-record.test.ts
CLI_REGION: ap-south-1
depend-on:
- publish_to_local_registry
- identifier: >-
replace_2_gsis_1k_records_replace_2_gsis_10k_records_3_gsis_single_record_3_gsis_empty_table_3_gsis_1k_records
replace_2_gsis_empty_table_replace_2_gsis_1k_records_replace_2_gsis_10k_records_3_gsis_single_record_3_gsis_empty_table
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
NODE_OPTIONS: '--max-old-space-size=14848'
TEST_SUITE: >-
src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-1k-records.test.ts
src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-empty-table.test.ts
CLI_REGION: ap-southeast-1
depend-on:
- publish_to_local_registry
- identifier: 3_gsis_10k_records
- identifier: 3_gsis_1k_records_3_gsis_10k_records
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
NODE_OPTIONS: '--max-old-space-size=14848'
TEST_SUITE: >-
src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-10k-records.test.ts
src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-10k-records.test.ts
CLI_REGION: ap-southeast-2
depend-on:
- publish_to_local_registry
Expand Down
Loading

0 comments on commit 32d3854

Please sign in to comment.