For tag updates or any other eventually-consistent API, we first make the change as normal, and if it is successful then we sleep for a brief amount of time (say 250ms)
Enter a do-while query loop where we query the tags again and check if they are equal. If not, we sleep a longer amount of time (potentially in an exponential back-off approach to minimize average latency without a ton of read calls) and repeat, until some maximum timeout where we fail out the change.
Some AWS APIs seem to be eventually consistent.
In this specific case https://github.com/iasql/iasql-engine/runs/7635873948?check_suite_focus=true#step:5:13889, the test fail because: