-
Notifications
You must be signed in to change notification settings - Fork 602
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
Include all nodes in the filter.xml #2045
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update the CHANGELOG.md file with this pull request. |
This obsoletes #2032 |
0f157e5
to
c3e3add
Compare
With this PR only the following issues are raised with the new filevault-package-maven-plugin
One is already tackled in https://issues.apache.org/jira/browse/JCRVLT-343 and all the other ones are contained in https://issues.apache.org/jira/browse/JCRVLT-372 |
Pull Request Test Coverage Report for Build 5002
💛 - Coveralls |
I strongly feel that original PR creators should be credited with their work, no matter how small. I would rather we merge #2032 to give credit to @geertsmichael. Giving credit where due promotes contribution. |
The PR from #2032 is unfortunately not correct, i.e. it will neither import the readme.txt below /var/acs-commons/on-deploy-scripts-status nor does it fix some other remaining issues. But I will give credits to @geertsmichael by adding a co-authored-by trailer with his email in my commit. |
dc46645
to
82f8169
Compare
Now also all rep:policy nodes are included. I would go ahead and merge this afternoon if there are no objections. |
82f8169
to
5052268
Compare
<include | ||
pattern="/etc/acs-commons/qr-code/jcr:content/clientlib-author" | ||
mode="merge"/> | ||
<exclude |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea if this was here for a good reason? i.e. does the QR Code tool store configs (set from AEM) under here and are we blowing them away on re-deploy of ACS Commons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think indeed the QR code can be toggled (i.e. enabled/disabled). This settings is persisted in /etc/acs-commons/qr-code/jcr:content/config. So I think this part should be added as dedicated filter root with a mode merge. I will work on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HitmanInWis this theoretical situation can easily be made into an automated test by an oakpal scan with a forcedRoot of /etc/acs-commons/qr-code/jcr:content/config/oldNode
and the basic/paths
check.
@@ -8,6 +8,7 @@ | |||
<include pattern="/etc/acs-commons/automatic-package-replication/jcr:content"/> | |||
<include pattern="/etc/acs-commons/bulk-workflow-manager"/> | |||
<include pattern="/etc/acs-commons/bulk-workflow-manager/jcr:content"/> | |||
<include pattern="/etc/acs-commons/bulk-workflow-manager/rep:policy(/.*)?"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we really failing to deploy a ton of rep:policy
nodes? I would imagine a ton of things are broken for new installs if that's the case, right? Was this caused by recent changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bug in FileVault which might install the rep:policy nodes anyways, but as it has been clarified in https://issues.apache.org/jira/browse/JCRVLT-372 that would rather be a bug. Therefore I took the opportunity to clean things up here.
<include pattern="/etc/acs-commons/instant-package/jcr:content"/> | ||
<include pattern="/etc/acs-commons/instant-package/jcr:content/instant-package-image.png"/> | ||
<include pattern="/etc/acs-commons/instant-package/jcr:content/config"/> | ||
<include pattern="/etc/acs-commons/instant-package/jcr:content(/.*)?"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the tool saves some other nodes (from the AEM UI) under jcr:content
will this new config now blow those away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, actually the user change something below /etc/acs-commons/instant-package/jcr:content/config so this path should be covered by a dedicated filter root with mode=merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kwin @HitmanInWis this theoretical situation can easily be made into an automated test by an oakpal scan with a forcedRoot of /etc/acs-commons/instant-package/jcr:content/config/oldNode and the basic/paths check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these forcedRoots probably just needs to be added to the acs-internal.json checklist.
… and config page checking
<include pattern="/var/acs-commons/jcr:content"/> | ||
<include pattern="/var/acs-commons/mcp/rep:policy(/.*)?"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not being included - may need to add a filter for /var/acs-commons/mcp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, correct. I am gonna include the parent as well and will try to add a validation check for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved in bc14186
|
||
<include pattern="/etc/acs-commons/instant-package/jcr:content(/.*)?"/> | ||
<!-- the user specific configuration should not be touched --> | ||
<exclude pattern="/etc/acs-commons/instant-package/jcr:content/config(/.*)?"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I placed a node under both /etc/acs-commons/instant-package/jcr:content/config
and /etc/acs-commons/qr-code/jcr:content/config
and on deploy the nodes were blown away. Am I doing something wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, that is very weird, seems like a bug in FileVault, let me investigate.
Update: Ok, I reported this before. It is https://issues.apache.org/jira/browse/JCRVLT-255. Let me see if I can find a workaround. The exclude does work correctly but the mode=merge not for the config node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved bc14186
Thanks for fixing the issues turned up in my testing @kwin - I'll re-test soon. I know stuff like this gets past all of us when developing, and I'm not perfect either, but please be more diligent in testing your PRs and the code they affect. Losing the on-deploy-scripts-status nodes in the first place was from a previous PR of yours as well, and though both the developer and the person merging the PR have responsibility in testing the change the primary responsibility is on the developer submitting the PR. I appreciate your eagerness to contribute, just want to encourage more comprehensive testing especially when making refactors, as breaking ACS Commons affects developers on real projects that depend on this stuff to "just work". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, since I dont want to lose the commit that @geertsmichael contributed, please squash your additional commits into a single commit so there are only 2 commits to merge (the one with geertsmichael, and the one with your additional stuff) so that I dont have to squash and lose the history (and thus the appropriate accreditation) |
bc14186
to
c4c8a80
Compare
Done and you can see the co-authoring nicely e.g. in https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/2045/commits. |
Thanks @kwin can you please merge latest master and update the oakpal check for |
Remove invalid merge option on include/exclude elements. This closes Adobe-Consulting-Services#2044 Co-authored-by: Michael Geerts <michael.geerts@ida-mediafoundry.be>
c4c8a80
to
c54c541
Compare
Done, but now I see
I don't really know what those are supposed to mean. |
Does that refer to my comment above about how the ACS Commons deploy is now blowing away custom nodes under /etc/acs-commons/instant-package/jcr:content/config and /etc/acs-commons/qr-code/jcr:content/config? If so, this is reporting a true bug - ACS Commons deploy should not blow those away. |
The nodes are no longer overwritten. To me that looks like a false positive in oakpal-check |
@HitmanInWis @kwin correct. those are arbitrary children paths I establish before the scan to detect unintentional deletion of content authored content. |
@kwin could be. you can temporarily modify that inlineScript function in the pom to use the session to see if those default nodes still exist even if they registered as deletions. |
@kwin I tested this again, and using the latest code from your branch I see the same behavior. If I create the following nodes:
Technically Im not sure if either of those features put nodes under config, but leaving the filter as-is fundamentally incorrect. What is a "real" but though is the |
@kwin I pulled your branch locally and iterated a bit on the oakpal check by adding this section to the beginning of the function beforeExtract(packageId, session) {
var instantPackagePath = "/etc/acs-commons/instant-package/jcr:content/config/default";
if (!session.itemExists(instantPackagePath)) {
oakpal.majorViolation("expected forced path beforeExtract: " + instantPackagePath, packageId);
}
}
function afterExtract(packageId, session) {
var instantPackagePath = "/etc/acs-commons/instant-package/jcr:content/config/default";
if (!session.itemExists(instantPackagePath)) {
oakpal.majorViolation("expected forced path afterExtract: " + instantPackagePath, packageId);
}
var policyPaths = [
"/oak:index",
"/content",
"/content/dam",
... When I ran this on the existing content, I confirmed that the
I added explicit primary and mixin node types to the forcedRoot definitions for each parent of the instant-package config default path to be sure that it wasn't a constraint violation preventing retention of the children. (I also had to import the package nodetypes.cnd using
But defining this extra existing structure did not eliminate the violations from the report. I've got a hop on a flight right now, so I'll take a look at other possibilities after I land. |
I can confirm that those nodes still get overwritten. I tried to identify the issue and the exclude does definitely work! But the merge mode on the dedicated filter rule does not work for some reason. Also merge="update" does not work. But once I remove the filter entries for |
Ok, is there something you can do with the |
I guess one could just leave the node completely out from the filter, but then you will never ever be able to update that via any means in case it is already there (e.g. if there is the wrong resource type being set on that node). WDYT? |
Probably should leave the |
Makes sense to me -- isn't that what the merge is supposed to do? |
@kwin it looks like AEM 6.3 (min supported AEM version of acs-aem-commons 4.0.0+) ships with filevault 3.1.38, which means it might support the Maybe this can be done with an |
Let's go with something simple for now to fix the issue and get the branch back to a working state. There are some blocker bugs fixed by this PR so I think we should try to get this merged ASAP. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is this PR still needed @kwin, @adamcin, @HitmanInWis? Looking at the merge conflicts it seems like we solved the problem in a slightly different way already or am I missing something? |
I think this PR had some additional fixes that were not included in other PRs, but given the lack of activity plus the conflicts it might make sense to let this roll off as stale. |
Unfortunately property excludes do not work correctly due to https://issues.apache.org/jira/browse/JCRVLT-390?jql=project%20%3D%20JCRVLT%20AND%20fixVersion%20%3D%203.4.2. So I really need to investigate why merge does not work correctly in this case. |
This is now tracked in https://issues.apache.org/jira/browse/JCRVLT-396 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Remove invalid merge option on include/exclude elements.
This closes #2044