Skip to content

fix: handle force_flush for rake task with arguments #1412

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TeamNautilus
Copy link

This PR fixes an issue where force_flush was not correctly triggered when executing a Rake task with arguments. Previously, ::Rake.application.top_level_tasks stored task names including arguments (e.g., "task_name[arg]"), while the comparison in force_flush was done against name (which did not include arguments). This caused force_flush to be skipped for tasks with arguments.

Changes in this PR

  • Updated force_flush logic to strip arguments from top_level_tasks before comparison.
  • Modified tests to cover cases where a Rake task has arguments.
  • Ensured force_flush is correctly called when a task with arguments is invoked.

Copy link

CLA Not Signed

@kaylareopelle
Copy link
Contributor

👋 Hi @TeamNautilus! Thanks for opening this PR! Would you mind signing the CLA?

Copy link
Contributor

👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this pull request will be closed eventually by the stale bot

@github-actions github-actions bot added the stale Marks an issue/PR stale label Mar 28, 2025
@kaylareopelle kaylareopelle removed the stale Marks an issue/PR stale label Mar 29, 2025
Copy link
Contributor

👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this pull request will be closed eventually by the stale bot

@github-actions github-actions bot added the stale Marks an issue/PR stale label Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Marks an issue/PR stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants