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

WINDUPRULE-1010 Caching rules refactor so cloud-readiness override te… #1001

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<addon id="org.jboss.windup.rules,windup-rules-java,3.0.0.Final" />
</dependencies>
<targetTechnology id="cloud-readiness"/>
<phase>InitialAnalysisPhase</phase>
<overrideRules>true</overrideRules>
</metadata>
<rules>
<rule id="embedded-cache-libraries-01000">
Expand Down Expand Up @@ -289,13 +289,34 @@
</or>
</when>
<perform>
<classification title="Caching - Spring Boot Cache library" category-id="information" effort="0">
<classification title="Caching - Spring Boot Cache library" category-id="cloud-mandatory" effort="5">
<description>
The application embeds the Spring Boot Cache library.

An embedded cache library is problematic because state information might not be persisted to a backing service.

Recommendation: Use a cache backing service.
</description>
</classification>
<technology-tag level="INFORMATIONAL">Spring Boot Cache</technology-tag>
</perform>
</rule>
<rule id="embedded-cache-libraries-16000">
<when>
<file filename="{*}redis{*}.jar"/>
</when>
<perform>
<classification title="Caching - Redis Cache library" category-id="cloud-readiness" effort="5">
<description>
The application embeds the Redis client.

An embedded cache library is problematic because state information might not be persisted to a backing service.

Recommendation: Use a cache backing service.
</description>
</classification>
<technology-tag level="INFORMATIONAL">Redis</technology-tag>
</perform>
</rule>
</rules>
</ruleset>
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?xml version="1.0"?>
<ruletest id="embedded-cache-libraries-test" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<ruletest id="embedded-cache-libraries-cloud-readiness-test" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<testDataPath>data/embedded-cache-libraries</testDataPath>
<testDataPath>../../technology-usage/tests/data/embedded-framework/embedded-cache-libraries</testDataPath>
<rulePath>../../technology-usage/embedded-cache-libraries.windup.xml</rulePath>
<rulePath>../embedded-cache-libraries.windup.xml</rulePath>
<target>cloud-readiness</target>
<ruleset>
<rules>
<rule id="embedded-cache-libraries-test-01000">
<rule id="embedded-cache-libraries-cloud-readiness-test-01000">
<when>
<not>
<classification-exists classification="Caching - Ehcache embedded library"/>
Expand All @@ -15,7 +17,7 @@
<fail message="Ehcache classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-02000">
<rule id="embedded-cache-libraries-cloud-readiness-test-02000">
<when>
<not>
<classification-exists classification="Caching - Coherence embedded library"/>
Expand All @@ -25,7 +27,7 @@
<fail message="Coherence classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-03000">
<rule id="embedded-cache-libraries-cloud-readiness-test-03000">
<when>
<not>
<classification-exists classification="Caching - Apache Commons JCS embedded library"/>
Expand All @@ -35,7 +37,7 @@
<fail message="Apache Commons JCS classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-04000">
<rule id="embedded-cache-libraries-cloud-readiness-test-04000">
<when>
<not>
<classification-exists classification="Caching - Dynacache embedded library"/>
Expand All @@ -45,7 +47,7 @@
<fail message="Dynacache classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-05000">
<rule id="embedded-cache-libraries-cloud-readiness-test-05000">
<when>
<not>
<classification-exists classification="Caching - Embedded library"/>
Expand All @@ -55,7 +57,7 @@
<fail message="Generic Caching Jar Classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-06000">
<rule id="embedded-cache-libraries-cloud-readiness-test-06000">
<when>
<not>
<classification-exists classification="Caching - Hazelcast embedded library"/>
Expand All @@ -65,7 +67,7 @@
<fail message="Hazelcast classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-07000">
<rule id="embedded-cache-libraries-cloud-readiness-test-07000">
<when>
<not>
<classification-exists classification="Caching - Apache Ignite embedded library"/>
Expand All @@ -75,7 +77,7 @@
<fail message="Apache Ignite classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-08000">
<rule id="embedded-cache-libraries-cloud-readiness-test-08000">
<when>
<not>
<classification-exists classification="Caching - Infinispan embedded library"/>
Expand All @@ -85,7 +87,7 @@
<fail message="Infinispan classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-09000">
<rule id="embedded-cache-libraries-cloud-readiness-test-09000">
<when>
<not>
<classification-exists classification="Caching - JBoss Cache embedded library"/>
Expand All @@ -95,7 +97,7 @@
<fail message="JBoss Cache classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-10000">
<rule id="embedded-cache-libraries-cloud-readiness-test-10000">
<when>
<not>
<classification-exists classification="Caching - JCache embedded library"/>
Expand All @@ -105,7 +107,7 @@
<fail message="JCache classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-11000">
<rule id="embedded-cache-libraries-cloud-readiness-test-11000">
<when>
<not>
<classification-exists classification="Caching - Memcached client embedded library"/>
Expand All @@ -115,7 +117,7 @@
<fail message="Memcached client classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-12000">
<rule id="embedded-cache-libraries-cloud-readiness-test-12000">
<when>
<not>
<classification-exists classification="Caching - Oscache embedded library"/>
Expand All @@ -125,7 +127,7 @@
<fail message="Oscache classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-13000">
<rule id="embedded-cache-libraries-cloud-readiness-test-13000">
<when>
<not>
<classification-exists classification="Caching - ShiftOne \(Java Object Cache\) embedded library"/>
Expand All @@ -135,7 +137,7 @@
<fail message="ShiftOne classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-14000">
<rule id="embedded-cache-libraries-cloud-readiness-test-14000">
<when>
<not>
<classification-exists classification="Caching - SwarmCache embedded library"/>
Expand All @@ -145,7 +147,7 @@
<fail message="SwarmCache classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-test-15000">
<rule id="embedded-cache-libraries-cloud-readiness-test-15000">
<when>
<not>
<classification-exists classification="Caching - Spring Boot Cache library"/>
Expand All @@ -155,6 +157,16 @@
<fail message="Spring Boot Cache classification not found!" />
</perform>
</rule>
<rule id="embedded-cache-libraries-cloud-readiness-test-16000">
<when>
<not>
<classification-exists classification="Caching - Redis Cache library"/>
</not>
</when>
<perform>
<fail message="Redis Cache classification not found!" />
</perform>
</rule>
</rules>
</ruleset>
</ruletest>
Loading