Azure / appcat-rulesets

Repository for maintaining Rulesets for Windup
Eclipse Public License 2.0
6 stars 10 forks source link

Removing rules or removing targets? #20

Closed agoncal closed 1 year ago

agoncal commented 1 year ago

@brunoborges, this repo only contains the Azure rules. But to discover the technologies within an application, we also need the technology usage rules. Also, for any containerized target (e.g. ACA, AKS) we would need the container rules, as well as Linux or the Oracle JDK rules.

All in all, it might be better to keep all the rules, and instead, remove the unnecessary targets. @mrizzi mentioned that, when building a release of WindUp, there are some scripts that extract all the targets (this way you cam list all the available targets with the CLI).

@mrizzi is there any documentation on how to remove unnecessary targets?

brunoborges commented 1 year ago

@kthatipally can you check with Antonio please on this topic? If it will be easier to maintain a regular fork of windup-rulesets, and then use build scripts to filter out the parts we will ship, then let's do that.

kthatipally commented 1 year ago

Hi @agoncal , For my local build - I changed here: https://github.com/windup/windup-rulesets/blob/f87d51b90a9c7724b9c1e2665b752774cbddfdd5/rules/pom.xml#L347, I included everything which has azure in the name of xml. Let me know if there is any other way that we can use to exclude the targets. Thanks!

mrizzi commented 1 year ago

Let me share some thought on this.

"the more the merrier" for rules It means it's better to have Windup shipping rules also with targets you might consider "not interesting". This is based on the assumption that you don't know all the frameworks the users will have to migrate but having more rules (and targets) will make more likely for the migration to succeed. From this point I would say that the starting point should be to include everything rather than include only what has azure in the path.

Then, based on the above "include everything" approach, if you need to exclude some targets, I would suggest to evaluate two options:

  1. if the target belongs to a ruleset with multiple targets, I would only remove the unwanted target (with an XSLT or a sed execution): this would have the benefit of preserving the other targets in the same ruleset
  2. if the target is the only one in a ruleset, then delete the ruleset file
agoncal commented 1 year ago

We have decided to remove the targets and keep all the rules.