-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix(iota-graphql-e2e-tests): restore graphql e2e tests #1969
Conversation
…aphql json cursors
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.
Everything seems to be good. I would double-check the suspicions changes just in case.
However, the test changes happened not because of the changes related to this PR.
Contents: iota_system::staking_pool::StakedIota {id: iota::object::UID {id: iota::object::ID {bytes: fake(0,0)}}, pool_id: iota::object::ID {bytes: _}, stake_activation_epoch: 0u64, principal: iota::balance::Balance<iota::iota::IOTA> {value: 1500000000000000u64}} | ||
Contents: iota_system::validator_cap::UnverifiedValidatorOperationCap {id: iota::object::UID {id: iota::object::ID {bytes: fake(0,0)}}, authorizer_validator_address: validator_0} |
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.
When I last worked with these tests I found out that when the iota-framework is changed we need to regenerate these *.exp
files because addresses, objects/packages IDs, chain IDs, and objects sequence can be changed. It seems like it happens because the TXs digests are changed in this case.
But in this PR several changes like this need to pay attention. Here we checked the view-object 0,0
that was StakedIota
but now it is UnverifiedValidatorOperationCap
.
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, in this case the source file needs to be manually updated
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.
This is changed in the upstream as well (check d25bb07714) as a result of a protocol change, so I think it is plausible to expect a difference here as well.
view-object 0,y
fetches objects created in the init
task and I assume UnverifiedValidatorOperationCap
is just one of those.
But I didn't go deeper, precisely because the scope of these tests is limited to the verification of the graphql queries from a functional perspective. So we only care that the queries return plausible results, that are the same between repeated runs. And that is why you don't need to update the source file @DaughterOfMars .
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 this case, it would be a good solution to add something like this to the related move file:
//# view-object 0,1 <- I am not sure about the index
to check both StakedIota
and UnverifiedValidatorOperationCap
.
Yes, the changes that affect this test were added earlier in another PR.
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.
I looked through the history, this line was changed several times. It is hard to say what they wanted to check 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.
StakedIota
no longer exists. object 0,1
is the upper bound and returns a Coin
object.
I think we should just leave it as is and get on in peace 😄
"id": "0xfeede6486d923f155071368a2c5d6610d22438eea2e0ad8376f521e1b57a9d88", | ||
"value": "89" | ||
"id": "0xff98d17d64f8d1d502180c9c4dfea5d08559721afa629883f56aec703563bda1", | ||
"value": "372" |
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.
It is interesting why the values were changed in this test.
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 I observed a few reorderings in other results as well. It might be related to how objects are ordered during creation in the transactional-test-runner and hence saved into the database, or to the newest version of async_graphql
used.
Important thing is again that this result is now idempotent.
gas summary: computation_cost: 1000000, storage_cost: 15412800, storage_rebate: 1976000, non_refundable_storage_fee: 0 | ||
gas summary: computation_cost: 1000000, storage_cost: 14789600, storage_rebate: 1976000, non_refundable_storage_fee: 0 |
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.
The storage cost became lower probably because the system object got smaller after removing the stake subsidy fund. But the rebate is the same for some reason.
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.
Might be something worth investigating as part of the new tokenomics implementation.
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.
Seems like I found an answer. The first rebate for the 0x3::sui_system::SuiSystemState
object is 0 and it is updated after the first usage.
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.
This one looks like it needs some detailed review
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.
Another changed test case
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.
Another changed test case
@DaughterOfMars please provide specific suggestions about editing this patch, providing proper justification for any underlying issues that you have identified. Otherwise, please trust that the set of reviewers already assigned, and the author will do or already did the necessary quality controls. To quote @valeriyr
and I will additionally repeat that
|
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.
PR looks good to me @kodemartin! Great to have these working e2e tests
The ones that I mentioned have specific test cases that have now been changed. If you view the associated
Which indicate that specific values are expected to be returned. However, the cursors have changed and may have invalidated the tests. |
or the comments might have been rendered obsolete at some point. Again, the scope of these tests is to test graphql not the network operation. Since we have different system packages, it is expected that the baseline is changed. If you spot issues with the network operation in the update baseline, please open new issues accordingly so that the language team plans them for resolution. |
That is not what is happening here. The underlying data has changed and that has invalidated the test cases. The comments are not out of date (except in this PR) |
Would you like me to make the changes for you? |
I was pretty specific on what I would like you to do. I do not want you to implement the changes. I want to you to help me understand and narrow down the problems, and provide guidance on possible ways of resolving them. This is what reviewers are supposed to do: https://iotafoundation.atlassian.net/wiki/spaces/IF/pages/2202337498/Reviewer+s+Guidelines#3.-How-to-write-code-review-comments |
Given the results of the PR and its reviews, I think we can safely merge this and open a new task for the Vm&Language team to fix the move files. Ideally, we should introduce some kind of determinism in order to avoid frequent changes. So, I suggest to close and merge this PR if there are no more suggestions regarding graphql queries from a functional perspective. |
|
Sounds good. Will you open an issue for the language team then @miker83z ? |
* refactor(iota-graphql-e2e-test): update baseline for available_range tests * fix(iota-transactional-test-runner): use no padding while encoding graphql json cursors * refactor(iota-graphql-e2e-test): update baseline for call tests * refactor(iota-graphql-e2e-test): update baseline for consistency tests * refactor(iota-graphql-e2e-test): update baseline for epoch tests * refactor(iota-graphql-e2e-test): update baseline for event_connection tests * refactor(iota-graphql-e2e-test): update baseline for limits tests * refactor(iota-graphql-e2e-test): update baseline for objects tests * refactor(iota-graphql-e2e-test): update baseline for owners tests * refactor(iota-graphql-e2e-test): update baseline for packages tests * refactor(iota-graphql-e2e-test): update baseline for transaction_block_effects tests * refactor(iota-graphql-e2e-test): update baseline for transactions tests * refactor(docker): allow overriding postgres env variables * refactor(iota-graphql-e2e-tests): update README * fixup! refactor(iota-graphql-e2e-tests): update README * fixup! refactor(docker): allow overriding postgres env variables * fix(iota-graphql-e2e-test): fixed `objects/pagination.move` test * fix(graphql-e2e-test): remove obsolete name service tests --------- Co-authored-by: Valerii Reutov <[email protected]> Co-authored-by: Levente Pap <[email protected]>
* refactor(iota-graphql-e2e-test): update baseline for available_range tests * fix(iota-transactional-test-runner): use no padding while encoding graphql json cursors * refactor(iota-graphql-e2e-test): update baseline for call tests * refactor(iota-graphql-e2e-test): update baseline for consistency tests * refactor(iota-graphql-e2e-test): update baseline for epoch tests * refactor(iota-graphql-e2e-test): update baseline for event_connection tests * refactor(iota-graphql-e2e-test): update baseline for limits tests * refactor(iota-graphql-e2e-test): update baseline for objects tests * refactor(iota-graphql-e2e-test): update baseline for owners tests * refactor(iota-graphql-e2e-test): update baseline for packages tests * refactor(iota-graphql-e2e-test): update baseline for transaction_block_effects tests * refactor(iota-graphql-e2e-test): update baseline for transactions tests * refactor(docker): allow overriding postgres env variables * refactor(iota-graphql-e2e-tests): update README * fixup! refactor(iota-graphql-e2e-tests): update README * fixup! refactor(docker): allow overriding postgres env variables * fix(iota-graphql-e2e-test): fixed `objects/pagination.move` test * fix(graphql-e2e-test): remove obsolete name service tests --------- Co-authored-by: Valerii Reutov <[email protected]> Co-authored-by: Levente Pap <[email protected]>
Description of change
This patch does the following:
async_graphql
in fix(CI): Fix cargo deny #1106 (see cde7061)@iota/graphql-transport
@valeriyr, @miker83z, @pavlo these tests use the
iota-transactional-test-runner
and so the baseline updates mostly relate to the updated genesis, and different ordering of the results. I would appreciate if one of you could have a quick look to verify that the responses are plausible. To me it seems so.Links to any relevant issues
Fixes #1580
Type of change
How the change has been tested
Follow the instructions in the updated README file to run the tests locally.
Change checklist