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

project templates aren't actually copied #2954

Closed
Tracked by #1245
johrstrom opened this issue Aug 9, 2023 · 4 comments · Fixed by #3031
Closed
Tracked by #1245

project templates aren't actually copied #2954

johrstrom opened this issue Aug 9, 2023 · 4 comments · Fixed by #3031
Milestone

Comments

@johrstrom
Copy link
Contributor

johrstrom commented Aug 9, 2023

The feature for project templates is still a bit incomplete. Although we can create a project from a template, I don't believe it actually does anything more than creating a project.

When creating a project from a template it should copy over several files, among them

  • any *.{sh,bash,slurm} files (etc here, there are a few other extentions)
  • the .ondemand/ directory

It should also exclude things like

  • log files
@johrstrom johrstrom mentioned this issue Aug 9, 2023
45 tasks
@osc-bot osc-bot added this to the Backlog milestone Aug 9, 2023
@abujeda
Copy link
Contributor

abujeda commented Sep 6, 2023

I have been playing with the templates and copying files. I started by looking at how batch connect sessions stage a nw interactive sessions based on the app that was selected. It executes an rsync command to copy the files and this was the base I was using.

Things I noticed:
1.- If there are scripts within the .ondemand folder in the template, these will be copied. The scripts configuration contain reference to files and folders with a full path. These will be problematic when copied from a template.

2.- Scripts also store cache values and execution history, these are problematic too.

3.- All of this can be fixed only copying files with a pattern as mentioned in the issue. I am just wondering if it will not be as useful as projects change quite a lot and trying to guess what files are useful will be difficult.

@johrstrom
Copy link
Contributor Author

Yea my guess is we need some sort of interface to specify what to copy. We can start with an initial phase of copying everything we have or can find, then add the capability to filter/specify what to copy. IDK what that looks like, but it's likely yaml, probably an extension of manifest.yml.

@abujeda
Copy link
Contributor

abujeda commented Sep 12, 2023

Created an implementation that copies all the files in the template: #3031

@johrstrom
Copy link
Contributor Author

Now that I think about it we may just be good with this. No need for a follow up to make it more complicated. These template directories are created & controlled by admins. So they should be able to remove log files or errant things they don't want copied.

Here's where we store OSC's templates for the current job composer. I.e., the project templates aren't say copied from an existing project that has log files and so on. It's basically a project that has no history/past executions.

https://github.com/OSC/osc-ood-config/tree/master/ondemand.osc.edu/apps/myjobs/templates

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 a pull request may close this issue.

3 participants