Skip to content

Conversation

@x3c41a
Copy link
Contributor

@x3c41a x3c41a commented Nov 28, 2025

No description provided.

@x3c41a x3c41a requested a review from bkontur November 28, 2025 09:10
@x3c41a x3c41a mentioned this pull request Nov 28, 2025
@bkontur
Copy link
Collaborator

bkontur commented Nov 28, 2025

@x3c41a @karolk91 let's make "the justfile stuff running examples" work in CI #108 (comment)

@x3c41a
Copy link
Contributor Author

x3c41a commented Nov 28, 2025

@x3c41a @karolk91 let's make "the justfile stuff running examples" work in CI #108 (comment)

do you mind if it will be a separate PR? I want to experiment with justfile in this one...

@bkontur
Copy link
Collaborator

bkontur commented Nov 28, 2025

@x3c41a @karolk91 let's make "the justfile stuff running examples" work in CI #108 (comment)

do you mind if it will be a separate PR? I want to experiment with justfile in this one...

Why? What experiments with justfile?
From my point of view, getting this working in CI is the most important part.

@x3c41a
Copy link
Contributor Author

x3c41a commented Nov 28, 2025

Why? What experiments with justfile?

I want to split that one big just authorize-and-store [client] into smaller sub-commands so that they can be used both in README (to replace those big commands that we have) and in the CI.

From my point of view, getting this working in CI is the most important part.

Yes, I agree. I just want to make it maintainable and utilise the full power of justs.

@x3c41a
Copy link
Contributor Author

x3c41a commented Dec 4, 2025

I updated README, please, take a look @bkontur
As a side note, I noticed that Connect IPFS nodes step started to fail with

🔗 Connecting IPFS nodes...
Error: connect 12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby failure: failed to dial: failed to dial 12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby: all dials failed
  * [/ip4/127.0.0.1/tcp/12347/ws] dial tcp 127.0.0.1:12347: connect: connection refused
Error: connect 12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm failure: failed to dial: failed to dial 12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm: all dials failed
  * [/ip4/127.0.0.1/tcp/10001/ws] dial tcp 127.0.0.1:10001: connect: connection refused

@x3c41a x3c41a requested a review from bkontur December 4, 2025 09:14
@x3c41a
Copy link
Contributor Author

x3c41a commented Dec 4, 2025

I updated README, please, take a look @bkontur As a side note, I noticed that Connect IPFS nodes step started to fail with

🔗 Connecting IPFS nodes...
Error: connect 12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby failure: failed to dial: failed to dial 12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby: all dials failed
  * [/ip4/127.0.0.1/tcp/12347/ws] dial tcp 127.0.0.1:12347: connect: connection refused
Error: connect 12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm failure: failed to dial: failed to dial 12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm: all dials failed
  * [/ip4/127.0.0.1/tcp/10001/ws] dial tcp 127.0.0.1:10001: connect: connection refused

fixed with the latest commit

@x3c41a x3c41a requested a review from bkontur December 5, 2025 11:31

# Test the complete workflow (builds, starts services, runs example, shuts down services)
# Parameters: api=[papi|pjs] - choose between Polkadot API (papi) or Polkadot JS (pjs)
authorize-and-store api="papi": build npm-install
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
authorize-and-store api="papi": build npm-install
run-authorize-and-store api="papi": build npm-install

Comment on lines 194 to 206
# Initialize IPFS
just ipfs-init

# Start services
just ipfs-start
just bulletin-zombienet-start
just ipfs-connect
just ipfs-reconnect-start

# Generate PAPI descriptors if needed
if [ "$API_TYPE" == "papi" ]; then
just papi-generate
fi
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would extract this to one step, that we can reuse, e.g. just setup-services

Suggested change
# Initialize IPFS
just ipfs-init
# Start services
just ipfs-start
just bulletin-zombienet-start
just ipfs-connect
just ipfs-reconnect-start
# Generate PAPI descriptors if needed
if [ "$API_TYPE" == "papi" ]; then
just papi-generate
fi
# Initialize IPFS
just ipfs-init
# Start services
just ipfs-start
just bulletin-zombienet-start
just ipfs-connect
just ipfs-reconnect-start
# Generate PAPI descriptors if needed
if [ "$API_TYPE" == "papi" ]; then
just papi-generate
fi

Comment on lines 208 to 209
# Run the example
just run-example $API_TYPE
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's remove run-example and trigger authorize_and_store here directly

Suggested change
# Run the example
just run-example $API_TYPE
# Run the example
if [ "$API_TYPE" == "papi" ]; then
EXAMPLE_FILE="authorize_and_store_papi.js"
else
EXAMPLE_FILE="authorize_and_store.js"
fi
node $EXAMPLE_FILE


# Run the authorize-and-store example
# Parameters: api=[papi|pjs] - choose between Polkadot API (papi) or Polkadot JS (pjs)
run-example api="papi":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's remove run-example step.

At the end, we should be simply adding new examples, like:

run-store-big-data start-services="false":
        if [[ "$start-services" == "true" ]]; then
            just start-sevices
        fi
        node store_big_data.js

$IPFS_CMD swarm connect /ip4/127.0.0.1/tcp/10001/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm || true

# Start zombienet in background
bulletin-zombienet-start:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please, rename. we will add later bulletin-para-zombienet-start:

Suggested change
bulletin-zombienet-start:
bulletin-solo-zombienet-start:

@x3c41a
Copy link
Contributor Author

x3c41a commented Dec 8, 2025

Addressed all the comments, double checked that the commands still work, PTAL

@x3c41a x3c41a requested a review from bkontur December 8, 2025 11:31
@bkontur bkontur merged commit de23e32 into main Dec 8, 2025
7 checks passed
@bkontur bkontur deleted the upd_just branch December 8, 2025 11:59
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.

3 participants