amundsen-io / amundsen

Amundsen is a metadata driven application for improving the productivity of data analysts, data scientists and engineers when interacting with data.
https://www.amundsen.io/amundsen/
Apache License 2.0
4.34k stars 950 forks source link

Dynamic notices showing incorrect value(s) #2205

Closed mikaalanwar closed 8 months ago

mikaalanwar commented 8 months ago

Dynamic notices showing stale values from other tables and/or not updating correctly. We have a custom notice client that sends a request to an external system and fetches a value, based on which an HTML message/link is generated to be displayed as a dynamic notice. In our scenario, the external system can be quite slow at times, resulting in a response time of around 5-7 seconds at times. It has been observed that Dynamic Notices displayed at times don't even get updated or in some cases, they do get updated but for the initial 4-5 seconds they displayed the stale/older value (which is incorrect for the table against which it's displayed).

Expected Behavior

Either the dynamic notices are not displayed until a newer/proper value is loaded or it doesn't render altogether/remains hidden until a proper/newer value has been returned by the notice client.

Current Behavior

In some cases, the stale/older/wrong value is displayed by the notice client (corresponding to the previously opened table) while in other cases, the correct value is displayed after a delay with the stale/incorrect value being displayed for the initial 4-5 seconds (corresponding to the latency of the Notice Client)

Possible Solution

The React code is updated in such a way that dynamic notices for any given page are only displayed after a proper response has been received from the notice client, rather than displaying the stale/incorrect value.

Steps to Reproduce

  1. Create a Notice Client (that simulates a slow web request e.g. returning a dynamic notice response in 5 seconds)
  2. Open a given table (a proper dynamic notice will be displayed)
  3. Navigate to another table and you will observe that the old/stale value is still displayed until the newer one is loaded while in some cases the value of the dynamic notice is not updated at all.

Screenshots (if appropriate)

N/A

Context

This issue prevents us from using a critical feature that heavily involves the use of dynamic notices.

Your Environment

mikaalanwar commented 8 months ago

Closing this as the issue was fixed by the pull request https://github.com/amundsen-io/amundsen/pull/2210