From 2549c351d37c5dd9cfc23a2d3761af854a2860a1 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:12:01 +0200 Subject: [PATCH 1/4] debug TEST_UPLOAD_CPU_PROFILE --- .github/workflows/run-e2e-tests-reusable-workflow.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/run-e2e-tests-reusable-workflow.yml b/.github/workflows/run-e2e-tests-reusable-workflow.yml index 745ebe4bc56..b567bd3a466 100644 --- a/.github/workflows/run-e2e-tests-reusable-workflow.yml +++ b/.github/workflows/run-e2e-tests-reusable-workflow.yml @@ -758,6 +758,12 @@ jobs: - name: Show test configuration in logs run: echo '${{ toJson(matrix.tests) }}' | jq . + - name: Show TEST_UPLOAD_CPU_PROFILE + run: echo '${{ matrix.tests.test_env_vars.TEST_UPLOAD_CPU_PROFILE }}' + + - name: Show TEST_UPLOAD_MEM_PROFILE + run: echo '${{ matrix.tests.test_env_vars.TEST_UPLOAD_MEM_PROFILE }}' + - name: Run tests id: run_tests uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@4f377a6b1cc07f0eca82745782736b4908a1da30 # v2.3.32 From 2b2fb180dbf936bf8549fb7d40e2084b83e5820b Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:22:39 +0200 Subject: [PATCH 2/4] Read config from env var first then override with TOML --- integration-tests/testconfig/testconfig.go | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/integration-tests/testconfig/testconfig.go b/integration-tests/testconfig/testconfig.go index fb692c56a75..2ec0a4c66c6 100644 --- a/integration-tests/testconfig/testconfig.go +++ b/integration-tests/testconfig/testconfig.go @@ -312,6 +312,18 @@ func GetConfig(configurationNames []string, product Product) (TestConfig, error) testConfig := TestConfig{} testConfig.ConfigurationNames = configurationNames + logger.Info().Msg("Setting env vars from testsecrets dot-env files") + err := ctf_config.LoadSecretEnvsFromFiles() + if err != nil { + return TestConfig{}, errors.Wrapf(err, "error reading test config values from ~/.testsecrets file") + } + + logger.Info().Msg("Reading config values from existing env vars") + err = testConfig.ReadFromEnvVar() + if err != nil { + return TestConfig{}, errors.Wrapf(err, "error reading test config values from env vars") + } + logger.Debug().Msgf("Will apply configurations named '%s' if they are found in any of the configs", strings.Join(configurationNames, ",")) // read embedded configs is build tag "embed" is set @@ -365,18 +377,6 @@ func GetConfig(configurationNames []string, product Product) (TestConfig, error) } } - logger.Info().Msg("Setting env vars from testsecrets dot-env files") - err := ctf_config.LoadSecretEnvsFromFiles() - if err != nil { - return TestConfig{}, errors.Wrapf(err, "error reading test config values from ~/.testsecrets file") - } - - logger.Info().Msg("Reading config values from existing env vars") - err = testConfig.ReadFromEnvVar() - if err != nil { - return TestConfig{}, errors.Wrapf(err, "error reading test config values from env vars") - } - logger.Info().Msgf("Overriding config from %s env var", Base64OverrideEnvVarName) configEncoded, isSet := os.LookupEnv(Base64OverrideEnvVarName) if isSet && configEncoded != "" { From e7050be57403df029da13389176668851163616d Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:25:43 +0200 Subject: [PATCH 3/4] remove debug info --- .github/workflows/run-e2e-tests-reusable-workflow.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/run-e2e-tests-reusable-workflow.yml b/.github/workflows/run-e2e-tests-reusable-workflow.yml index b567bd3a466..745ebe4bc56 100644 --- a/.github/workflows/run-e2e-tests-reusable-workflow.yml +++ b/.github/workflows/run-e2e-tests-reusable-workflow.yml @@ -758,12 +758,6 @@ jobs: - name: Show test configuration in logs run: echo '${{ toJson(matrix.tests) }}' | jq . - - name: Show TEST_UPLOAD_CPU_PROFILE - run: echo '${{ matrix.tests.test_env_vars.TEST_UPLOAD_CPU_PROFILE }}' - - - name: Show TEST_UPLOAD_MEM_PROFILE - run: echo '${{ matrix.tests.test_env_vars.TEST_UPLOAD_MEM_PROFILE }}' - - name: Run tests id: run_tests uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@4f377a6b1cc07f0eca82745782736b4908a1da30 # v2.3.32 From e1bc8704e9cdbc0d1352502a0dee0d1bde8cf8f0 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:34:04 +0200 Subject: [PATCH 4/4] Include tag and sha in workflow slack notification --- .github/workflows/run-e2e-tests-reusable-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-e2e-tests-reusable-workflow.yml b/.github/workflows/run-e2e-tests-reusable-workflow.yml index 745ebe4bc56..87edcb7381c 100644 --- a/.github/workflows/run-e2e-tests-reusable-workflow.yml +++ b/.github/workflows/run-e2e-tests-reusable-workflow.yml @@ -885,7 +885,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Build Details>" + "text": "<${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|tag: ${{ github.ref_name }}> | <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|sha: ${{ github.sha }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Details>" } } ]