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

Comment when no plugin or external-plugin handles a command #324

Open
smg247 opened this issue Nov 14, 2024 · 6 comments
Open

Comment when no plugin or external-plugin handles a command #324

smg247 opened this issue Nov 14, 2024 · 6 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@smg247
Copy link
Contributor

smg247 commented Nov 14, 2024

Prow has many plugins, with the option of adding yet more external plugins to the installation. Often times, users interacting with prow will mis-type a plugin command, and the respective plugin won't pick it up and it will look like their command is just being ignored. To combat this, we have added some common misspellings and mistakes to regex in specific external plugins in order to generate an error. It would be even better if there were some mechanism that commented whenever a user began a command with /, and the command wasn't picked up by any plugin or external plugin. It would simply have to look for that, and comment back to the user that their command is invalid with a link to the plugin-help page.

Implementation notes:
This might be complicated, and may require the addition of a boolean return value on the *Handler functions in order to signify that the command was handled by that handler.

@smg247
Copy link
Contributor Author

smg247 commented Nov 14, 2024

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 14, 2024
@petr-muller
Copy link
Contributor

This would be very useful, but quite tricky for external plugins - IIRC hook just passes the received webhook call to the external plugin via http and does not block, so I dont think we have a centralized place that could receive all "not handled, sorry" responses.

@smg247
Copy link
Contributor Author

smg247 commented Nov 15, 2024

We may need to spin up another thread that waits for a "yes, I handled this" or "ignoring" response from each external plugin. Definitely have some details to work out.

@Prucek
Copy link
Member

Prucek commented Nov 18, 2024

@smg247
Copy link
Contributor Author

smg247 commented Nov 18, 2024

@Prucek, that is interesting, but how would smee help us discern when none of the plugins have handled the request?

@Prucek
Copy link
Member

Prucek commented Nov 18, 2024

I thought, before forwarding the call to hook, it could do a check, what plugins are available, but I guess it's not that easy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants