Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Detect changes in SlingPipes and UserPreferencesUpgradeAction #24

Open
nc-andreashaller opened this issue May 15, 2017 · 1 comment
Open

Comments

@nc-andreashaller
Copy link
Collaborator

nc-andreashaller commented May 15, 2017

For groovy scripts we implemented a MD5 hash mechanism to detect changes in a file and decide when to re-run it. This functionality has yet to be implemented for Sling Pipes. The empty String parameter of the constructor call has to be replaced by an proper hash of the configuration:

public SlingPipe(Resource resource, Phase defaultPhase) {
    super(resource.getName(), UpgradeAction.getPhaseFromPrefix(defaultPhase, resource.getName()), "");
...

The same is relevant for UserPreferencesUpgradeAction

@nc-andreashaller nc-andreashaller changed the title Detect changes in Sling Pipes Detect changes in SlingPipes and UserPreferencesUpgradeAction May 15, 2017
@nc-andreashaller
Copy link
Collaborator Author

org.apache.sling.commons.json.jcr.JsonItemWriter could be a possibility to serialise and hash the configurations.

otarsko added a commit to otarsko/vault-upgrade-hook that referenced this issue Oct 18, 2017
otarsko added a commit to otarsko/vault-upgrade-hook that referenced this issue Oct 18, 2017
otarsko added a commit to otarsko/vault-upgrade-hook that referenced this issue Oct 25, 2017
otarsko added a commit to otarsko/vault-upgrade-hook that referenced this issue Oct 25, 2017
otarsko added a commit to otarsko/vault-upgrade-hook that referenced this issue Oct 26, 2017
# Conflicts:
#	vault-upgrade-hook/pom.xml
nc-andreashaller added a commit that referenced this issue Oct 26, 2017
#24: generate md5 hash for Sling Pipes and User Preferences Upgrade u…
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant