Skip to content

[Messenger] Allow to skip message in FailedMessagesRetryCommand #57270

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

Merged

Conversation

Kazadri
Copy link

@Kazadri Kazadri commented May 31, 2024

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #50936
License MIT

When retrying message with the command messenger:failed:retry, we have two options:

  • Retry : (It will be consumed and re-added to failed queue if it re-fail)
  • Delete

But sometimes we have no clue if we can retry it or not but I know that we don't want to delete it yet. In that case we need to stop the command and go id by id. The interactive command is lost. The command should provide a way to skip a message to continue with the rest of the failed message.

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.2 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

Copy link
Contributor

@94noni 94noni left a comment

Choose a reason for hiding this comment

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

I dont know deeply the internal of messenger, but if it is accepted as is its a simple solution 👌🏼

@OskarStark OskarStark changed the title [Messenger] Allow to skip message in FailedMessagesRetryCommand [Messenger] Allow to skip message in FailedMessagesRetryCommand Jun 5, 2024
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

Does this implementation mean that skipping will update the failure date? If yes, is there any way around?
Is there no way to just NACK the message and go to the next one?
Note that the answer might be just "no" by design, I don't remember this aspect :)
Anyone else can tell?

Copy link
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

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

@Kazadri Can you rebase on current 7.2 to get rid of the merge commit?

Update CHANGELOG message and help message
@Kazadri Kazadri force-pushed the feature-50936-skip-message-on-retry-command branch from d9ce65f to 7ec6914 Compare September 3, 2024 11:58
@Kazadri
Copy link
Author

Kazadri commented Sep 3, 2024

@Kazadri Can you rebase on current 7.2 to get rid of the merge commit?

Sure, it's done ! 👍

@fabpot
Copy link
Member

fabpot commented Sep 27, 2024

Thank you @Kazadri.

@fabpot fabpot merged commit 6d1aa36 into symfony:7.2 Sep 27, 2024
8 of 10 checks passed
@fabpot fabpot mentioned this pull request Oct 27, 2024
Comment on lines +209 to +210
$choice = $io->choice('Please select an action', ['retry', 'delete', 'skip'], 'retry');
$shouldHandle = $shouldForce || 'retry' === $choice;
Copy link
Contributor

@W0rma W0rma Apr 28, 2025

Choose a reason for hiding this comment

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

With this change the user is always asked to select an option even if --force was used.

I'm going to prepare a fix
EDIT see #60293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Messenger] Add 'skip' to options in interactive messenger:failed:retry command
6 participants