Skip to content

Conversation

@1yam
Copy link
Member

@1yam 1yam commented Nov 13, 2025

In aleph instance create:


This comparaison is wrong since crn is only used when finding a specific crn on the crn list:
and crn_info is set
crn_info = CRNInfo.from_unsanitized_input(crn)

So we should only ensure crn_info is set but not crn, since if we select a crn using the UI crn_url and crn_hash is None and crn is then None

Changes

This pull request makes small adjustments to the logic for determining pricing entities and requirements when creating an instance in src/aleph_client/commands/instance/__init__.py. The changes simplify conditional checks and improve code clarity.

Pricing entity selection:

  • The conditional logic for selecting the correct PricingEntity based on GPU and premium options has been refactored for improved readability.

Requirements initialization:

  • The check for initializing requirements and related variables now only depends on crn_info instead of both crn and crn_info, streamlining the condition.

How to test

create a payg or credit or confidential instance

@1yam 1yam requested a review from nesitor November 13, 2025 20:58
@aleph-im aleph-im deleted a comment from github-actions bot Nov 13, 2025
@nesitor nesitor merged commit 25b31ef into master Nov 13, 2025
15 checks passed
@nesitor nesitor deleted the 1yam-fix-instance-create-missing-node-hash branch November 13, 2025 21:22
nesitor added a commit that referenced this pull request Nov 27, 2025
* Problem: Ledger wallet users cannot use Aleph to send transactions.

Solution: Implement Ledger use on CLI to allow using them. Do it importing a specific branch of the SDK.

* Fix: Solve code quality issues.

* Fix: Solve issue loading the good configuration.

* Fix: Solved definitively the wallet selection issue and also solved another issue fetching instances from scheduler.

* Fix: Solved code-quality issue.

* Feature: cli load_account to handle account selections

* Fix: using load_account instead of _load_account

* fix: unit test mock

* Feature: aleph account init to create based config for new user using ledger

* fix: aleph account list now handle ledger device

* fix: aleph account address now handle ledger device

* fix: aleph account export-private-key handle ledger case (can't export private key)

* Feature: missing unit test for ledger

* fix: Update aleph.im & twentysix to aleph.cloud (#414)

Update broken doc links and references to old brand names (aleph.im, twentysix.cloud) to aleph.cloud

* Fix: handle common error using ledger (OsError / LedgerError)

* Fix: handle change from account on sdk side

* Fix: remove init commands and ensure that config file/folder and subfolder are created

* Fix: AccountLike renamed to AccountTypes

* fix: AlephAccount should bez AccountTypes

* fix: account init commands unit test should be removed since not usefull anymore

* Fix: use arguments instead of get_closest_tier (#416)

* Fix: use arguments instead of get_closest_tier

* Fix: ensure that hold can't use --vcpus or --memory or --rootfs_size upper than tier limit

* fix: wrong display of vcpus on pricing display

* Fix: instance create crn is none when when giving --crn-hash or --crn… (#417)

* Fix: instance create crn is none when when giving --crn-hash or --crn-url

* fix: linting

* Feature: utils functions for ledger

* Fix: ensure ledger is connected before loading ledger account

* Fix: avoid connecting to ledger when not needed

* Fix: use BaseEthAccount instead of EthAccount in instance create and prefetch crn list

* fix: refactor aleph account configure and list to handle ledger

* Fix: call_program_crn_list can now filter node when fetching if they active or not

* Fix: unit test

* Feature: --no args for aleph account configure

* fix: linting issue

* Feature: load acount unit test

* Feature: ledger can be load from derivation path

* Unit: test_aggregate.py for ledger

* Unit: new tests for utils func around ledger (wait_for_ledger_connection, ...)

* Unit: new tests for non interactive account config

* Problem: Ledger wallet users cannot use Aleph to send transactions.

Solution: Implement Ledger use on CLI to allow using them. Do it importing a specific branch of the SDK.

* Fix: Solve code quality issues.

* Fix: Solve issue loading the good configuration.

* Fix: Solved definitively the wallet selection issue and also solved another issue fetching instances from scheduler.

* Fix: Solved code-quality issue.

* Feature: cli load_account to handle account selections

* Fix: using load_account instead of _load_account

* fix: unit test mock

* Feature: aleph account init to create based config for new user using ledger

* fix: aleph account list now handle ledger device

* fix: aleph account address now handle ledger device

* fix: aleph account export-private-key handle ledger case (can't export private key)

* Feature: missing unit test for ledger

* Fix: handle common error using ledger (OsError / LedgerError)

* Fix: handle change from account on sdk side

* Fix: remove init commands and ensure that config file/folder and subfolder are created

* Fix: AccountLike renamed to AccountTypes

* fix: AlephAccount should bez AccountTypes

* fix: account init commands unit test should be removed since not usefull anymore

* Feature: utils functions for ledger

* Fix: ensure ledger is connected before loading ledger account

* Fix: avoid connecting to ledger when not needed

* Fix: use BaseEthAccount instead of EthAccount in instance create and prefetch crn list

* fix: refactor aleph account configure and list to handle ledger

* Fix: call_program_crn_list can now filter node when fetching if they active or not

* Fix: unit test

* Feature: --no args for aleph account configure

* fix: linting issue

* Feature: load acount unit test

* Feature: ledger can be load from derivation path

* Unit: test_aggregate.py for ledger

* Unit: new tests for utils func around ledger (wait_for_ledger_connection, ...)

* Unit: new tests for non interactive account config

* fix: allow user to specify how many ledger account they want to load (default: 5)

* fix: use the already existing args chain to load_account

* fix: lint issue

* Refactor: remove code duplication

* Fix: aggregate unit test

* Fix: non-evm account couldn't be used using --private-key or --private-key-file

* fix: rename --no of configure commands to --non-it

* fix: non interactive args for aleph account config is --non-it not --no

* Fix: allow user to increase number of ledger account fetch using aleph account configure --ledger-count

---------

Co-authored-by: Andres D. Molins <nesitor@gmail.com>
Co-authored-by: 1yam <lyam.gomes@epitech.eu>
Co-authored-by: Reza Rahemtola <49811529+RezaRahemtola@users.noreply.github.com>
Co-authored-by: 1yam <40899431+1yam@users.noreply.github.com>
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