Skip to content

Comments

Fix the repeated "failed to pull module" notification pop-ups#708

Merged
NipunaRanasinghe merged 1 commit intoballerina-platform:1.6.xfrom
nipunayf:fix-pull-loop-16x
Feb 17, 2026
Merged

Fix the repeated "failed to pull module" notification pop-ups#708
NipunaRanasinghe merged 1 commit intoballerina-platform:1.6.xfrom
nipunayf:fix-pull-loop-16x

Conversation

@nipunayf
Copy link
Contributor

@nipunayf nipunayf commented Feb 17, 2026

Purpose

$title.

Root Cause:
getResolution fails 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

Copilot AI review requested due to automatic review settings February 17, 2026 12:28
@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@nipunayf nipunayf changed the title Include compilation step in pull module executor Fix the repeated "failed to pull module" notification pop-ups Feb 17, 2026
// 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();
Copy link
Contributor

Choose a reason for hiding this comment

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

what will happen when getCompilation execution fails?

Comment on lines 147 to +150
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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need both these calls (resolution + compilation) in here?

@NipunaRanasinghe
Copy link
Contributor

NipunaRanasinghe commented Feb 17, 2026

Merging this PR due to time constraints.

@nipunayf please feel free to address any applicable suggestions in a follow-up PR.

@NipunaRanasinghe NipunaRanasinghe merged commit da277de into ballerina-platform:1.6.x Feb 17, 2026
10 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.

3 participants