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

Action field in Recommendation events have a blank/null value #1381

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

romartin
Copy link
Contributor

@romartin romartin commented Jun 19, 2024

See https://issues.redhat.com/browse/AAP-24192

Description

The goal is to provide some quick fix some more common use cases, where action feedback is being handled in a wrong way, without a need for a bigger refactoring.

This PR improves the lifecycle of completion / feedback events , by assuming that several completion requests can be sent, before the suggestion is displayed to the user, this way:

  • Guarantees that for each successful (HTTP 200) completion request, it will end up on an action feedback event, can be accepted, rejected or ignored
  • Guarantees that for failed (non-200) completion requests, no action feedback is sent at all

Tested use cases

  • Accepting/rejecting a suggestion both by clicking on the buttons (accept, acceptKey) also by using keys (Tab, Esc)
  • Ignored action feedback sent, before suggestion presented, but user pressed some key (eg: whitespace)
  • Ignored action feedback sent, once suggestion presented, but user moved to another window, or lost the focus
  • Rejected action feedback sent, once suggestion presented, but user pressed some key (eg: whitespace)
  • Tested he fix for the steps to reproduce described in https://issues.redhat.com/browse/AAP-24192

TODO: Update/add unit tests

@romartin romartin force-pushed the AAP-24192-action-blank-v2 branch from 06d2b4e to af53250 Compare June 19, 2024 23:15
@romartin romartin force-pushed the AAP-24192-action-blank-v2 branch from 70fbecf to 4c31703 Compare June 19, 2024 23:17
@romartin romartin force-pushed the AAP-24192-action-blank-v2 branch from 4c31703 to 80dbfe0 Compare June 19, 2024 23:18
@romartin romartin force-pushed the AAP-24192-action-blank-v2 branch from 2c6f60e to 6ed8c7b Compare June 21, 2024 23:52
@ssbarnea ssbarnea changed the title AAP-24192: Action field in Recommendation events have a blank/null value Action field in Recommendation events have a blank/null value Jun 22, 2024
@romartin romartin merged commit 60f20f3 into ansible:main Jun 24, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants