From e48df3c2d8cc09e10362799153c2221924394b1b Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 20 Dec 2024 11:44:56 -0700 Subject: [PATCH 1/6] shorten main from feature pr merge tests --- .github/actions/determine_workflow_config/action.yml | 2 +- .../test/end_to_end/http_server/large_files/test/auto_tests.ts | 3 ++- .../end_to_end/http_server/large_files/test/huge_file_tests.ts | 3 ++- .../end_to_end/http_server/large_files/test/manual_tests.ts | 3 ++- .../test/end_to_end/http_server/large_files/test/tests.ts | 3 ++- .../property/candid_rpc/canister_methods/update/test/test.ts | 3 ++- .../test/property/candid_rpc/recursive/test/test.ts | 3 ++- .../property/candid_rpc/canister_methods/update/test/test.ts | 3 ++- .../stable/test/property/candid_rpc/recursive/test/test.ts | 3 ++- examples/stable/test/property/candid_rpc/service/test/test.ts | 3 ++- examples/stable/test/property/ic_api/chunk/test/tests.ts | 3 ++- 11 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/actions/determine_workflow_config/action.yml b/.github/actions/determine_workflow_config/action.yml index aef7a6dd1a..204199781e 100644 --- a/.github/actions/determine_workflow_config/action.yml +++ b/.github/actions/determine_workflow_config/action.yml @@ -60,7 +60,7 @@ runs: echo "is-dependabot=false" >> $GITHUB_OUTPUT else EXCLUDE_SLOW=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' }} - EXCLUDE_UNSTABLE=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' }} + EXCLUDE_UNSTABLE=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push == 'true' }} EXCLUDE_RELEASE_ONLY=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push == 'true' }} echo "exclude-slow=$EXCLUDE_SLOW" >> $GITHUB_OUTPUT diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts index d0826c20af..3c96359db2 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts @@ -19,7 +19,8 @@ const autoGenAutoUploadSmallFileInfos: [number, Unit][] = [ const autoGenAutoUploadFileInfos: [number, Unit][] = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? autoGenAutoUploadSmallFileInfos : [ ...autoGenAutoUploadSmallFileInfos, diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts index 69fd05adc1..dbd0a63d08 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts @@ -11,7 +11,8 @@ const hugeAutoGenAutoUploadSmallFileInfos: [number, Unit][] = [[0, 'GiB']]; // T const hugeAutoGenAutoUploadFileInfos: [number, Unit][] = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? hugeAutoGenAutoUploadSmallFileInfos : [...hugeAutoGenAutoUploadSmallFileInfos, [2, 'GiB']]; // TODO add tests for 5GiB and maybe larger https://github.com/demergent-labs/azle/issues/2065 diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts index 45338313db..fdc2a62d86 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts @@ -10,7 +10,8 @@ import { getAutoGeneratedFileName, verifyUpload } from './tests'; export function manualTests(origin: string): Test { const manualFileSize = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? 7 : 150; const autoGenManualUploadFileInfos: [number, Unit][] = [ diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts index bfcd77a955..0a7d139f10 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts @@ -19,7 +19,8 @@ export function getTests(canisterId: string): Test { const origin = `http://${canisterId}.localhost:8000`; const describeLongTest = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? describe.skip : describe; diff --git a/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts b/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts index 677b82a281..2c9666e4c1 100644 --- a/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts +++ b/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts @@ -34,7 +34,8 @@ const HeterogeneousUpdateMethodArb = UpdateMethodArb( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/experimental/test/property/candid_rpc/recursive/test/test.ts b/examples/experimental/test/property/candid_rpc/recursive/test/test.ts index d3600b2a68..5cbbfa51c0 100644 --- a/examples/experimental/test/property/candid_rpc/recursive/test/test.ts +++ b/examples/experimental/test/property/candid_rpc/recursive/test/test.ts @@ -48,7 +48,8 @@ const AllRecursiveQueryMethodArb = fc.oneof( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts b/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts index 9a5903f302..73baa3b9a3 100644 --- a/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts +++ b/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts @@ -34,7 +34,8 @@ const HeterogeneousUpdateMethodArb = UpdateMethodArb( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/stable/test/property/candid_rpc/recursive/test/test.ts b/examples/stable/test/property/candid_rpc/recursive/test/test.ts index de7b7deabb..064795a815 100644 --- a/examples/stable/test/property/candid_rpc/recursive/test/test.ts +++ b/examples/stable/test/property/candid_rpc/recursive/test/test.ts @@ -48,7 +48,8 @@ const AllRecursiveQueryMethodArb = fc.oneof( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/stable/test/property/candid_rpc/service/test/test.ts b/examples/stable/test/property/candid_rpc/service/test/test.ts index 5aadc6d689..526555b1d4 100644 --- a/examples/stable/test/property/candid_rpc/service/test/test.ts +++ b/examples/stable/test/property/candid_rpc/service/test/test.ts @@ -35,7 +35,8 @@ const AllServicesQueryMethodArb = QueryMethodArb( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? shortArrayConstraints : { ...defaultArrayConstraints, diff --git a/examples/stable/test/property/ic_api/chunk/test/tests.ts b/examples/stable/test/property/ic_api/chunk/test/tests.ts index 7201886cd8..d8adbdc49d 100644 --- a/examples/stable/test/property/ic_api/chunk/test/tests.ts +++ b/examples/stable/test/property/ic_api/chunk/test/tests.ts @@ -11,7 +11,8 @@ import { _SERVICE as Actor } from './dfx_generated/canister/canister.did'; const max = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? 80 : 200; From 6cdec86f50f2e12bb89c05256535dcb7644c041a Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 20 Dec 2024 11:56:25 -0700 Subject: [PATCH 2/6] make variable name more consistent with other main branch var --- .github/actions/determine_workflow_config/action.yml | 4 ++-- .github/actions/determine_workflow_context/README.md | 2 +- .github/actions/determine_workflow_context/action.yml | 8 ++++---- .github/workflows/run_test.yml | 10 +++++----- .../http_server/large_files/test/auto_tests.ts | 2 +- .../http_server/large_files/test/huge_file_tests.ts | 2 +- .../http_server/large_files/test/manual_tests.ts | 2 +- .../end_to_end/http_server/large_files/test/tests.ts | 2 +- .../candid_rpc/canister_methods/update/test/test.ts | 2 +- .../test/property/candid_rpc/recursive/test/test.ts | 2 +- .../candid_rpc/canister_methods/update/test/test.ts | 2 +- .../test/property/candid_rpc/recursive/test/test.ts | 2 +- .../test/property/candid_rpc/service/test/test.ts | 2 +- .../stable/test/property/ic_api/chunk/test/tests.ts | 2 +- 14 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/actions/determine_workflow_config/action.yml b/.github/actions/determine_workflow_config/action.yml index 204199781e..1403910b43 100644 --- a/.github/actions/determine_workflow_config/action.yml +++ b/.github/actions/determine_workflow_config/action.yml @@ -60,8 +60,8 @@ runs: echo "is-dependabot=false" >> $GITHUB_OUTPUT else EXCLUDE_SLOW=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' }} - EXCLUDE_UNSTABLE=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push == 'true' }} - EXCLUDE_RELEASE_ONLY=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push == 'true' }} + EXCLUDE_UNSTABLE=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push_from_feature_merge == 'true' }} + EXCLUDE_RELEASE_ONLY=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push_from_feature_merge == 'true' }} echo "exclude-slow=$EXCLUDE_SLOW" >> $GITHUB_OUTPUT echo "exclude-unstable=$EXCLUDE_UNSTABLE" >> $GITHUB_OUTPUT diff --git a/.github/actions/determine_workflow_context/README.md b/.github/actions/determine_workflow_context/README.md index 6e3b90d485..6dd7f93442 100644 --- a/.github/actions/determine_workflow_context/README.md +++ b/.github/actions/determine_workflow_context/README.md @@ -9,7 +9,7 @@ steps: - name: Use run conditions run: | - echo "Is main branch push: ${{ steps.workflow-context.outputs.is_main_branch_push }}" + echo "Is main branch push: ${{ steps.workflow-context.outputs.is_main_branch_push_from_feature_merge }}" echo "Is main branch merge from release push: ${{ steps.workflow-context.outputs.is_main_branch_merge_from_release_push }}" echo "Is release branch PR: ${{ steps.workflow-context.outputs.is_release_branch_pr }}" echo "Is feature branch PR: ${{ steps.workflow-context.outputs.is_feature_branch_pr }}" diff --git a/.github/actions/determine_workflow_context/action.yml b/.github/actions/determine_workflow_context/action.yml index aceb05a6ad..445c3f6056 100644 --- a/.github/actions/determine_workflow_context/action.yml +++ b/.github/actions/determine_workflow_context/action.yml @@ -1,9 +1,9 @@ name: 'Determine workflow context' description: 'Determines the workflow context based on the current GitHub context' outputs: - is_main_branch_push: + is_main_branch_push_from_feature_merge: description: 'True if this is a push to the main branch (excluding merges from release branches)' - value: ${{ steps.workflow-context.outputs.is_main_branch_push }} + value: ${{ steps.workflow-context.outputs.is_main_branch_push_from_release_merge }} is_main_branch_push_from_release_merge: description: 'True if this is a push to the main branch from a release branch merge' value: ${{ steps.workflow-context.outputs.is_main_branch_push_from_release_merge }} @@ -22,14 +22,14 @@ runs: - id: workflow-context run: | # Define conditions using shell variables - AZLE_IS_MAIN_BRANCH_PUSH=${{ github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'demergent-labs/release--') }} + AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE=${{ github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'demergent-labs/release--') }} AZLE_IS_MAIN_BRANCH_PUSH_FROM_RELEASE_MERGE=${{ github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, 'demergent-labs/release--') }} AZLE_IS_RELEASE_BRANCH_PR=${{ startsWith(github.head_ref, 'release--') }} AZLE_IS_FEATURE_BRANCH_PR=${{ !startsWith(github.head_ref, 'release--') && github.ref != 'refs/heads/main' && github.event.pull_request.draft == false }} AZLE_IS_FEATURE_BRANCH_DRAFT_PR=${{ !startsWith(github.head_ref, 'release--') && github.ref != 'refs/heads/main' && github.event.pull_request.draft == true }} # Set individual outputs - echo "is_main_branch_push=$AZLE_IS_MAIN_BRANCH_PUSH" >> $GITHUB_OUTPUT + echo "is_main_branch_push_from_feature_merge=$AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE" >> $GITHUB_OUTPUT echo "is_main_branch_push_from_release_merge=$AZLE_IS_MAIN_BRANCH_PUSH_FROM_RELEASE_MERGE" >> $GITHUB_OUTPUT echo "is_release_branch_pr=$AZLE_IS_RELEASE_BRANCH_PR" >> $GITHUB_OUTPUT echo "is_feature_branch_pr=$AZLE_IS_FEATURE_BRANCH_PR" >> $GITHUB_OUTPUT diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 74c7942fe9..66efccd660 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -53,7 +53,7 @@ jobs: ETHEREUM_URL: ${{ secrets.ETHEREUM_URL }} AZLE_IDENTITY_STORAGE_MODE: 'plaintext' AZLE_END_TO_END_TEST_LINK_AZLE: ${{ matrix.azle_source == 'repo' }} - AZLE_IS_MAIN_BRANCH_PUSH: '' + AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE: '' AZLE_IS_MAIN_BRANCH_PUSH_FROM_RELEASE_MERGE: '' AZLE_IS_RELEASE_BRANCH_PR: '' AZLE_IS_FEATURE_BRANCH_PR: '' @@ -75,7 +75,7 @@ jobs: - name: Set condition environment variables run: | - echo "AZLE_IS_MAIN_BRANCH_PUSH=${{ steps.set-conditions.outputs.is_main_branch_push }}" >> $GITHUB_ENV + echo "AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE=${{ steps.set-conditions.outputs.is_main_branch_push_from_feature_merge }}" >> $GITHUB_ENV echo "AZLE_IS_MAIN_BRANCH_PUSH_FROM_RELEASE_MERGE=${{ steps.set-conditions.outputs.is_main_branch_push_from_release_merge }}" >> $GITHUB_ENV echo "AZLE_IS_RELEASE_BRANCH_PR=${{ steps.set-conditions.outputs.is_release_branch_pr }}" >> $GITHUB_ENV echo "AZLE_IS_FEATURE_BRANCH_PR=${{ steps.set-conditions.outputs.is_feature_branch_pr }}" >> $GITHUB_ENV @@ -83,7 +83,7 @@ jobs: - name: Print environment variables run: | - echo "AZLE_IS_MAIN_BRANCH_PUSH: $AZLE_IS_MAIN_BRANCH_PUSH" + echo "AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE: $AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE" echo "AZLE_IS_MAIN_BRANCH_PUSH_FROM_RELEASE_MERGE: $AZLE_IS_MAIN_BRANCH_PUSH_FROM_RELEASE_MERGE" echo "AZLE_IS_RELEASE_BRANCH_PR: $AZLE_IS_RELEASE_BRANCH_PR" echo "AZLE_IS_FEATURE_BRANCH_PR: $AZLE_IS_FEATURE_BRANCH_PR" @@ -124,7 +124,7 @@ jobs: run: dfx start --clean --background --host 127.0.0.1:8000 --artificial-delay 0 - name: Start dfx - if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} + if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} working-directory: ${{ matrix.test.path }} run: dfx start --clean --background --host 127.0.0.1:8000 @@ -133,7 +133,7 @@ jobs: run: | RUNS=1 - if [[ "${{ steps.set-conditions.outputs.is_main_branch_push }}" == "true" ]]; then + if [[ "${{ steps.set-conditions.outputs.is_main_branch_push_from_release_merge }}" == "true" ]]; then RUNS=100 fi diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts index 3c96359db2..b7fd8e29be 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts @@ -20,7 +20,7 @@ const autoGenAutoUploadSmallFileInfos: [number, Unit][] = [ const autoGenAutoUploadFileInfos: [number, Unit][] = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? autoGenAutoUploadSmallFileInfos : [ ...autoGenAutoUploadSmallFileInfos, diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts index dbd0a63d08..4dc2d94482 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts @@ -12,7 +12,7 @@ const hugeAutoGenAutoUploadSmallFileInfos: [number, Unit][] = [[0, 'GiB']]; // T const hugeAutoGenAutoUploadFileInfos: [number, Unit][] = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? hugeAutoGenAutoUploadSmallFileInfos : [...hugeAutoGenAutoUploadSmallFileInfos, [2, 'GiB']]; // TODO add tests for 5GiB and maybe larger https://github.com/demergent-labs/azle/issues/2065 diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts index fdc2a62d86..06e58bc883 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts @@ -11,7 +11,7 @@ export function manualTests(origin: string): Test { const manualFileSize = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? 7 : 150; const autoGenManualUploadFileInfos: [number, Unit][] = [ diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts index 0a7d139f10..0ae9279d29 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts @@ -20,7 +20,7 @@ export function getTests(canisterId: string): Test { const describeLongTest = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? describe.skip : describe; diff --git a/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts b/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts index 2c9666e4c1..88974a4032 100644 --- a/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts +++ b/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts @@ -35,7 +35,7 @@ const HeterogeneousUpdateMethodArb = UpdateMethodArb( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/experimental/test/property/candid_rpc/recursive/test/test.ts b/examples/experimental/test/property/candid_rpc/recursive/test/test.ts index 5cbbfa51c0..496768412e 100644 --- a/examples/experimental/test/property/candid_rpc/recursive/test/test.ts +++ b/examples/experimental/test/property/candid_rpc/recursive/test/test.ts @@ -49,7 +49,7 @@ const AllRecursiveQueryMethodArb = fc.oneof( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts b/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts index 73baa3b9a3..0248825206 100644 --- a/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts +++ b/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts @@ -35,7 +35,7 @@ const HeterogeneousUpdateMethodArb = UpdateMethodArb( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/stable/test/property/candid_rpc/recursive/test/test.ts b/examples/stable/test/property/candid_rpc/recursive/test/test.ts index 064795a815..24b79384af 100644 --- a/examples/stable/test/property/candid_rpc/recursive/test/test.ts +++ b/examples/stable/test/property/candid_rpc/recursive/test/test.ts @@ -49,7 +49,7 @@ const AllRecursiveQueryMethodArb = fc.oneof( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/stable/test/property/candid_rpc/service/test/test.ts b/examples/stable/test/property/candid_rpc/service/test/test.ts index 526555b1d4..0576a972df 100644 --- a/examples/stable/test/property/candid_rpc/service/test/test.ts +++ b/examples/stable/test/property/candid_rpc/service/test/test.ts @@ -36,7 +36,7 @@ const AllServicesQueryMethodArb = QueryMethodArb( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? shortArrayConstraints : { ...defaultArrayConstraints, diff --git a/examples/stable/test/property/ic_api/chunk/test/tests.ts b/examples/stable/test/property/ic_api/chunk/test/tests.ts index d8adbdc49d..74376fe259 100644 --- a/examples/stable/test/property/ic_api/chunk/test/tests.ts +++ b/examples/stable/test/property/ic_api/chunk/test/tests.ts @@ -12,7 +12,7 @@ import { _SERVICE as Actor } from './dfx_generated/canister/canister.did'; const max = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? 80 : 200; From 86e1fc938348c2ccc89dddbebe00dd65e4ca381e Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 20 Dec 2024 12:04:22 -0700 Subject: [PATCH 3/6] fixes --- .github/actions/determine_workflow_context/README.md | 4 ++-- .github/workflows/run_test.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/determine_workflow_context/README.md b/.github/actions/determine_workflow_context/README.md index 6dd7f93442..9a0f9822e9 100644 --- a/.github/actions/determine_workflow_context/README.md +++ b/.github/actions/determine_workflow_context/README.md @@ -9,8 +9,8 @@ steps: - name: Use run conditions run: | - echo "Is main branch push: ${{ steps.workflow-context.outputs.is_main_branch_push_from_feature_merge }}" - echo "Is main branch merge from release push: ${{ steps.workflow-context.outputs.is_main_branch_merge_from_release_push }}" + echo "Is main branch push from feature merge: ${{ steps.workflow-context.outputs.is_main_branch_push_from_feature_merge }}" + echo "Is main branch push from release merge: ${{ steps.workflow-context.outputs.is_main_branch_push_from_release_merge }}" echo "Is release branch PR: ${{ steps.workflow-context.outputs.is_release_branch_pr }}" echo "Is feature branch PR: ${{ steps.workflow-context.outputs.is_feature_branch_pr }}" echo "Is feature branch draft PR: ${{ steps.workflow-context.outputs.is_feature_branch_draft_pr }}" diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 66efccd660..5f69d7c3f2 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -124,7 +124,7 @@ jobs: run: dfx start --clean --background --host 127.0.0.1:8000 --artificial-delay 0 - name: Start dfx - if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} + if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_feature_merge == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} working-directory: ${{ matrix.test.path }} run: dfx start --clean --background --host 127.0.0.1:8000 @@ -133,8 +133,8 @@ jobs: run: | RUNS=1 - if [[ "${{ steps.set-conditions.outputs.is_main_branch_push_from_release_merge }}" == "true" ]]; then - RUNS=100 + if [[ "${{ steps.set-conditions.outputs.is_main_branch_push_from_feature_merge }}" == "true" ]]; then + RUNS=5 fi if [[ "${{ steps.set-conditions.outputs.is_main_branch_push_from_release_merge }}" == "true" ]]; then From 02cbad15a431902a3e823afe5385ff60faa1bc71 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 20 Dec 2024 13:07:39 -0700 Subject: [PATCH 4/6] fix --- .github/actions/determine_workflow_context/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/determine_workflow_context/action.yml b/.github/actions/determine_workflow_context/action.yml index 445c3f6056..d7fd3f9274 100644 --- a/.github/actions/determine_workflow_context/action.yml +++ b/.github/actions/determine_workflow_context/action.yml @@ -3,7 +3,7 @@ description: 'Determines the workflow context based on the current GitHub contex outputs: is_main_branch_push_from_feature_merge: description: 'True if this is a push to the main branch (excluding merges from release branches)' - value: ${{ steps.workflow-context.outputs.is_main_branch_push_from_release_merge }} + value: ${{ steps.workflow-context.outputs.is_main_branch_push_from_feature_merge }} is_main_branch_push_from_release_merge: description: 'True if this is a push to the main branch from a release branch merge' value: ${{ steps.workflow-context.outputs.is_main_branch_push_from_release_merge }} From d1f34e58d6cb30e393572e4def053e7fa59d4845 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 20 Dec 2024 13:09:51 -0700 Subject: [PATCH 5/6] no artificial delay --- .github/workflows/run_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 5f69d7c3f2..3e74670e81 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -119,12 +119,12 @@ jobs: working-directory: ${{ matrix.test.path }} - name: Start dfx with artificial delay 0 - if: ${{ steps.set-conditions.outputs.is_feature_branch_pr == 'true' || steps.set-conditions.outputs.is_feature_branch_draft_pr == 'true' }} + if: ${{ steps.set-conditions.outputs.is_feature_branch_pr == 'true' || steps.set-conditions.outputs.is_feature_branch_draft_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_feature_merge == 'true' }} working-directory: ${{ matrix.test.path }} run: dfx start --clean --background --host 127.0.0.1:8000 --artificial-delay 0 - name: Start dfx - if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_feature_merge == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} + if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} working-directory: ${{ matrix.test.path }} run: dfx start --clean --background --host 127.0.0.1:8000 From f4797dfd93e775a528cfaab3684503e016fd362f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 20:42:06 +0000 Subject: [PATCH 6/6] deps(dev): bump puppeteer from 23.10.3 to 23.11.1 Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 23.10.3 to 23.11.1. - [Release notes](https://github.com/puppeteer/puppeteer/releases) - [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json) - [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v23.10.3...puppeteer-v23.11.1) --- updated-dependencies: - dependency-name: puppeteer dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 51 ++++++++++++++++++++--------------------------- package.json | 2 +- 2 files changed, 23 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1367227e4f..633ab75432 100644 --- a/package-lock.json +++ b/package-lock.json @@ -64,7 +64,7 @@ "jest": "^29.7.0", "lint-staged": "15.2.11", "prettier": "^3.4.2", - "puppeteer": "^23.10.3", + "puppeteer": "^23.11.1", "semver": "^7.6.3", "ts-jest": "^29.1.4", "typescript-eslint": "^8.18.0" @@ -2658,9 +2658,9 @@ } }, "node_modules/bare-stream": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.5.2.tgz", - "integrity": "sha512-QK6bePvszntxgPKdVXciYzjlWv2Ry1mQuUqyUUzd27G7eLupl6d0K5AGJfnfyFAdgy5tRolHP/zbaUMslLceOg==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.6.1.tgz", + "integrity": "sha512-eVZbtKM+4uehzrsj49KtCy3Pbg7kO1pJ3SKZ1SFrIH/0pnj9scuGGgUlNDf/7qS8WKtGdiJY5Kyhs/ivYPTB/g==", "dev": true, "optional": true, "dependencies": { @@ -3136,13 +3136,12 @@ } }, "node_modules/chromium-bidi": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.8.0.tgz", - "integrity": "sha512-uJydbGdTw0DEUjhoogGveneJVWX/9YuqkWePzMmkBYwtdAqo5d3J/ovNKFr+/2hWXYmYCr6it8mSSTIj6SS6Ug==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.11.0.tgz", + "integrity": "sha512-6CJWHkNRoyZyjV9Rwv2lYONZf1Xm0IuDyNq97nwSsxxP3wf5Bwy15K5rOvVKMtJ127jJBmxFUanSAOjgFRxgrA==", "dev": true, "dependencies": { "mitt": "3.0.1", - "urlpattern-polyfill": "10.0.0", "zod": "3.23.8" }, "peerDependencies": { @@ -7586,17 +7585,17 @@ } }, "node_modules/puppeteer": { - "version": "23.10.3", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.10.3.tgz", - "integrity": "sha512-ODG+L9vCSPkQ1j+yDtNDdkSsWt2NXNrQO5C8MlwkYgE2hYnXdqVRbBpsHnoP7+EULJJKbWyR2Q4BdfohjQor3A==", + "version": "23.11.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.11.1.tgz", + "integrity": "sha512-53uIX3KR5en8l7Vd8n5DUv90Ae9QDQsyIthaUFVzwV6yU750RjqRznEtNMBT20VthqAdemnJN+hxVdmMHKt7Zw==", "dev": true, "hasInstallScript": true, "dependencies": { "@puppeteer/browsers": "2.6.1", - "chromium-bidi": "0.8.0", + "chromium-bidi": "0.11.0", "cosmiconfig": "^9.0.0", "devtools-protocol": "0.0.1367902", - "puppeteer-core": "23.10.3", + "puppeteer-core": "23.11.1", "typed-query-selector": "^2.12.0" }, "bin": { @@ -7607,13 +7606,13 @@ } }, "node_modules/puppeteer-core": { - "version": "23.10.3", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.10.3.tgz", - "integrity": "sha512-7JG8klL2qHLyH8t2pOmM9zgykhaulUf7cxnmmqupjdwGfNMiGaYehQka20iUB9R/fwVyG8mFMZcsmw1FHrgKVw==", + "version": "23.11.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.11.1.tgz", + "integrity": "sha512-3HZ2/7hdDKZvZQ7dhhITOUg4/wOrDRjyK2ZBllRB0ZCOi9u0cwq1ACHDjBB+nX+7+kltHjQvBRdeY7+W0T+7Gg==", "dev": true, "dependencies": { "@puppeteer/browsers": "2.6.1", - "chromium-bidi": "0.8.0", + "chromium-bidi": "0.11.0", "debug": "^4.4.0", "devtools-protocol": "0.0.1367902", "typed-query-selector": "^2.12.0", @@ -8279,9 +8278,9 @@ } }, "node_modules/streamx": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.21.0.tgz", - "integrity": "sha512-Qz6MsDZXJ6ur9u+b+4xCG18TluU7PGlRfXVAAjNiGsFrBUt/ioyLkxbFaKJygoPs+/kW4VyBj0bSj89Qu0IGyg==", + "version": "2.21.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.21.1.tgz", + "integrity": "sha512-PhP9wUnFLa+91CPy3N6tiQsK+gnYyUNuk15S3YG/zjYE7RuPeCjJngqnzpC31ow0lzBHQ+QGO4cNJnd0djYUsw==", "dev": true, "dependencies": { "fast-fifo": "^1.3.2", @@ -8584,9 +8583,9 @@ } }, "node_modules/text-decoder": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.2.tgz", - "integrity": "sha512-/MDslo7ZyWTA2vnk1j7XoDVfXsGk3tp+zFEJHJGm0UjIlQifonVFwlVbQDFh8KJzTBnT8ie115TYqir6bclddA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", + "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", "dev": true, "dependencies": { "b4a": "^1.6.4" @@ -9262,12 +9261,6 @@ "punycode": "^2.1.0" } }, - "node_modules/urlpattern-polyfill": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", - "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", - "dev": true - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/package.json b/package.json index a9fdf2f17b..299101ac6a 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "lint-staged": "15.2.11", "semver": "^7.6.3", "prettier": "^3.4.2", - "puppeteer": "^23.10.3", + "puppeteer": "^23.11.1", "ts-jest": "^29.1.4", "typescript-eslint": "^8.18.0" },