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

Fixes for issues #1000 and #1002 #1005

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Fixes for issues #1000 and #1002 #1005

wants to merge 10 commits into from

Conversation

av1ctor
Copy link

@av1ctor av1ctor commented Sep 5, 2024

Fixes for issues #1000 and #1002

@TillaTheHun0
Copy link
Member

Thanks @av1ctor

I addressed some of these issues in #1004. You may want to rebase your branch onto main so that you can get those changes. Your conflicts should be resolved and your PR should end to be much smaller as a result.

Also, there's no need to manually bump version numbers, as that is done using CI.

@av1ctor
Copy link
Author

av1ctor commented Sep 5, 2024

@TillaTheHun0 Ok, I merged the PR with your changes. Thanks!

Copy link
Member

@TillaTheHun0 TillaTheHun0 left a comment

Choose a reason for hiding this comment

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

Thank you!

There a couple of things that don't belong in this PR that I recommend removing entirely, or moving to a separate PR.

There's also a couple things missing from adding scheduler as an option on the CLI (thank for this btw, it seems to be almost there)

@@ -12,5 +14,7 @@ export const AoModuleTags = [
DEFAULT_INPUT_ENCODING_TAG,
DEFAULT_OUTPUT_ENCODING_TAG,
DEFAULT_VARIANT_TAG,
DEFAULT_MEMORY_LIMIT_TAG,
DEFAULT_COMPUTE_LIMIT_TAG,
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be in this PR. There needs to be internal discussion on if there should even be defaults for this or if it should be derived from the build flags used to produce the wasm binary (see #983)

Let's keep this PR small and focused on only the issues highlighted in the issues it claims to address.

Comment on lines +22 to +25
.usage('-l c <my-project-name>')
.option(
'-l, --lang <language:string>',
'The starter to use. Defaults to Lua. Options are "lua" and "cpp"'
'The starter to use. Defaults to Lua. Options are "lua" and "c"'
Copy link
Member

Choose a reason for hiding this comment

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

This should not be in this PR. If anything, it should be a separate issue and PR, so that our team can look at it, by itself.

@@ -165,12 +165,13 @@ export const uploadModuleWith =
*/
export const spawnProcessWith =
({ walletExists, readWallet, create }) =>
async ({ walletPath, module, tags }) => {
async ({ walletPath, module, scheduler, tags }) => {
if (!(await walletExists(walletPath))) throw new WalletNotFoundError()

const wallet = await readWallet(walletPath)
const res = await create({
Copy link
Member

Choose a reason for hiding this comment

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

create in ao-spawn.js needs to be updated to accept scheduler field on the argument.

function schedulerArgs (src) {
return [
'-e',
`SCHEDULER_ADDRESS=${src}`
Copy link
Member

Choose a reason for hiding this comment

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

I don't see where this is used in ao-spawn.js. I would suspect that it would be mapped to scheduler when calling uploadAoProcess, similar to WALLET_PATH and MODULE_TX

Comment on lines +61 to +65
.option(
'-s, --scheduler <address:string>',
'the ao scheduler address',
{ required: true }
)
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

Comment on lines +16 to +17
"warp-arbundles": "^1.0.4",
"wasm-metering": "permaweb/wasm-metering#v0.2.2"
Copy link
Member

Choose a reason for hiding this comment

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

Not sure what this is about. Can it be removed?

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.

2 participants