Workers Key-Value reversion issue


Hi All,

I’m trying out the beta key-value feature. Here’s my setup:

My Cloud worker runs this line of code:

const envString = await STAGING.get("current_env");

To get the current environment, I’m then using this for a blue green deployment methodology on Google Cloud Functions (which has no systems in place to make deployments less risky).

I’m updating the value for current_env like this:

await axios({
    method: 'put',
    url: '***/storage/kv/namespaces/***/values/current_env',
    headers: {
        'X-Auth-Email': '****',
        'X-Auth-Key': '****'
    data: newEnv

The key changes from the perspective of the api - I can read the value back with axios after running this PUT and it gives me the new value, however after I run the worker script to read the value it hasn’t updated, and still shows the previous current_env value after multiple tries, waiting a few minutes.

Even stranger, after running the worker script when I then read the current_env variable through the api again, it has switched back from the API’s perspective as well. It almost seems like the action of reading the value from the worker script resets it.

Is this a known issue, given that it’s a beta?




Do you know the CF-Ray header when calling the API?
I have seen in the passed some inconsistency, but was related to one datacenter.



@tech45 I am now seeing this inconsistency in KV, after deleting a key and putting a new value on a key with the same name comes back the old version. cc @zack

LIS NRT datacenters

Update: delete a key, a minute later comes back.



We have identified this as an incident and our currently working on resolving it. We should have a status page up very shortly. As always thank you for reporting it and I am sorry it took us this long to respond. As we go through beta for KV we are systematically improving our internal alerting and you can trust we will have automated tests around this behavior shortly as well.



This has been resolved, we are beginning working to understand the full root cause and improve our monitoring now.



Maybe this explains the inconsistent behavior I had when testing too.

Thanks for fixing it so quickly.