Fix the repeated "failed to pull module" notification pop-ups#708
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Comment |
There was a problem hiding this comment.
Pull request overview
This pull request enhances the PullModuleExecutor to capture BIR (Ballerina Intermediate Representation) errors during the module pulling process. Previously, the executor only performed resolution, which could miss certain compilation errors, leading to false success reports when modules actually failed to compile properly.
Changes:
- Added a compilation step (
getCompilation()) after resolution in the pull module executor - Included detailed comment explaining the rationale for the change
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // BIR issues are not captured during resolution, causing the pull module executor to incorrectly | ||
| // report that modules were pulled successfully. To remedy this, we now include the compilation | ||
| // step so that the executor accounts for BIR errors when generating the final status. | ||
| project.currentPackage().getCompilation(); |
There was a problem hiding this comment.
what will happen when getCompilation execution fails?
| project.currentPackage().getResolution(optionsBuilder.build()); | ||
| // BIR issues are not captured during resolution, causing the pull module executor to incorrectly | ||
| // report that modules were pulled successfully. To remedy this, we now include the compilation | ||
| // step so that the executor accounts for BIR errors when generating the final status. |
There was a problem hiding this comment.
Do we need both these calls (resolution + compilation) in here?
|
Merging this PR due to time constraints. @nipunayf please feel free to address any applicable suggestions in a follow-up PR. |
Purpose
$title.
Root Cause:
getResolutionfails to detect BIR issues, causing the pull module command to incorrectly report success. This triggers a project update, which re-initiates the failure recovery flow and results in an infinite loop.Fixes wso2/product-ballerina-integrator#2355