Skip to content

Various fixes around ascp file source#21372

Merged
mvdbeek merged 2 commits intogalaxyproject:devfrom
mvdbeek:debug_ascp
Dec 1, 2025
Merged

Various fixes around ascp file source#21372
mvdbeek merged 2 commits intogalaxyproject:devfrom
mvdbeek:debug_ascp

Conversation

@mvdbeek
Copy link
Copy Markdown
Member

@mvdbeek mvdbeek commented Dec 1, 2025

  • Add an ascp handler to the frontend, so users can paste ascp:// urls
  • Add ssh key passphrase config option, without this downloads hang waiting for password
  • Bypass is_dir / is_file checks, they'll always fail. We assume files for now.
  • Implement top-level get_file. _get_file would require implementing get_info which doesn't really make sense for this file source.

Deployments will likely require a layout that contains

bin/ascp
etc/aspera-license

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

- Add an ascp handler to the frontend, so users can paste ascp:// urls
- Add ssh key passphrase config option, without this downloads hang
  waiting for password
- Bypass is_dir / is_file checks, they'll always fail. We assume files
  for now.
- Implement top-level get_file. `_get_file` would require implementing
  `get_info` which doesn't really make sense for this file source.
Comment thread lib/galaxy/files/sources/ascp_fsspec.py Outdated
log.debug(f"Executing ascp command (key path hidden): {self._sanitize_cmd_for_log(cmd)}")

env = os.environ.copy()
env["ASPERA_SCP_PASS"] = self.ssh_key_passphrase
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this actually required in general though or just for this service? This seems wrong to me in general.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

wrong in which way ? config file or env var are the only ways that this can be set afaict, https://www.ibm.com/docs/en/ahte/4.3.0?topic=line-ascp-command-reference

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah, you mean is this only required for ENA ? I think this depends on which server you're connecting to ... i suppose we could make it optional again ?

@@ -660,7 +669,7 @@ def test_ssh_key_as_content(self):
with patch("os.fdopen"):
with patch("os.chmod"):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I did not see these unit tests when I reviewed the other PR 😭 - this is on me. I would remove basically most of them - they aren't testing integration at all - they have created a parallel set of mocks to mock everything interesting the plugin is doing right - this hurts maintenance not helps it? Maybe there is utility in the testing like say "test_missing_ascp_binary" but these heavily mocked out things are not something we want in the code base IMO.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yep, i agree. I think the only interesting thing we can do is make sure we build the right command line

@mvdbeek mvdbeek merged commit 2a4806b into galaxyproject:dev Dec 1, 2025
58 of 64 checks passed
@mvdbeek
Copy link
Copy Markdown
Member Author

mvdbeek commented Dec 1, 2025

Thanks for the quick review @jmchilton!

@galaxyproject galaxyproject deleted a comment from github-actions Bot Dec 1, 2025
@nsoranzo nsoranzo deleted the debug_ascp branch December 1, 2025 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants