Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose runmode specificity and incorporate jcrinstall prioritization for SlingInstallable interface #84

Open
adamcin opened this issue Sep 26, 2020 · 0 comments

Comments

@adamcin
Copy link
Owner

adamcin commented Sep 26, 2020

Sling Simulation should be able to incorporate the concept of jcrinstall runmode specificity and handle prioritization so that the ProgressCheck events are only fired for introductions of a given resource identity that share the highest calculated priority at the beginning of the dequeue loop, or that match or exceed the previously installed priority in subsequent iterations of the dequeue loop.

See description of runmode folder name logic.

Run Mode Support

The JCR installer supports run modes for installing artifacts. By default folders named install are checked for artifacts. If Apache Sling is started with one (or more run modes), all folders named install.[RUNMODE] are scanned as well. To be precise, the folder name can be followed by any number of run modes separated by dot (.). For example, if started with run modes dev, a1, and public, folders like install.dev, install.a1, install.public are searched as well as install.dev.a1, or install.a1.dev.

Since version 3.3.0 of the JCR Installer bundle (SLING-9031 and SLING-8548) advanced run mode support has been added, so that folder names in the form install.[RUNMODESPEC] are supported. RUNMODESPEC is defined in Sling Settings.

Artifacts from folders with a run mode get a higher priority. For example by default, an install folder underneath /libs gets the priority 50. For each matching run mode in the folder name, this priority is increased by 1, so install.dev has 51 and install.a1.dev has 52.
Run Mode Spec

Since version 1.4.0 (SLING-9031 and SLING-8548) of the Sling Settings bundle there is support for checking a run mode spec against the currently active run modes.

The run mode spec grammar is as follows

run mode spec ::= disjunctions
disjunctions ::= conjunctions { "," conjunctions }
conjunctions ::= conjunction { '.' conjunction }
conjunction ::= notrunmode | runmode
notrunmode ::= '-' runmode

It supports OR (,) and AND (.) combinations of run modes and negations with - .

Programmatically this can be used via SlingSettings.getBestRunModeMatchCountFromSpec(String runModeSpec).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant