Skip to content

Commit ef12949

Browse files
zyzniewski-reefzyzniewski
authored andcommitted
Merge branch 'staging' into tests/zyzniewski/test_set_weights
2 parents 4ecaff2 + 3ff743a commit ef12949

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.github/workflows/e2e-subtensor-tests.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ jobs:
4949
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
5050

5151
- name: Pull Docker Image
52-
run: docker pull ghcr.io/opentensor/subtensor-localnet:latest
52+
run: docker pull ghcr.io/opentensor/subtensor-localnet:devnet-ready
5353

5454
- name: Save Docker Image to Cache
55-
run: docker save -o subtensor-localnet.tar ghcr.io/opentensor/subtensor-localnet:latest
55+
run: docker save -o subtensor-localnet.tar ghcr.io/opentensor/subtensor-localnet:devnet-ready
5656

5757
- name: Upload Docker Image as Artifact
5858
uses: actions/upload-artifact@v4

tests/e2e_tests/conftest.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
setup_wallet,
2020
)
2121

22+
LOCALNET_IMAGE_NAME = "ghcr.io/opentensor/subtensor-localnet:devnet-ready"
23+
2224

2325
def wait_for_node_start(process, timestamp=None):
2426
"""Waits for node to start in the docker."""
@@ -43,9 +45,13 @@ def wait_for_node_start(process, timestamp=None):
4345
# To prevent the buffer filling up
4446
def read_output():
4547
while True:
46-
if not process.stdout.readline():
48+
line = process.stdout.readline()
49+
50+
if not line:
4751
break
4852

53+
print(line)
54+
4955
reader_thread = threading.Thread(target=read_output, daemon=True)
5056
reader_thread.start()
5157

@@ -132,6 +138,7 @@ def is_docker_running():
132138
stderr=subprocess.DEVNULL,
133139
check=True,
134140
)
141+
subprocess.run(["docker", "pull", LOCALNET_IMAGE_NAME], check=True)
135142
return True
136143
except subprocess.CalledProcessError:
137144
return False
@@ -162,7 +169,6 @@ def try_start_docker():
162169
return False
163170

164171
container_name = f"test_local_chain_{str(time.time()).replace(".", "_")}"
165-
image_name = "ghcr.io/opentensor/subtensor-localnet:devnet-ready"
166172

167173
# Command to start container
168174
cmds = [
@@ -175,7 +181,7 @@ def try_start_docker():
175181
"9944:9944",
176182
"-p",
177183
"9945:9945",
178-
image_name,
184+
LOCALNET_IMAGE_NAME,
179185
params,
180186
]
181187

tests/e2e_tests/test_set_weights.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ async def test_set_weights_uses_next_nonce(local_chain, subtensor, alice_wallet)
113113
netuid,
114114
uids=weight_uids,
115115
weights=weight_vals,
116-
wait_for_inclusion=True, # Don't wait for inclusion, we are testing the nonce when there is a tx in the pool
116+
wait_for_inclusion=False, # Don't wait for inclusion, we are testing the nonce when there is a tx in the pool
117117
wait_for_finalization=False,
118118
)
119119

0 commit comments

Comments
 (0)