You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Angela Schreiber (Jira)" <ji...@apache.org> on 2021/11/08 08:53:00 UTC

[jira] [Commented] (SLING-10136) Sling Repo Init: Add option to delete paths

    [ https://issues.apache.org/jira/browse/SLING-10136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17440294#comment-17440294 ] 

Angela Schreiber commented on SLING-10136:
------------------------------------------

[~kpauls], regarding 

{quote}
Overall, I'd be in favor of just providing a second DSL that is a superset of repoinit if we where to support more upgrade tasks. We could even keep it in the same bundle(s) - just effectively have it come from different sources like a different configuration or something so that it is clear they are different things. 
{quote}

given the fact that the existing repo-init already contains quite some operations that fall into the migration/upgrade scenario, it might be easier to provide a second DSL that is really a repo-init only language.... in other words: allow for the missing pieces in the existing _repoinit_ and rebrand it while at the same time introducing a subset or a new language that is just init and nothing else.... one that actually verifies that the precondition and postconditions of the init are actually met.... because this is a crucial part that IMHO is missing today.


> Sling Repo Init: Add option to delete paths
> -------------------------------------------
>
>                 Key: SLING-10136
>                 URL: https://issues.apache.org/jira/browse/SLING-10136
>             Project: Sling
>          Issue Type: New Feature
>          Components: Repoinit
>    Affects Versions: Repoinit Parser 1.6.4, Repoinit JCR 1.1.30
>            Reporter: Henry Kuijpers
>            Priority: Major
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> Given that we are able to create paths, it would also be beneficial to be able to delete paths as well. 
> In our case, we're migrating a legacy setup to Sling Repo Init, where there are some "leftover" nodes in the instances. Given that Sling Repo Init is an "admin" way to initialize a repo, it would be very nice if delete statements could be supported.
> In our case, we would want to delete /apps/foundation, for example, because historically there seem to have been modifications made there.
> This mandates for a simple syntax like "delete path /apps/foundation" being supported.
> Another case is that we would like to cleanup /apps/cq, however, there are some nodes that are maintained by the product (in our case AEM), such as /apps/cq/xssprotection and also /apps/cq/core/content/nav/tools. 
> This mandates for a slightly more complicated syntax such as "delete path /apps/cq (!/xssprotection,!/core/content/nav/tools,*)", however, I would be fine with multiple delete path statements as well, for that usecase.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)