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

Setting up cli interactive flow #71

Merged
merged 31 commits into from
Oct 16, 2024

Conversation

jamiehewitt15
Copy link
Member

@jamiehewitt15 jamiehewitt15 commented Sep 4, 2024

Fixes #70

Changes proposed in this PR:

  • Setting up cli interactive flow
  • Publishing asset
  • Adding interactive flow to the system tests.

To test (with barge):

  1. run barge locally
  2. run ocean node locally
  3. set the envs in ocean-cli (export NODE_URL="http://127.0.0.1:8001"). No need to set Aquarius or provider URL anymore.
  4. npm run build && npm run cli start

To test (with Oasis testnet):

  1. get rose tokens on the testnet using the faucet: https://faucet.testnet.oasis.dev
  2. Run the node with oasis tesnet in the RPC env: export RPCS='{ "23295":{ "rpc":"https://testnet.sapphire.oasis.io", "chainId": 23295, "network": "sapphire-testnet", "chunkSize": 1000 }}'
  3. set the envs in ocean-cli (export NODE_URL="http://127.0.0.1:8001"). No need to set Aquarius or provider URL anymore.
  4. npm run build && npm run cli start

@mihaisc
Copy link

mihaisc commented Sep 16, 2024

can you do a quick update on the environment vars, so we don't have provider, aquarius

@jamiehewitt15 jamiehewitt15 marked this pull request as ready for review October 9, 2024 10:18
src/helpers.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@paulo-ocean paulo-ocean left a comment

Choose a reason for hiding this comment

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

Lgtm.
One small comment, as we are not using the createAsset from SDK
This part:

ddo.services[0].files = await ProviderInstance.encrypt(
		assetUrl,
		chainId,
		macOsProviderUrl || providerUrl
	);

If the templateIndex is 4
we need to remove the files object from the ddo service (actually we need to set it to empty string, not null, due to schema validations)
Like this

if(templateIndex === 4){ 
  ddo.services[0].files = ''
 } else ...

@jamiehewitt15
Copy link
Member Author

we need to remove the files object from the ddo service (actually we need to set it to empty string, not null, due to schema validations)

Ok, thanks for letting me know. I'll adjust that.

@jamiehewitt15
Copy link
Member Author

@paulo-ocean I've updated it to set the files as an empty string for template index 4. Let me know if it's alright and I'll merge this

@paulo-ocean
Copy link
Contributor

@paulo-ocean I've updated it to set the files as an empty string for template index 4. Let me know if it's alright and I'll merge this

go for it

@jamiehewitt15 jamiehewitt15 merged commit a124d39 into main Oct 16, 2024
3 checks passed
@jamiehewitt15 jamiehewitt15 deleted the issue-70-interactive-publish-flow branch October 16, 2024 07:21
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.

Create interactive publish function
4 participants