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

Update graphql e2e tests to protocol version 45 #17819

Merged
merged 5 commits into from
May 21, 2024

Conversation

halfprice
Copy link
Contributor

@halfprice halfprice commented May 19, 2024

Description

This PR updates graphql e2e tests' protocol version to 45.

It also adds a script update-graphql-e2e-test-protocol-version.py that search through move code with specific protocol version, and replace it with new version. To use it:

python3 update_graphql_e2e_test_protocol_version.py [--yes-to-all] [--dry-run]

And then follow the prompts. It only updates the protocol version in move files now. To update the snapshot, one also needs to run

env UB=1 cargo nextest run --features pg_integration inside crates/sui-graphql-e2e-tests.

afterwards (with postgres running).

Test plan

Test only updates.


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

… automatically update all tests protocol version
Copy link

vercel bot commented May 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2024 1:18am

Copy link

vercel bot commented May 19, 2024

@halfprice is attempting to deploy a commit to the Mysten Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@amnn amnn left a comment

Choose a reason for hiding this comment

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

Thanks @halfprice ! Minor nit on the way the script is structured, but the change itself looks good.

Comment on lines 15 to 16
f"init --protocol-version {old_version} --",
f"init --protocol-version {new_version} --",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a little bit brittle (as opposed to testing for lines containing //# init and then searching for --protocol-version somewhere in that line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review and suggestion @amnn ! Script updated to search for //# init first and then replace --protocol-version` with new version.

@halfprice halfprice merged commit 5537fe6 into MystenLabs:main May 21, 2024
42 of 45 checks passed
@halfprice halfprice deleted the zhewu/graph-ql-test-to-45 branch May 21, 2024 01:43
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.

None yet

2 participants