-
Notifications
You must be signed in to change notification settings - Fork 607
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
Cloud Manager sonar analysis is failing due to critical issues related with CQRules:CQBP-84 #2604
Comments
While I would accept item (1) and (4) (well, these are AEM product interfaces, and it doesn't make that much sense to implement them here), I would question (2) and (3), the usecase looks more reasonable. We probably should move this code to Sling and maintain it there alongside the interfaces. |
(2) can be ignored. The Redirect map feature is not AEM as a Cloud Service compatible and is disabled on this platform. |
Even if 2 is not compatible with AEMaaCS it will still trigger the sonar issue (because the code is included). @YegorKozlov Do you suggest that we build an AEMaaCS specific bundle stripping certain classes? |
It might make sense to define a AEMaaCS Maven profile which will exclude not compatible code and corresponding tests. |
We get the same 4 error reports on Cloud Manager for Adobe Manager Services enterprise (eg non-cloud service) running AEM 6.5.5 where we embed ACS commons, so a AEMaaCS profile would not resolve this for all use cases. |
Got below from our Adobe Support person ... Which is this 2604 issue ... the latest release of the Cloud Manager on June 10th 1 has introduced changes that detect rule CQBP-84 better in embedded bundles, resulting in some annotations in the ACS Commons package being flagged as critical and failing the cloud pipeline builds. In consequence, this is an issue with ACS Commons that needs to be fixed, and not with the embedding of the library or its support with AEMaaCS (the version 5.0.4 of ACS Commons is supported by AEMaaCS). This will need to be fixed in ACS Commons, you can see the bug report here 2. |
I took a brief look at these and I'm wondering if 2 & 3 could potentially be addressed by extending Also regarding 3, I don't see any usages in the project for synthesizer or the entire |
FWIW, this
Is not entirely correct. The severity of this rule has always been Critical -- implementing interfaces which are only intended to be implemented by AEM was and remains an important issue and creates a variety of risks for customers. What changed in last week's release is that certain ways of embedding/referencing dependencies were not consistently handled. In other words, these issues were there all along but undetected because of gaps in how the build-time dependency graph was materialized during quality analysis. |
For (1) , com.adobe.acs.commons.mcp.impl.processes.renovator.ReplicationQueue does not need to implement Replicator at all. Removing 'implements Replicator' does not change the behavior and functionality. Unit tests have a couple of assumptions that ReplicationQueue_ implements Replicator, but not the main code. |
Hi, can someone confirm that this issue (and 2606, 2607 and 2608) is being addressed by ACS? I's affecting multiple implementations. Thanks! |
Yeah please someone let us know the recent update on this issue?#2609 |
Hi, are the issues 2606, 2607 and 2608 being addressed by ACS. Thank you! |
This is open-source, if you urgently need a fix for this, please come up with PRs. Only the issue 2. from above has been fixed meanwhile (but not released yet) in #2615 . |
is there any update on this issue? we are using ACS Commons 5.0.12 and still we are seeing those critical issues in cloud manager Sonar analysis. |
Currently facing these errors on the pipeline
any update for this? (currently using 5.0.14) |
@tauba some of these should be fixed in 5.1.0 - not sure about the Query one though ... |
@davidjgonzalez @justinedelson I see @tauba has pointed out that CloseableQuery (which extends com.day.cq.search.Query to add AutoCloseable) is now flagged by CQBP-84 because the @ProviderType annotation has been added to all the cq-search interfaces in recent cloudready sdks. This is not present in uber-jar 6.5.8, for example. We can probably isolate the |
@adamcin This seems like a valid feature request. IIRC, this package is now considered an Assets feature but I could be wrong about that. |
Required Information
Expected Behavior
Cloud Manager code analysis is ok
Actual Behavior
Cloud Manager code analysis is failing and breaking the build as a result due to Sonar critical issues
Steps to Reproduce
Build a project including acs-commons library dependency (included in the "all" package) and suddenly since the last Cloud Manager release (today morning) builds are failing with the following critical sonar issues:
The product interface com.day.cq.replication.Replicator annotated with @ProviderType should not be implemented by custom code. Detected in com.adobe.acs.commons.mcp.impl.processes.renovator.ReplicatorQueue contained in /apps/acs-commons/install/acs-aem-commons-bundle-5.0.4.jar. (Critical) CQRules:CQBP-84 -> Tracked in ReplicatorQueue should not implement the Replicator interface #2614
The product interface org.apache.sling.api.SlingHttpServletRequest annotated with @ProviderType should not be implemented by custom code. Detected in com.adobe.acs.commons.redirectmaps.impl.FakeSlingHttpServletRequest contained in /apps/acs-commons/install/acs-aem-commons-bundle-5.0.4.jar. (Critical) CQRules:CQBP-84 -> Tracked in Don't implement Provider type SlingHttpServletRequest in FakeSlingHttpServletRequest #2648
The product interface org.apache.sling.api.request.RequestPathInfo annotated with @ProviderType should not be implemented by custom code. Detected in com.adobe.acs.commons.synth.impl.SynthesizedSlingHttpServletRequest$WrappedRequestPathInfo contained in /apps/acs-commons/install/acs-aem-commons-bundle-5.0.4.jar. (Critical) CQRules:CQBP-84 -> Tracked in Replace implementation of Provider Type RequestPathInfo #2658
The product interface com.adobe.granite.workflow.exec.WorkItem annotated with @ProviderType should not be implemented by custom code. Detected in com.adobe.acs.commons.workflow.synthetic.impl.granite.SyntheticWorkItem contained in /apps/acs-commons/install/acs-aem-commons-bundle-5.0.4.jar. (Critical) CQRules:CQBP-84
Links
Related CQ rule documentation: https://experienceleague.adobe.com/docs/experience-manager-cloud-manager/using/how-to-use/custom-code-quality-rules.html?lang=en#product-apis-annotated-with-providertype-should-not-be-implemented-or-extended-by-customers
The text was updated successfully, but these errors were encountered: