Consul: Updating KV in UI overwrites "Flags"

Created on 22 Jan 2020  路  6Comments  路  Source: hashicorp/consul

Overview of the Issue

When editing/updating a key/value in the UI the _flags_ attribute is reset.
As the _flags_ attribute is not visible in the UI one cannot manually make sure it is preserved.
Expected behaviour would be that when updating a key/value in the UI any set value of the _Flags_ attribute should automatically be preserved

Reproduction Steps

  • Use any tool like postman or curl to add/POST a key and provide _?flags=123_
  • Perform a HTTP GET on the key and inspect the _Flags_ attribute, it should be 123
  • Go to the UI and manually update the key/value
  • Perform a HTTP GET on the key and inspect _Flags_ attribute, it is reset back to 0

Consul info for both Client and Server

Tested with server versions

  • 1.4.2
  • 1.5.1
  • 1.6.2

Operating system and Environment details

n/a

Log Fragments

n/a

themui typbug

All 6 comments

Hey @pnerg

Thanks so much for reporting this! We've added a fix for this to our ui branch so it should be fixed in our next release.

I'm not sure if you can say or not, but out of interest what's your usecase for using flags?

Thanks again!

Intend to use the attribute to store the file suffix (string->byte array->bitshift to unsigned int) of the original file as the suffix is removed in the key name when POSTing it to Consul

Any estimate when the next release is due?

Any estimate when the next release is due?

I wouldn't want to say a date but we are working towards a 1.7 release

as the suffix is removed in the key name when POSTing it to Consul

This ^ stood out to me, and just thought I'd check with you. Do you remove the suffix _before_ POSTing it to Consul?

E.g. a file like /foo/bar/config.json becomes /foo/bar/config in Consul (legacy stuff) but now I need the original suffix for new use cases and the thinking is to store the original (json) suffix in Flags in order to recreate it for these new use cases
Not to break bw compatibility we must continue to strip the suffix but hiding it as meta-info won't break anything. A win-win, provided the UI doesn't reset the attribute that is...:)

Ah gotcha, cool.

So we should have a solution for you pretty soon then. Thanks again for the report! I'll try and remember to ping you back here once its gone into a release.

I'm closing this ticket just in case someone else stumbles upon it...:)
According to the changelog it was released with 1.7.0
_ui: Ensure KV flags are passed through to Consul on update [GH-7216]_

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pritam97 picture pritam97  路  3Comments

matteoturra picture matteoturra  路  4Comments

atomantic picture atomantic  路  4Comments

aravind picture aravind  路  3Comments

darron picture darron  路  4Comments