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

install incrementally #152

Open
oliver-sanders opened this issue Jul 22, 2022 · 0 comments
Open

install incrementally #152

oliver-sanders opened this issue Jul 22, 2022 · 0 comments
Milestone

Comments

@oliver-sanders
Copy link
Member

oliver-sanders commented Jul 22, 2022

Because cylc install uses rsync --delete any files installed by metomi-rose file install (i.e. [file:...]) are deleted by cylc install, then re-created by cylc-rose via the post-install hook.

This is functionally ok but really inefficient. We should get fileinstall working in an incremental way (as it used to in Rose 2019).

This would involve getting cylc-rose to send back a list of the files it manages to cylc install before installation (i.e via a pre-install hook?) which cylc install would then add to .cylcignore (but without modifying the copy in the source dir please!).

Here's an example of how this could look:

# psudopython
# ask the pre_install plugin for a list of excluded files
ret = pre_install(src_dir, run_dir)

# add these to the .cylcignore in a temporary file
with TemporaryFile as temp_file:
    temp_file.write(cylc_ignore.read())
    temp_file.write('\n' + '\n'.join(ret['excluded_paths']))

# pass this temporary file to rsync
install_command = ['rsync', '--exclude-file', temp_file]

If Rose does/could support a dry-mode then this could also close #149

Pull requests welcome!

@oliver-sanders oliver-sanders added this to the 1.x milestone Jul 22, 2022
@oliver-sanders oliver-sanders modified the milestones: 1.2.0, 1.3.0 Dec 7, 2022
@oliver-sanders oliver-sanders modified the milestones: 1.3.0, 1.4.0 Jul 17, 2023
@oliver-sanders oliver-sanders modified the milestones: 1.4.0, 1.5.0 Apr 23, 2024
@oliver-sanders oliver-sanders modified the milestones: 1.5.0, 1.6.0 Dec 3, 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

No branches or pull requests

1 participant