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

feat(IDX): allow tests to depend on mainnet pocket-ic #1707

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nmattia
Copy link
Contributor

@nmattia nmattia commented Sep 26, 2024

This adds a build setting & related transition that allows for the pocket-ic version of tests to be overriden. By default //:pocket-ic-server points to the pocket-ic server from the source tree. This can be overriden by using pocket_ic_mainnet_test or by using the //:pocket-ic-mainnet target.

@github-actions github-actions bot added the feat label Sep 26, 2024
This adds a build setting & related transition that allows for the
pocket-ic version of tests to be overriden. By default
`//:pocket-ic-server` points to the pocket-ic server from the source
tree. This can be overriden by using `pocket_ic_mainnet_test` or by
using the `//:pocket-ic-mainnet` target.
BUILD.bazel Outdated Show resolved Hide resolved
BUILD.bazel Outdated Show resolved Hide resolved
@@ -72,3 +73,8 @@ rust_ic_test(
"@crate_index//:candid",
],
)

pocket_ic_mainnet_test(
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, not sure if meaningful or not

Copy link
Member

@cgundy cgundy left a comment

Choose a reason for hiding this comment

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

Rubber stamp

# default pocket-ic variant/version (head) is the one as in the
# source tree.
string_setting(
name = "pocket-ic-variant",
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about being explicit about which pocket-ic "thing" we're mentioning here? pocket-ic usually refers to the library while the following is about the server:

Suggested change
name = "pocket-ic-variant",
name = "pocket-ic-server-variant",

Same comment for the other things below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep that makes sense!

http_file(
name = "pocket-ic-mainnet-gz",
sha256 = "454891cac2421f3f894759ec5e6b6e48fbb544d79197bc29b88d34b93d78a4f1",
url = "https://download.dfinity.systems/ic/52ebccfba8855e23dcad9657a8d6e6be01df71f9/binaries/x86_64-linux/pocket-ic.gz",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see mainnet is using c66489953ed34670667ad81ce42a172948f289f5.

Will you address syncing this with testnet/mainnet_revisions.json#L3 in another PR?

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 you address syncing this with testnet/mainnet_revisions.json#L3 in another PR?

Yep, talked to DRE team and we'll be taking over the update of that file too. Let's sync offline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants