Re-running a rose app

Hi there, we have implemented rose apps which checkout and build each of the tools we need in our workflow. What we can’t figure out is how re-launch a build that has failed.

The task that does the builds is:

[[ build<build> ]]
    platform = belenos_login
    inherit = FAMBUILD
    script = rose task-run --app-key ${CYLC_TASK_PARAM_build}

where build = nemosam, mroa, bias, tep defined as a task parameter

It checks out in work/$CYLC_TASK_CYCLE_POINT/build<build>

If the task fails, we fix and we update with cylc vr

However, if we trigger the task again it fails because the directory work/$CYLC_TASK_CYCLE_POINT/build already exists.

It seems to me we’re missing something somewhere. Maybe we need to cleanup the dir ourselves?

Thanx!

I guess adding -N to the command does the trick :grinning_face:

1 Like

The -N option will delete all of the the files in work/$CYLC_TASK_CYCLE_POINT/build.

The other option is to write the app such that it is able to run incrementally, i.e. write it to tolerate the directory already existing. Some incremental build tools may make use of this.

1 Like

Good evening,
A bit on the same topic: We are specifying path names with absolute paths like

[file:${BLD_HOME}/bias]
source=git:git@gitlab.mercator-ocean.fr:olegallou/bias::./::${BIAS_TAG}

With BLD_HOME an absolute path.

Would the -N option able to delete the repo, before a second git clone? (Because I have the impression it does not work like this, and I need to do something different…)

Best,
Stella

Sorry, no - the -N option only removes files in $PWD when the command is run

Hi David,
Thanks for you reply!

How do you ensure that a file/folder created with an absolute path overwrites old ones if present? I mean, it looks like a pretty basic feature to me (or I am not understanding something?).

Stella

Sorry, I’m not aware of any way to do that with Rose at present. If you install to $PWD then the -N option will work. So, perhaps you could install to [file:bias] and then rsync or symlink that to ${BLD_HOME}/bias?