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: :master
:master
:RED-10708
:renovate/master-plugins-(non-major)
:renovate/master-testcontainers-java-monorepo
:renovate/master-spring-core
:renovate/master-commons-cli-commons-cli-1.x
:renovate/master-com.knecon.fforesight-tracing-commons-0.x
:renovate/master-com.github.javaparser-javaparser-core-3.x
:renovate/master-com.hankcs-aho-corasick-double-array-trie-1.x
:feature/RED-9472
:release/4.423.x
:release/4.348.x
:extended-entity-finding
:RED-9472
:RED-10102-bp
:RED-10102
:RED-9010
:RED-9859-kilian
:RED-9859-bp
:RED-9859
:release/4.244.x
:RED-9843-DeleteEntityLog
:release/4.190.x
:RED-9857
:RED-9760-4.1
:RED-9123-eval-ids
:RED-9658-master
:RED-9496-bp
:RED-9496
:RED-9349-cors
:RED-9349-rule-log
:RED-9246
:AKRA-Certificates
:RED-8701-history
:RED-8702-backup
:RED-8702
:RED-8828-bp
:RED-8828
:RED-8840
:RED-8702-master
:RED-8776
:RED-8645
:test-stuff
:generate-java-doc
:RED-8480
:RED-8081-36x
:release/3.222.x
:RED-8043-fixes
:release/4.142.x
:RED-7784-custom
:RED-7679-BBB2
:RED-7679-BBB
:RED-6807-zzz
:RED-7679-4
:RED-7759-documine-fix
:RED-6807-2
:RED-7679
:DM-483
:RED-7708
:proompting
:RED-7334
:apryseAiTest
:RED-7156
:feature/RED-6945
:LAYOUT_TESTS
:BDR-TEST1
:RED-6411_3.222.0_1
:RED-6411_3.173_1
:newAnalysisTest
:findEntitiesInRules
:findEntitiesInRules2
:RED-5718-redactionServiceUser1001
:SCMTables
:SyngentaSCMpoc2
:scmSorted
:RED-5603
:release/3.163.x
:RED-5276
:RSS-83-Ideas
:RSS-119
:RSS-83-POC2
:RSS-83-poc2
:RED-5381-Test6
:RED-5381-Test5
:RED-5381-Test4
:RED-5381-Test3
:RED-5381-Test2
:RED-5381-1
:RED-5381-Test1
:RSS-83-6
:RSS-83-5
:RSS-83-4
:RSS-83-3
:RSS-83-2
:RSS-83
:RED-5139
:master2
:RED-4835-backport
:release/3.107.x
:tbejan/EntitySearchUtilsjava-1659082923692
:RED-4799
:release/3.80.x
:OpenCv1
:release/2.52.x
:release/3.54.x
:release/2.52.22
:release/2.52.20
:release/2.27.x
:release/2.8.x
No Reviewers
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
Marmelator (Kilian Schüttler)
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.
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
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.