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

[incubator-kie-drools#5706] Grouped accessors for nested objects broken #5790

Conversation

tkobayas
Copy link
Contributor

Issue:

How to replicate CI configuration locally?

Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.

build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.

How to retest this PR or trigger a specific build:
  • for pull request and downstream checks

    • Push a new commit to the PR. An empty commit would be enough.
  • for a full downstream build

    • for github actions job: add the label run_fdb
  • for Jenkins PR check only

Comment on lines -29 to +28
public class ParserStringUtils {
public class Antlr4ParserStringUtils {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed because this PR introduces ParserStringUtils which is used by both antlr3 an antlr4 parsers.

* Append a prefix to a grouped constraint.
* Even if the constraint contains || and/or &&, append the prefix to each element.
*/
public static String appendPrefix(String prefix, String expr) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this method from DRL6Parser (antlr3 based), because this logic is pure String manipulation. And this is used by both antlr3 based DRL6Parser and antlr4 based DRLVisitorImpl.

DRLVisitorImpl might be able to implement this in another way using more visit methods, but it would likely be complex than this method, so I decided to reuse this method.

@tkobayas
Copy link
Contributor Author

Fixed org.drools.model.codegen.execmodel.CompilerTest#testChainOfMethodCallInConstraintSub.

Before PR
drools-model-codegen

[ERROR] Tests run: 2433, Failures: 419, Errors: 2, Skipped: 9

After PR
drools-model-codegen

[ERROR] Tests run: 2433, Failures: 417, Errors: 2, Skipped: 9

@tkobayas
Copy link
Contributor Author

@yurloc @mariofusco @gitgabrio Please review, thanks!

Copy link
Contributor

@yurloc yurloc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the missing @Test annotation. Otherwise looks good.

tkobayas and others added 2 commits March 18, 2024 19:15
…er/antlr4/DRLVisitorImpl.java

Co-authored-by: Jiří Locker <jiri.locker@gmail.com>
…l/parser/antlr4/MiscDRLParserTest.java

Co-authored-by: Jiří Locker <jiri.locker@gmail.com>
@tkobayas
Copy link
Contributor Author

@yurloc Ahh, thank you very much for the suggestions!

@yurloc
Copy link
Contributor

yurloc commented Mar 18, 2024

Fixing progress: There were 408 failed tests (-2).

@tkobayas tkobayas merged commit 5f83f08 into apache:dev-new-parser Mar 19, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants