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

Refactor Choice Set Manager to Fix Several Bugs #2019

Merged
merged 62 commits into from
Sep 17, 2021

Conversation

joeljfischer
Copy link
Contributor

@joeljfischer joeljfischer commented Jul 6, 2021

Fixes #2018, #2020, #2025

Risk

This PR makes no API changes.

Testing Plan

  • I have verified that I have not introduced new warnings in this PR (or explain why below)
  • I have run the unit tests with this PR
  • I have tested this PR against Core and verified behavior (if applicable, if not applicable, explain why below).

Unit Tests

Unit tests updated and rewritten

Core Tests

  • Tested sending a presentation, then sending another presentation when the first has a button pressed.
  • Tested sending a presentation on various systems in both swift and obj-c

Core version / branch / commit hash / module tested against: Manticore (SDL v7.1.1), Sync Gen 3.4
HMI name / version / branch / commit hash / module tested against: Manticore (Generic HMI v0.10.0), Sync Gen 3.4

Summary

  1. This PR rewrites the choice set manager to use a full queuing system rather than the partial queueing system of the past.
  2. This PR rewrites the preload / present operations into one operation to solve some queueing problems. The operation will now figure out what it has to do based on how it is initialized.
  3. This PR changes cancelation behavior. Before if you sent a present, then another present, the manager would try to cancel previous ones. Now they will be queued and the dev can cancel previous ones if desired.
  4. This PR fixes strange deletion behavior. Before if a delete came in while a preload / present was happening, the manager would try to delete choices from the upload. Now it will wait until the delete operation comes around and delete at that time. This allows proper behavior around preload -> present -> delete situations.

Changelog

Bug Fixes
  • Fixed unpredictable choice set behavior when quickly loading / presenting / deleting choices. They now will happen in the order that you call the methods.

Tasks Remaining:

Done

CLA

* Pending presentations are now enqueued and canceled as needed
* When a presentation fails, the request itself will now be printed
@joeljfischer joeljfischer linked an issue Jul 6, 2021 that may be closed by this pull request
@joeljfischer joeljfischer changed the title Update choice set manager to handle pending presentations better Refactor Choice Set Manager to Fix Several Bugs Jul 22, 2021
@joeljfischer joeljfischer self-assigned this Jul 22, 2021
@joeljfischer joeljfischer added the bug A defect in the library label Jul 22, 2021
* Fixed Choice cell not printing unique text correctly
* Fixed uniqueness of uploading cells
FrankElias77
FrankElias77 previously approved these changes Aug 24, 2021
if (![windowCapability hasImageFieldOfName:SDLImageFieldNameChoiceImage]) {
cell.artwork = nil;
}
if (![windowCapability hasTextFieldOfName:SDLTextFieldNameSecondaryText]) {

Choose a reason for hiding this comment

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

Should you use methods like sdl_shouldSendChoiceSecondaryTextBasedOnWindowCapability here instead of checking the windowCapability directly since it does the same thing?

@joeljfischer
Copy link
Contributor Author

This needs to fix rollovers of choice ids, check based on existing choice ids, and error if there's no more ids

FrankElias77
FrankElias77 previously approved these changes Sep 8, 2021
FrankElias77
FrankElias77 previously approved these changes Sep 14, 2021
* Don't attempt to upload duplicate artworks
FrankElias77
FrankElias77 previously approved these changes Sep 15, 2021
@joeljfischer joeljfischer merged commit ca6c31f into develop Sep 17, 2021
@joeljfischer joeljfischer deleted the bugfix/issue-2018-choice-sets-fail branch September 17, 2021 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library manager-screen Relating to the manager layer - screen managers
Projects
None yet
3 participants