content icon indicating copy to clipboard operation
content copied to clipboard

Remove jinja2 from var file

Open RichardXuan opened this issue 6 months ago • 5 comments

Description:

  • Remove Jinja2 from var_network_filtering_service.var,var_mount_option_proc_hidepid.var,var_authselect_profile.var,var_audispd_remote_server.var

Rationale:

  • The reason to remove Jinja2 macros is because trestle-bot (and any other external solution processing CaC/content files) fails to process the files when there are Jinja2 macros on them. In the past we already tried to solve this problem by externally processing macros from rule.yml files but it proved to be very painful and we ended up extending the SSG library to introduce new functions that are more friendly for integration.

  • We could use a similar approach of extending the SSG for control files and variables. However, the macros in these files are minimal and the nature of these files doesn't require macros. There are already capabilities in the project to achieve the same outcome without macros. For example, profile selections for control files and new options for variables. Therefore, it is much cheaper and sustainable to remove the few existing macros from variables than extending SSG.

  • The removal of macros already happened in control files, but due to the lack of automated tests, new macros were introduced again. A long-term solution should include CI tests to avoid new macros to be included in variables and control files.

  • Fixes CPLYTM-811

Review Hints:

  • Pay attention change on var_network_filtering_service.var,var_mount_option_proc_hidepid.var,var_authselect_profile.var,var_audispd_remote_server.var

RichardXuan avatar Jun 13 '25 08:06 RichardXuan

https://mvnrepository.com/artifact/com.github.mcxtzhang/SwipeDelMenuLayout/V1.2.5 这是代码仓库地址

Dandelions-ky avatar Dec 19 '24 07:12 Dandelions-ky

V1.3.0也可以哦

GarbageCan1024 avatar Jan 07 '25 11:01 GarbageCan1024