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

CCIP-4303:Enabling in-memory test in integration-tests workflow #15388

Merged
merged 18 commits into from
Nov 27, 2024

Conversation

b-gopalswami
Copy link
Contributor

Adding postgres instance to integration_tests workflow and converted one test from docker to in-memory test.
If any new in-memory tests gets added, pass PG_INSTANCE test_env_vars as true.

@b-gopalswami b-gopalswami marked this pull request as ready for review November 22, 2024 17:03
@b-gopalswami b-gopalswami requested review from a team as code owners November 22, 2024 17:03
@@ -18,8 +17,7 @@ import (

func TestInitialDeployOnLocal(t *testing.T) {
t.Parallel()
lggr := logger.TestLogger(t)
tenv, _, _ := testsetups.NewLocalDevEnvironmentWithDefaultPrice(t, lggr, nil)
tenv := changeset.NewMemoryEnvironmentWithJobsAndContracts(t, logger.TestLogger(t), 2, 4, nil)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not the best test to convert, may be try with fee boosting test. that has the longest running time. This one is just a basic test and should stay in docker. We already have a similar test in memory

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I see the runtime is not improved much( it's > 9min) in CI any idea why?

Copy link
Contributor Author

@b-gopalswami b-gopalswami Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just an example to prove it works. Instead of we convert some test to in-memory, we will eventually add in-memory tests like the one @asoliman92 wants to add for ccipreader.

The other test still runs for 350+ secs. This one previously ran for ~320 secs and now it is ~85 secs. So, clubbing in-memory and docker test might not be helpful. We should have in-memory tests as separate matrix.

@b-gopalswami b-gopalswami marked this pull request as draft November 23, 2024 01:07
@b-gopalswami b-gopalswami marked this pull request as ready for review November 25, 2024 21:18
@b-gopalswami b-gopalswami marked this pull request as draft November 25, 2024 22:01
@b-gopalswami b-gopalswami marked this pull request as ready for review November 26, 2024 17:04
Copy link
Contributor

@AnieeG AnieeG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

partial review

test_cmd: cd integration-tests/smoke/ccip && go test ccip_messaging_test.go -timeout 12m -test.parallel=2 -count=1 -json
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
E2E_JD_VERSION: 0.6.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not required for in-memory

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove it.

test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be

  • PR E2E Core Tests
    • Nightly E2E Tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to call that as E2E Core. More over the triggers are adjusted accordingly. So, the above one is good for now. We had a discussion in our stand up to convert every test to sim backend in PR run and in nightly run, run the same test using docker setup. That is separate work needs to be done once we convert the existing test to sim backend.

Comment on lines 18 to 20
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
E2E_JD_VERSION: 0.6.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these env vars make sense in the sim env?

Comment on lines 43 to 44
- '.github/workflows/integration-tests.yml'
- '.github/integration-tests.yml'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these pointing to the right files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix it

@makramkd
Copy link
Contributor

LGTM overall, just lemme know about the above comments, but the test changes seem fine. Once this is merged we can start cutting over other tests

Comment on lines +11 to +12
- id: smoke/ccip/ccip_messaging_test.go:*
path: integration-tests/smoke/ccip/ccip_messaging_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why only messaging_test? Can we do a regex to run all under ccip directory? or maybe even create a new directory ccip-1.6 that has only 1.6 related tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just an example. I don't want to club the work to convert the test to sim backend in this PR. We can do that in a separate PR.

It's better to have it separate matrix to make it parallel and speed up the execution.

repository: smartcontractkit/chainlink
ref: ${{ inputs.cl_ref }}

- name: 🧼 Clean up Environment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the soap 😁

@b-gopalswami
Copy link
Contributor Author

@Tofel Thanks for your feedback. As I see all that feedbacks are improvements, will create a follow PR to polish this further but for now will proceed with this as this feature is much needed by team to make progress on other tests.

@b-gopalswami b-gopalswami added this pull request to the merge queue Nov 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 27, 2024
@b-gopalswami b-gopalswami added this pull request to the merge queue Nov 27, 2024
Merged via the queue into develop with commit 146aeae Nov 27, 2024
171 checks passed
@b-gopalswami b-gopalswami deleted the ccip-4303-1 branch November 27, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants