eveseat / seat

🌀✳️ SeAT: A Simple, EVE Online API Tool and Corporation Manager
https://eveseat.github.io/docs/
GNU General Public License v2.0
434 stars 142 forks source link

EveAPI's Character Skill Queue Job not resistant to ESI Bugs #911

Open tehraven opened 2 months ago

tehraven commented 2 months ago

The skill Queue job has a update-all, delete-the-rest approach to updating the Database: https://github.com/eveseat/eveapi/blob/5.0.x/src/Jobs/Skills/Character/Queue.php#L101-L103

This is based on the assumption that when you query for Character Skill Queues, the first record will be queue_position zero.

That is not always true

It appears that when a user in-game removes skills, sometimes EVE just removes the rows without reshuffling the items queue_position whatsoever. This was verified on three users, two of which were able to force Eve to reshuffle by adding a new skill to the queue. Example when still broken, user only has one skill in queue, currently active and training: (see screenshot section)

The result was that a user's queue records in the SeAT DB would start with:

Queue Item 1, Queue Item 2, Queue Item 3

And if only Queue Item 3 comes back from the API, you would still have

Queue Item 1, Queue Item 2, Queue Item 3 ... because the delete query would delete everything larger than 3.

I expect the Queue job to update the table and have all the rows no longer in ESI deleted (cleaned up)

image

SeAT V5 all updated