Skip to content

Conversation

@giovannipizzi
Copy link
Member

While one could simply do ssh loginname if the transport is ssh and the .ssh/config has been setup correctly, this might not always be the case, and this allows testing the goto functionality even when no calculations have been submitted yet, or when the last calculation submitted to the given computer was a long time ago and it would take a lot of time to find it (with also the possibility that the remote folder was deleted).

Note: I'm making the remotedir parameter optional. This is in principle backward-incompatible, in a sense (meaning that the new computer goto command will not work for external plugins that require this parameter. The rest will stil work - so it's not a real backward-incompatibility, only new functionality will not work and can be easily fixed).

If this is a problem, we can probably pass remotedir='.' which works at least with core.local, but I'm not sure if this will work all the times.

While one could simply do `ssh loginname` if the transport
is ssh and the .ssh/config has been setup correctly, this might
not always be the case, and this allows testing the `goto`
functionality even when no calculations have been submitted yet,
or when the last calculation submitted to the given computer
was a long time ago and it would take a lot of time to find it
(with also the possibility that the remote folder was deleted).
@giovannipizzi giovannipizzi requested a review from khsrali December 4, 2025 07:42
@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.60%. Comparing base (e79f0a4) to head (309bf43).

Files with missing lines Patch % Lines
src/aiida/cmdline/commands/cmd_computer.py 93.34% 1 Missing ⚠️
src/aiida/transports/plugins/ssh_async.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7124      +/-   ##
==========================================
+ Coverage   79.58%   79.60%   +0.02%     
==========================================
  Files         566      566              
  Lines       43520    43537      +17     
==========================================
+ Hits        34631    34653      +22     
+ Misses       8889     8884       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@khsrali khsrali left a comment

Choose a reason for hiding this comment

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

Thanks @giovannipizzi, all good! I'd also adopt the type signature (see the comment)

return self._safe_open_interval

def _gotocomputer_string(self, remotedir):
def _gotocomputer_string(self, remotedir=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def _gotocomputer_string(self, remotedir=None):
def _gotocomputer_string(self, remotedir: Optional[TransportPath] = None):

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