Resolve RED-9472 "Feature/" #537
Open
yannik.hampe wants to merge 113 commits from
feature/RED-9472 into master
pull from: feature/RED-9472
merge into: Marmelator:master
Marmelator:master
Marmelator:RED-10708
Marmelator:renovate/master-plugins-(non-major)
Marmelator:renovate/master-testcontainers-java-monorepo
Marmelator:renovate/master-spring-core
Marmelator:renovate/master-commons-cli-commons-cli-1.x
Marmelator:renovate/master-com.knecon.fforesight-tracing-commons-0.x
Marmelator:renovate/master-com.github.javaparser-javaparser-core-3.x
Marmelator:renovate/master-com.hankcs-aho-corasick-double-array-trie-1.x
Marmelator:release/4.423.x
Marmelator:release/4.348.x
Marmelator:extended-entity-finding
Marmelator:RED-9472
Marmelator:RED-10102-bp
Marmelator:RED-10102
Marmelator:RED-9010
Marmelator:RED-9859-kilian
Marmelator:RED-9859-bp
Marmelator:RED-9859
Marmelator:release/4.244.x
Marmelator:RED-9843-DeleteEntityLog
Marmelator:release/4.190.x
Marmelator:RED-9857
Marmelator:RED-9760-4.1
Marmelator:RED-9123-eval-ids
Marmelator:RED-9658-master
Marmelator:RED-9496-bp
Marmelator:RED-9496
Marmelator:RED-9349-cors
Marmelator:RED-9349-rule-log
Marmelator:RED-9246
Marmelator:AKRA-Certificates
Marmelator:RED-8701-history
Marmelator:RED-8702-backup
Marmelator:RED-8702
Marmelator:RED-8828-bp
Marmelator:RED-8828
Marmelator:RED-8840
Marmelator:RED-8702-master
Marmelator:RED-8776
Marmelator:RED-8645
Marmelator:test-stuff
Marmelator:generate-java-doc
Marmelator:RED-8480
Marmelator:RED-8081-36x
Marmelator:release/3.222.x
Marmelator:RED-8043-fixes
Marmelator:release/4.142.x
Marmelator:RED-7784-custom
Marmelator:RED-7679-BBB2
Marmelator:RED-7679-BBB
Marmelator:RED-6807-zzz
Marmelator:RED-7679-4
Marmelator:RED-7759-documine-fix
Marmelator:RED-6807-2
Marmelator:RED-7679
Marmelator:DM-483
Marmelator:RED-7708
Marmelator:proompting
Marmelator:RED-7334
Marmelator:apryseAiTest
Marmelator:RED-7156
Marmelator:feature/RED-6945
Marmelator:LAYOUT_TESTS
Marmelator:BDR-TEST1
Marmelator:RED-6411_3.222.0_1
Marmelator:RED-6411_3.173_1
Marmelator:newAnalysisTest
Marmelator:findEntitiesInRules
Marmelator:findEntitiesInRules2
Marmelator:RED-5718-redactionServiceUser1001
Marmelator:SCMTables
Marmelator:SyngentaSCMpoc2
Marmelator:scmSorted
Marmelator:RED-5603
Marmelator:release/3.163.x
Marmelator:RED-5276
Marmelator:RSS-83-Ideas
Marmelator:RSS-119
Marmelator:RSS-83-POC2
Marmelator:RSS-83-poc2
Marmelator:RED-5381-Test6
Marmelator:RED-5381-Test5
Marmelator:RED-5381-Test4
Marmelator:RED-5381-Test3
Marmelator:RED-5381-Test2
Marmelator:RED-5381-1
Marmelator:RED-5381-Test1
Marmelator:RSS-83-6
Marmelator:RSS-83-5
Marmelator:RSS-83-4
Marmelator:RSS-83-3
Marmelator:RSS-83-2
Marmelator:RSS-83
Marmelator:RED-5139
Marmelator:master2
Marmelator:RED-4835-backport
Marmelator:release/3.107.x
Marmelator:tbejan/EntitySearchUtilsjava-1659082923692
Marmelator:RED-4799
Marmelator:release/3.80.x
Marmelator:OpenCv1
Marmelator:release/2.52.x
Marmelator:release/3.54.x
Marmelator:release/2.52.22
Marmelator:release/2.52.20
Marmelator:release/2.27.x
Marmelator:release/2.8.x
No Reviewers
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Marmelator
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Marmelator/redaction-service#537
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "feature/RED-9472"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes RED-9472
assigned to @yannik.hampe
added 10 commits
fb8f227a- RED-9472: seperation of system rulesb42b5762- RED-9472: seperation of system rules1ccdcf58- RED-9472: seperation of system rules4978259f- RED-9472: seperation of system rulesae385068- RED-9472: seperation of system rulesa8df56b2- RED-9472: seperation of system rules3f043c5f- RED-9472: seperation of system rules56011341- RED-9472: seperation of system rules9c3dc265- RED-9472: seperation of system rules2a5cefc6- Merge branch 'RED-9472' into feature/RED-9472Compare with previous version
added 1 commit
74599683- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
added 1 commit
370b7662- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
ed9f2def- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
1306e4ac- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
514cba83- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
a4fe510b- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
848de2bc- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
d497c368- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
8bf929df- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
583f244d- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
a95352e4- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
de7ea74c- RED-9472: seperation of system rulesCompare with previous version
requested review from @kilian.schuettler1, @dominique.eiflaender1, @corina.olariu.ext1, and @maverick.studer
This name does not seem to reflect what the function is doing
Don't leave as many info logs, it will completely spam the console
Why is systemRules a List<String>?
Shouldn't it be like a List of RuleIdentifiers?
Why do you want to keep the linebreaks in all but the first import?
Now that the project is inside the processor it has access to spring dependencies so we can use the class ClassPathRessource instead of the classloader to access these files.
Would make for a cleaner implementation imo.
For all the functions below there is already a class, the RuleFileFactory.
Also, ChatGPT leaves an excessive amount of comments, imo we should remove them, as the operations are obvious and only help the model for generating the correct code.
cannot happen, groupingBy operator always returns a map
An AssertionError would be more appropriate here
These should be RuleIdentifiers and not just the RuleTypes. E.g. syngenta has their own X rule (X.50.0 and X.50.1)
Also RuleIdentifiers can use wildcards, such as *, we could extend that a bit and support regex there as well and only lock X.0 - X.49 or smth.
If the SystemRules are RuleIdentifiers, you could use the removeRule function directly. Or at least make a new one, which removes an entire ruleClass at once.
This seems very convoluted to first search for them, just to obtain the RuleIdentifier and then remove them.
Why do we need to check that all are removed?
Shouldn't this be more of a Unit Test and not production code?
There is already a function in the RuleFileBluePrint doing almost exactly that. See RuleFileBluePrint::buildFilteredBluePrintByRuleIdentifiers
Raw use of parameterized class
unused method
Also, it's unused
imo this does not need comments
If you want to put one, put javadoc with something like:
Groups basic rules into classes and units based on their RuleIdentifier
This does not need to be a spring test, as all services you need for this test is the RuleBuilderService and that does not have any other dependencies. So this can be a simple Junit test.
I would add a test, which takes a rule file, removes the system rules and adds them again, then asserts, the initial and final rule file are equal.
Then run that for all rule files present in the drools folder
changed.
fixed
yes this can be a unit tests.
removed it
resolved all threads
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
changed this line in version 18 of the diff
added 1 commit
301dc718- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
65166751- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
5ab0747d- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
07cd81e5- RED-9472: seperation of system rulesCompare with previous version
You create a set from it below and otherwise you only iterate over it, so it should be a Set
If a User adds new imports, they need to be added.
It seems you are removing all imports from the update.
Does this work then?
There is a function for this, getAllRules()
split the imports by the import keyword and create a Set from them to avoid duplicates.
Check function public Set<String> getImportSplitByKeyword() in RulesCompilationResult
Same here, we should not allow duplicates
Same here, check for duplicates
This function is not in-place
you need to set the declarations and functions from the original bluePrint, or this does not do what is expected
The deploy JavaDoc below already publishes and is just missing the feature branch based rule.
With your change everything would get published twice.
Rebase onto master, its already changed there
this is a mistake, changed
resolved all threads
changed this line in version 22 of the diff
changed this line in version 22 of the diff
changed this line in version 22 of the diff
changed this line in version 22 of the diff
changed this line in version 22 of the diff
changed this line in version 22 of the diff
changed this line in version 22 of the diff
added 1 commit
7e64bb28- RED-9472: seperation of system rulesCompare with previous version
changed this line in version 23 of the diff
added 39 commits
master85bef908- RED-9472: seperation of system rulese535c62b- RED-9472: seperation of system rulescb102a4e- RED-9472: seperation of system rules7fcaaacd- RED-9472: seperation of system rules0342c20a- RED-9472: seperation of system rules65cee5d4- RED-9472: seperation of system rulese349578c- Merge remote-tracking branch 'origin/feature/RED-9472' into feature/RED-9472Compare with previous version
added 1 commit
4e773850- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
8c10e1c0- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
44721015- RED-9472: seperation of system rulesCompare with previous version
added 19 commits
master463154a4- RED-9472: seperation of system rules16950018- RED-9472: seperation of system rulese47dc307- RED-9472: seperation of system rules82bfa1b5- RED-9472: seperation of system rulese5d00de2- RED-9472: seperation of system rules6b7cf3a4- RED-9472: seperation of system rules6208017d- RED-9472: seperation of system rulesf7467298- RED-9472: seperation of system rules76120908- RED-9472: seperation of system rulesc702ccb5- Merge remote-tracking branch 'origin/feature/RED-9472' into feature/RED-9472Compare with previous version
added 1 commit
57408df4- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
f0129955- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
5f97d7ac- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
35a572a3- RED-9472: seperation of system rulesCompare with previous version
approved this merge request
added 7 commits
master518a9bdb- Merge branch 'master' into 'feature/RED-9472'Compare with previous version
reset approvals from @kilian.schuettler1 by pushing to the branch
approved this merge request
added 1 commit
47eda629- RED-9472: seperation of system rulesCompare with previous version
reset approvals from @kilian.schuettler1 by pushing to the branch
added 34 commits
masterc71668ad- RED-9472: seperation of system rules802d6630- RED-9472: seperation of system rules0be1812c- RED-9472: seperation of system rules8099676c- RED-9472: seperation of system rules1642e14e- RED-9472: seperation of system rules79159113- RED-9472: seperation of system rules2762d378- RED-9472: seperation of system rulesea3b0b99- RED-9472: seperation of system rulesa011a93f- RED-9472: seperation of system rules9463f4f5- Merge remote-tracking branch 'origin/feature/RED-9472' into feature/RED-9472Compare with previous version
added 1 commit
fb639b47- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
b12457cd- RED-9472: seperation of system rulesCompare with previous version
marked this merge request as ready
changed this line in version 37 of the diff
added 1 commit
a0b34894- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
f22a7c45- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
2d7feb8b- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
a723fe71- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
9cb19fb0- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
88155dc2- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
69ae276c- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
56bed5a1- RED-9472: seperation of system rulesCompare with previous version
added 42 commits
master7363493d- RED-9472: seperation of system rulesbdb29a0e- RED-9472: seperation of system rulesd2994f9e- RED-9472: seperation of system rules77a76f8b- RED-9472: seperation of system rules1a16dd46- RED-9472: seperation of system rulescdc08307- RED-9472: seperation of system rulesdfae9e5d- RED-9472: seperation of system rulese55c4e5f- RED-9472: seperation of system rules04eb6cf3- RED-9472: seperation of system rulesff700a60- Merge remote-tracking branch 'origin/feature/RED-9472' into feature/RED-9472Compare with previous version
added 1 commit
5ab99496- RED-9742: fix document importCompare with previous version
added 1 commit
077e4d0e- RED-9742: fix document importCompare with previous version
added 1 commit
3776f800- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
9395b5ad- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
b48f448c- RED-9472: seperation of system rulesCompare with previous version
added 1 commit
5a6746c5- Potential fix for failing pipelineCompare with previous version
added 1 commit
f03b0a38- RED-9472: seperation of system rulesCompare with previous version
SonarQube Code Analysis
Quality Gate failed
Failed conditions
57 New issues
1 Security Hotspot
0.0% Coverage on New Code (required ≥ 80%)
See analysis details on SonarQube
Checkout
From your project repository, check out a new branch and test the changes.