You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2012/10/01 15:11:07 UTC
[jira] [Created] (SLING-2612) Installer needs "install rules" to
make certain operations optional
Bertrand Delacretaz created SLING-2612:
------------------------------------------
Summary: Installer needs "install rules" to make certain operations optional
Key: SLING-2612
URL: https://issues.apache.org/jira/browse/SLING-2612
Project: Sling
Issue Type: Improvement
Components: Installer
Affects Versions: Installer Core 3.3.8
Reporter: Bertrand Delacretaz
The installer currently executes all its operations without checking if they make sense in the current environment, we need more granularity for a few use cases like the ones below.
1) SLING-2569: do not install some bundles depending on their headers and the current environment.
2) Depending on the current state of the world, a ResourceTransformer needs to behave differently. For example, do not activate a RegisteredResource that contains demo content, but just upload it to the content repository.
Note that just ignoring resources would not cover case 2), where the "upload" operation happens but not the "activate" operation.
We might use a new InstallRule interface for that, something like:
// Service that provides a specific rule
public interface InstallRule {
public boolean shouldExecute(String operation, RegisteredResource r);
}
The installer can then have a master InstallRule that queries all InstallRule services in sequence (ordered by service ranking) and ANDs the results.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2612) Add support for excluding artifacts
for installation
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467570#comment-13467570 ]
Carsten Ziegeler commented on SLING-2612:
-----------------------------------------
I've committed a first version which adds two attributes: one to add a comment and one to add an exclusion comment. If the later is set, the artifact is assumed to be excluded.
The web console will display both and also display an excluded artifact as "EXCLUDED" instead of "INSTALLED"
> Add support for excluding artifacts for installation
> ----------------------------------------------------
>
> Key: SLING-2612
> URL: https://issues.apache.org/jira/browse/SLING-2612
> Project: Sling
> Issue Type: Improvement
> Components: Installer
> Affects Versions: Installer Core 3.3.8
> Reporter: Bertrand Delacretaz
> Assignee: Carsten Ziegeler
>
> The installer currently executes all its operations without checking if they make sense in the current environment, we need more granularity for a few use cases like the ones below.
> 1) SLING-2569: do not install some bundles depending on their headers and the current environment.
> 2) Depending on the current state of the world, a ResourceTransformer needs to behave differently. For example, do not activate a RegisteredResource that contains demo content, but just upload it to the content repository.
> Note that just ignoring resources would not cover case 2), where the "upload" operation happens but not the "activate" operation.
> We might use a new InstallRule interface for that, something like:
> // Service that provides a specific rule
> public interface InstallRule {
> public boolean shouldExecute(String operation, RegisteredResource r);
> }
> The installer can then have a master InstallRule that queries all InstallRule services in sequence (ordered by service ranking) and ANDs the results.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2612) Add support for excluding artifacts
for installation
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467586#comment-13467586 ]
Carsten Ziegeler commented on SLING-2612:
-----------------------------------------
Looks good, I modified it a little bit more and also added code to clear those attributes once the artifact is not in the installed state anymore
> Add support for excluding artifacts for installation
> ----------------------------------------------------
>
> Key: SLING-2612
> URL: https://issues.apache.org/jira/browse/SLING-2612
> Project: Sling
> Issue Type: Improvement
> Components: Installer
> Affects Versions: Installer Core 3.3.8
> Reporter: Bertrand Delacretaz
> Assignee: Carsten Ziegeler
>
> The installer currently executes all its operations without checking if they make sense in the current environment, we need more granularity for a few use cases like the ones below.
> 1) SLING-2569: do not install some bundles depending on their headers and the current environment.
> 2) Depending on the current state of the world, a ResourceTransformer needs to behave differently. For example, do not activate a RegisteredResource that contains demo content, but just upload it to the content repository.
> Note that just ignoring resources would not cover case 2), where the "upload" operation happens but not the "activate" operation.
> We might use a new InstallRule interface for that, something like:
> // Service that provides a specific rule
> public interface InstallRule {
> public boolean shouldExecute(String operation, RegisteredResource r);
> }
> The installer can then have a master InstallRule that queries all InstallRule services in sequence (ordered by service ranking) and ANDs the results.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2612) Installer needs "install rules" to
make certain operations optional
Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467537#comment-13467537 ]
Bertrand Delacretaz commented on SLING-2612:
--------------------------------------------
Ok, and then mention in the ResourceState's javadoc that INSTALLED can actually mean something slightly different.
How about naming the additional attribute "installComments"? That makes it clear that the InstallTaskFactory can add whatever comments makes sense in that attribute, to explain what actually happened.
> Installer needs "install rules" to make certain operations optional
> -------------------------------------------------------------------
>
> Key: SLING-2612
> URL: https://issues.apache.org/jira/browse/SLING-2612
> Project: Sling
> Issue Type: Improvement
> Components: Installer
> Affects Versions: Installer Core 3.3.8
> Reporter: Bertrand Delacretaz
> Assignee: Carsten Ziegeler
>
> The installer currently executes all its operations without checking if they make sense in the current environment, we need more granularity for a few use cases like the ones below.
> 1) SLING-2569: do not install some bundles depending on their headers and the current environment.
> 2) Depending on the current state of the world, a ResourceTransformer needs to behave differently. For example, do not activate a RegisteredResource that contains demo content, but just upload it to the content repository.
> Note that just ignoring resources would not cover case 2), where the "upload" operation happens but not the "activate" operation.
> We might use a new InstallRule interface for that, something like:
> // Service that provides a specific rule
> public interface InstallRule {
> public boolean shouldExecute(String operation, RegisteredResource r);
> }
> The installer can then have a master InstallRule that queries all InstallRule services in sequence (ordered by service ranking) and ANDs the results.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2612) Installer needs "install rules" to
make certain operations optional
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467487#comment-13467487 ]
Carsten Ziegeler commented on SLING-2612:
-----------------------------------------
I think the service way (InstallRule) doesn't work as at the point of installation the required InstallRule service might not be available.
Although I would like to have this pluggable, I think we need to code this separately for each InstallTaskFactory (not ResourceTransformer).
I first thought of adding a new state to ResourceState which indicates that this resource is processed by actually not installed because of a matching rule. However this would require major changes to the core of the installer and also in some cases to the plugins as they currently don't expect such a new state.
Therefore I think, if a task installer factory decides to not install an artifact, it just sets the state to "INSTALLED". This ensures that we don't have to change any resource handling in the core and this use case works out of the box.
The only disadvantage is that the artifact is marked as "installed" although it is not. I think we should simply add a well defined attribute which contains additional information. So in the case of not installing, the factory sets the resource as installed and adds something to this attribute. This can then be evaluated/displayed.
> Installer needs "install rules" to make certain operations optional
> -------------------------------------------------------------------
>
> Key: SLING-2612
> URL: https://issues.apache.org/jira/browse/SLING-2612
> Project: Sling
> Issue Type: Improvement
> Components: Installer
> Affects Versions: Installer Core 3.3.8
> Reporter: Bertrand Delacretaz
>
> The installer currently executes all its operations without checking if they make sense in the current environment, we need more granularity for a few use cases like the ones below.
> 1) SLING-2569: do not install some bundles depending on their headers and the current environment.
> 2) Depending on the current state of the world, a ResourceTransformer needs to behave differently. For example, do not activate a RegisteredResource that contains demo content, but just upload it to the content repository.
> Note that just ignoring resources would not cover case 2), where the "upload" operation happens but not the "activate" operation.
> We might use a new InstallRule interface for that, something like:
> // Service that provides a specific rule
> public interface InstallRule {
> public boolean shouldExecute(String operation, RegisteredResource r);
> }
> The installer can then have a master InstallRule that queries all InstallRule services in sequence (ordered by service ranking) and ANDs the results.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (SLING-2612) Add support for excluding artifacts
for installation
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved SLING-2612.
-------------------------------------
Resolution: Fixed
Fix Version/s: Installer API 1.0.0
Installer Console 1.0.0
Installer Core 3.4.0
> Add support for excluding artifacts for installation
> ----------------------------------------------------
>
> Key: SLING-2612
> URL: https://issues.apache.org/jira/browse/SLING-2612
> Project: Sling
> Issue Type: Improvement
> Components: Installer
> Affects Versions: Installer Core 3.3.8
> Reporter: Bertrand Delacretaz
> Assignee: Carsten Ziegeler
> Fix For: Installer Core 3.4.0, Installer Console 1.0.0, Installer API 1.0.0
>
>
> The installer currently executes all its operations without checking if they make sense in the current environment, we need more granularity for a few use cases like the ones below.
> 1) SLING-2569: do not install some bundles depending on their headers and the current environment.
> 2) Depending on the current state of the world, a ResourceTransformer needs to behave differently. For example, do not activate a RegisteredResource that contains demo content, but just upload it to the content repository.
> Note that just ignoring resources would not cover case 2), where the "upload" operation happens but not the "activate" operation.
> We might use a new InstallRule interface for that, something like:
> // Service that provides a specific rule
> public interface InstallRule {
> public boolean shouldExecute(String operation, RegisteredResource r);
> }
> The installer can then have a master InstallRule that queries all InstallRule services in sequence (ordered by service ranking) and ANDs the results.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (SLING-2612) Installer needs "install rules" to
make certain operations optional
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler reassigned SLING-2612:
---------------------------------------
Assignee: Carsten Ziegeler
> Installer needs "install rules" to make certain operations optional
> -------------------------------------------------------------------
>
> Key: SLING-2612
> URL: https://issues.apache.org/jira/browse/SLING-2612
> Project: Sling
> Issue Type: Improvement
> Components: Installer
> Affects Versions: Installer Core 3.3.8
> Reporter: Bertrand Delacretaz
> Assignee: Carsten Ziegeler
>
> The installer currently executes all its operations without checking if they make sense in the current environment, we need more granularity for a few use cases like the ones below.
> 1) SLING-2569: do not install some bundles depending on their headers and the current environment.
> 2) Depending on the current state of the world, a ResourceTransformer needs to behave differently. For example, do not activate a RegisteredResource that contains demo content, but just upload it to the content repository.
> Note that just ignoring resources would not cover case 2), where the "upload" operation happens but not the "activate" operation.
> We might use a new InstallRule interface for that, something like:
> // Service that provides a specific rule
> public interface InstallRule {
> public boolean shouldExecute(String operation, RegisteredResource r);
> }
> The installer can then have a master InstallRule that queries all InstallRule services in sequence (ordered by service ranking) and ANDs the results.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (SLING-2612) Add support for excluding artifacts
for installation
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler closed SLING-2612.
-----------------------------------
> Add support for excluding artifacts for installation
> ----------------------------------------------------
>
> Key: SLING-2612
> URL: https://issues.apache.org/jira/browse/SLING-2612
> Project: Sling
> Issue Type: Improvement
> Components: Installer
> Affects Versions: Installer Core 3.3.8
> Reporter: Bertrand Delacretaz
> Assignee: Carsten Ziegeler
> Fix For: Installer Core 3.4.0, Installer Console 1.0.0, Installer API 1.0.0
>
>
> The installer currently executes all its operations without checking if they make sense in the current environment, we need more granularity for a few use cases like the ones below.
> 1) SLING-2569: do not install some bundles depending on their headers and the current environment.
> 2) Depending on the current state of the world, a ResourceTransformer needs to behave differently. For example, do not activate a RegisteredResource that contains demo content, but just upload it to the content repository.
> Note that just ignoring resources would not cover case 2), where the "upload" operation happens but not the "activate" operation.
> We might use a new InstallRule interface for that, something like:
> // Service that provides a specific rule
> public interface InstallRule {
> public boolean shouldExecute(String operation, RegisteredResource r);
> }
> The installer can then have a master InstallRule that queries all InstallRule services in sequence (ordered by service ranking) and ANDs the results.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SLING-2612) Add support for excluding artifacts
for installation
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler updated SLING-2612:
------------------------------------
Summary: Add support for excluding artifacts for installation (was: Installer needs "install rules" to make certain operations optional)
> Add support for excluding artifacts for installation
> ----------------------------------------------------
>
> Key: SLING-2612
> URL: https://issues.apache.org/jira/browse/SLING-2612
> Project: Sling
> Issue Type: Improvement
> Components: Installer
> Affects Versions: Installer Core 3.3.8
> Reporter: Bertrand Delacretaz
> Assignee: Carsten Ziegeler
>
> The installer currently executes all its operations without checking if they make sense in the current environment, we need more granularity for a few use cases like the ones below.
> 1) SLING-2569: do not install some bundles depending on their headers and the current environment.
> 2) Depending on the current state of the world, a ResourceTransformer needs to behave differently. For example, do not activate a RegisteredResource that contains demo content, but just upload it to the content repository.
> Note that just ignoring resources would not cover case 2), where the "upload" operation happens but not the "activate" operation.
> We might use a new InstallRule interface for that, something like:
> // Service that provides a specific rule
> public interface InstallRule {
> public boolean shouldExecute(String operation, RegisteredResource r);
> }
> The installer can then have a master InstallRule that queries all InstallRule services in sequence (ordered by service ranking) and ANDs the results.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2612) Add support for excluding artifacts
for installation
Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467579#comment-13467579 ]
Bertrand Delacretaz commented on SLING-2612:
--------------------------------------------
Committed minor changes to OsgiInstallerWebConsolePlugin.java in revision 1392785, please cross-check.
> Add support for excluding artifacts for installation
> ----------------------------------------------------
>
> Key: SLING-2612
> URL: https://issues.apache.org/jira/browse/SLING-2612
> Project: Sling
> Issue Type: Improvement
> Components: Installer
> Affects Versions: Installer Core 3.3.8
> Reporter: Bertrand Delacretaz
> Assignee: Carsten Ziegeler
>
> The installer currently executes all its operations without checking if they make sense in the current environment, we need more granularity for a few use cases like the ones below.
> 1) SLING-2569: do not install some bundles depending on their headers and the current environment.
> 2) Depending on the current state of the world, a ResourceTransformer needs to behave differently. For example, do not activate a RegisteredResource that contains demo content, but just upload it to the content repository.
> Note that just ignoring resources would not cover case 2), where the "upload" operation happens but not the "activate" operation.
> We might use a new InstallRule interface for that, something like:
> // Service that provides a specific rule
> public interface InstallRule {
> public boolean shouldExecute(String operation, RegisteredResource r);
> }
> The installer can then have a master InstallRule that queries all InstallRule services in sequence (ordered by service ranking) and ANDs the results.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira