Unable to create a Renku project from a custom Renku template and a specific commit

Hello,

Here is the link to the public Gitlab project on renkulab.io : AMMO -template

Creating a new Renku project using the above as a Custom Template source (see screenshot below) works as expected with the following commit AMMO - 824b8daa but surprisingly not with the next commit AMMO - 8fe97f416 !

Creating a new Renku project AMMO - 8fe97f416 results in

image

It is all the more surprising given that the only difference between the subsequent commits (824b8daa and 8fe97f416) seems to be the addition of two .ipnyb files !

Any insight into this unexpected behavior is appreciated, thanks.

Hello @champost,

Thanks for reaching to us and reporting this!

There is a bug in the template rendering code that doesn’t consider cases where a file doesn’t have a valid template format. Unfortunately, there is no workaround for this problem except from removing the file that causes this error: ammo_project_files/notebooks/Week09/Week 09 (AMMO) solution.ipynb.

I’ll create a bug report to fix this problem ASAP as it can be blocking for many users.

Kind regards,
Mohammad

Hello @mohammad-sdsc,

I am curios, what exactly is “a valid template format” ?
And why is only ammo_project_files/notebooks/Week09/Week 09 (AMMO) solution.ipynb creating a problem (as similar .ipynb files have been added in previous commits too) ?

Maybe linking the bug report or Github issue here would be enough…

Thanks !

I meant Jinja template format (and not Renku template). Please see the bug report for a bit of more context: Crash when rendering template fails during project creation · Issue #3696 · SwissDataScienceCenter/renku-python · GitHub

And why is only ammo_project_files/notebooks/Week09/Week 09 (AMMO) solution.ipynb creating a problem (as similar .ipynb files have been added in previous commits too) ?

I couldn’t find what’s the problem with this file that causes this error. Anyways, it’s best not to depend on the file content to be valid when creating a project.

@mohammad-sdsc
I am afraid I didn’t quite follow why Renku was unable to render some .ipynb files as Jinja templates in one specific commit (e.g. 8fe97f41) and encountered no problem with similar files in another commit (e.g. 824b8daa).

In any case, I see that issue #3696 is now closed so is it supposed to work now ?

The file has some sequence of characters that seems to cause this error (I couldn’t detect what is the sequence). The reason that it doesn’t happen in a previous commit is that the file that causes this error doesn’t exist in that commit.

We will make a 2.9.2 release today that includes the fix to this problem. We cannot fix the issue automatically; what we provide is an --ignore-template-errors flag that allows the users to ignore template render errors. So you can create the project and the file with error will be copied as is to the project (won’t be rendered).

Hope this helps!

1 Like

@mohammad-sdsc

If I understood this correctly, I should now be able to create a fresh renku project on renkulab.io using my Custom Template source i.e. without resorting to any renku command line flags ?

No, this is only in the command-line. If project creation fails on renkulab you should do this and then push your project. Renkulab hasn’t implemented this feature yet.

1 Like