-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove encoding/decoding and update tests #35
Conversation
aea3527
to
3dc20cf
Compare
db9b2eb
to
57a190f
Compare
57a190f
to
0970e1f
Compare
c5bbb37
to
d900801
Compare
d900801
to
f9d7d2d
Compare
.github/workflows/pr.yaml
Outdated
@@ -7,7 +7,7 @@ jobs: | |||
runs-on: ubuntu-latest | |||
services: | |||
a3p: | |||
image: ghcr.io/agoric/agoric-3-proposals:latest | |||
image: ghcr.io/agoric/agoric-3-proposals@sha256:644e09bf041e5588570ff9a49e6129cc468e9c8458417541027e8532cb91083b |
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.
Ideally it works with latest but we don't have CI set up yet to trigger here when latest
changes. Meanwhile it should at least use a tag.
Does use-upgrade-17 work? That's the current latest.
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.
Using the use-upgrade-17
tag worked. Updated in #36
package.json
Outdated
@@ -25,7 +25,7 @@ | |||
"devDependencies": { | |||
"@cosmjs/stargate": "^0.28.9", | |||
"@subql/cli": "^5.4.0", | |||
"@subql/node-cosmos": "^4.2.1", | |||
"@subql/node-cosmos": "4.2.1", |
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.
please retain semver range. the lockfile controls whether the update actually changes
Heads up that a new release is imminent with this dependency updates (https://github.com/subquery/subql-cosmos/pull/302
) fixing the exit code for the test runner.
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.
Thanks for pointing this out. Updated in #36
[ | ||
new Wallet( | ||
'published.wallet.agoric1ee9hr0jyrxhy999y755mp862ljgycmwyp4pl7q', | ||
'published.wallet.agoric1rwwley550k9mmk6uq6mm6z4udrg8kyuyvfszjk.current', |
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.
looking at .current
is more comprehensive but a path without .current
should also work.
vaultManagerMetricsDaily.totalShortfallReceivedLast = BigInt(0); | ||
vaultManagerMetricsDaily.metricsCount = BigInt(1); | ||
|
||
// DISABLED because the timestamp for these entities is changed on each run of the a3p container |
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.
are you saying the time for the block (e.g. 1212) changes with each run?
any ideas why these paths have that problem and the ones below like boardAux don't?
I looked into expressing the tests to not expect a certain date but the subqlTest runner expects a full exact match: https://github.com/subquery/subql/blob/cb2db57fa3be7a3e4033cc170ea5d8f45fadf90c/packages/node-core/src/indexer/test.runner.ts#L96-L107
thankfully we can instead automate testing using GraphQL queries as you've done in #36
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.
yes. it seems the blocks that contain the data for vault metrics are committed after the chain is started, therefore the time the block is committed is different on each time the a3p container is started.
#36 seems like a good approach for this. i'll see what i can do 👍
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.
Made the update in #38
c912d4f
to
6a69b4e
Compare
refs: #30
The PR does the following:
.current
and corrected the Date object. For the state change test, replaced the initial payload (no vault close event found at 627) with one for a vault opened at block height 627.ghcr.io/agoric/agoric-3-proposals@sha256:644e09bf041e5588570ff9a49e6129cc468e9c8458417541027e8532cb91083b
instead oflatest
to ensure the Date object remains deterministic in tests. @frazarshad and I observed that the recent a3p image, published 3 days ago, caused block dates in the tests to reflect that publish date.subql-node-cosmos
image to version4.2.1
, wherehandleStateChangeEvent
handles events without encoding, allowing us to remove the encoding/decoding sections from the code.