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

Refactor: instance list to handle PAYG instance #215

Closed
wants to merge 24 commits into from

Conversation

1yam
Copy link
Collaborator

@1yam 1yam commented Jun 19, 2024

Problem:
aleph instance list only handles the Hold method.

Solution:
Check the payment type and fetch api_url and ipv6 from /about/executions/list.

Changes:

  • Added logic to check if there is a payment associated with the message.
  • If there is no payment, the function fetches the VM details from the scheduler API.
  • If there is a payment, the function fetches the server URL and retrieves the ipv6 address from the node's execution list

Copy link

Failed to retrieve llama text: POST 504:

504 Gateway Time-out


The server didn't respond in time.

@1yam 1yam requested a review from MHHukiewitz June 19, 2024 17:01
@Psycojoker
Copy link
Collaborator

@1yam can you rebase this branch when you have some time plz? It conflicts with master now

except ClientResponseError:
return message.item_hash, "Not available (yet)"


async def _show_instances(messages: List[InstanceMessage]):
async def _show_instances(messages: List[InstanceMessage], node_list):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add some typing to node_list plz?

return await resp.json()


async def _get_ipv6_address(message: InstanceMessage, node_list) -> Tuple[str, str]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add some typing to node_list plz?

1yam and others added 22 commits June 28, 2024 17:37
The project still used `setup.py` and `setup.cfg`.

This branch:
1. Migrates to pyproject.toml and `hatch`.
2. Updates workflows accordingly.
3. Changes README from reStructuredText to the easier Markdown.
4. Updates dependencies.
Solution: Use `importlib.metadata.version` instead.
Issue: Previously, users were unable to create PAYG instances from the CLI using a CRN.

Solution: Implemented a prompt to ask users if they want to create a PAYG instance,
displaying a list of compatible CRNs after an asynchronous fetching of the information.

Co-authored-by: Hugo Herter <[email protected]>
Co-authored-by: Antonyjin <[email protected]>
@1yam
Copy link
Collaborator Author

1yam commented Jun 28, 2024

Clean PR : Here

@1yam 1yam closed this Jun 28, 2024
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