-
Notifications
You must be signed in to change notification settings - Fork 51
Fix interface tests for passing params to GetLatestValue #1108
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
base: NONEVM-1064/querykey-integration-tests
Are you sure you want to change the base?
Fix interface tests for passing params to GetLatestValue #1108
Conversation
2b4bb86
to
f24ab00
Compare
bcb1b95
to
b1c687b
Compare
be2d287
to
82218b9
Compare
|
@@ -0,0 +1,36 @@ | |||
-- logpoller db table initialization for tests. loosely based on what's in chainlnk repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a strategy for keeping these in sync?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that as part of the EVM Extraction epic (probably the last step?) the sql migrations for solana will get moved into chainlink-solana. At that point, I'm assuming we would combine them here.
In the meantime, I guess the ideal strategy would be to have chainlink CI run these Solana interface tests, or at least this one. (Not sure if that's something we already do? I know there are some Solana integration tests that get run.) If that happens, then any time we update the schema in the chainlink repo in a way that breaks this test, we'll immediately be prompted to fix it by updating it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the meantime, I guess the ideal strategy would be to have chainlink CI run these Solana interface tests, or at least this one.
It looks like the only Solana integration test that chainlink CI runs is TestSolanaOCRV2Smoke
(via make test_smoke
):
https://github.com/smartcontractkit/chainlink-solana/blob/develop/Makefile#L93
At present, the purpose of this test schema is just to make sure that LogPoller doesn't error out when the interface tests are run without an external db, as soon as it starts up. Otherwise even the GetLatestValue interface tests wouldn't pass in CI. We still have to disable any that have a non-trivial dependence on the external db (ie, most of the ones where we search for events).
The only time this schema needs to be updated is if there are code changes to LogPoller in this repo which break the interface tests in this repo's CI (due to the new LogPoller code not being compatible with the test schema), so that will be caught immediately anyway, even if we keep the chainlink CI as-is.
But the real issue is that if someone makes a change to the db schema in chainlink repo, we would like any incompatibility with the LogPoller ORM that uses it to be caught immediately. That means we should be running something besides the OCRV2 smoke test anyway. This is already a problem on develop branch. It's not directly related to this test schema but a side effect of breaking the correspondence between Solana LogPoller code and chainlink schema would be the two schemas would also be out of sync.
Ideally, there would be a CCIP smoke test that gets run for this purpose. Until we have that, I think it does make sense to have it run the Solana relay interface tests instead. But there is one problem with that I hadn't thought of in my previous comment: we've completely disabled any of them which depend on an external db, due to them not being able to run in Solana CI.
I guess what we need is a way of disabling them if they're run from this CI, but not if they're run from chainlink CI--I'll look into that.
pdaStructData2Prefix := make([]byte, len(pdaStructData1Prefix)) | ||
copy(pdaStructData2Prefix, pdaStructData1Prefix) | ||
binary.LittleEndian.PutUint64(pdaStructData2Prefix[11:19], 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: couldn't we just do the same thing as pdaStructData1Prefix
here so you don't have to replace specific indexes?
pdaStructData2Prefix := make([]byte, len(pdaStructData1Prefix)) | |
copy(pdaStructData2Prefix, pdaStructData1Prefix) | |
binary.LittleEndian.PutUint64(pdaStructData2Prefix[11:19], 2) | |
pdaStructData2Prefix := make([]byte, len(pdaStructDataPrefix)) | |
copy(pdaStructData2Prefix, pdaStructDataPrefix) | |
pdaStructData2Prefix = binary.LittleEndian.AppendUint64(pdaStructData2Prefix, 2) | |
pdaStructData2Prefix = binary.LittleEndian.AppendUint64(pdaStructData2Prefix, idx) |
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Description
NONEVM-1312
Requires Dependencies