Skip to content

feat!: mount function for injecting aditional files into the workspace#163

Open
Power-el-Tanke wants to merge 2 commits into
harmont-dev:mainfrom
Power-el-Tanke:feat/mount
Open

feat!: mount function for injecting aditional files into the workspace#163
Power-el-Tanke wants to merge 2 commits into
harmont-dev:mainfrom
Power-el-Tanke:feat/mount

Conversation

@Power-el-Tanke

@Power-el-Tanke Power-el-Tanke commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Introduces the mount abstraction for injecting files into the pipeline workspace. This PR modifies the IR by modifying the Step's schema. The cmd and env fields are removed, instead, the action is introduced and accepts a field of the type StepAction, which is an union of Command (a structure that carries the 2 mentioned removed fields) and Mount (which has the source and destination paths of a mount).

It can be used in 2 ways:

import harmont as hm
# From a Step object
hm.scratch().mount(from_="../path/to/inject", to=path/inside/the/workspace")

# As a plain function
hm.mount(from_="../path/to/inject", to="path/inside/the/workspace")

Both source and destination should be relative to the workspace's path. The destination file/directory should exists unless you set the strictkwarg to False (defaults to True).

Tests

Most of the tests (and only the tests) were modified with the help of an LLM to fit with the new schema. All were human reviewed. An integration test was handwritten in crates/hm/tests/local_e2e.rs for the new feature. There is also the crates/hm-dsl-engine/harmont-py/tests/tests_step_mount.py file for the python side.

Minor changes:

  • docker backed is able to inject singular files

@Power-el-Tanke Power-el-Tanke changed the title feat: mount function for injecting aditional files into the workspace feat!: mount function for injecting aditional files into the workspace Jul 8, 2026
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.

1 participant