Commit 7d5b051
authored
fix: Increment flag & segment versions when reloading from file data source (#285)
The file data source allows specifying flag information as a full flag
definition, or as a shorted map of flag key:value mappings.
In the case of the flag values, or in the case of a malformed flag
definition, a flag version might not be specified. When this happens,
users of the flag tracker will notice an error because the version
comparison code will encounter an unexpected nil value.
To prevent this from happening, the file data source should be setting a
version for each flag or segment it reads.
When these items are modified in the LaunchDarkly UI, we automatically
increment the version associated with the item. To make this easier for
the user going forward, the file data source will handle incrementing
this version number each time the file is re-read.1 parent d3c8d40 commit 7d5b051
1 file changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
96 | 105 | | |
97 | 106 | | |
| 107 | + | |
98 | 108 | | |
99 | 109 | | |
100 | 110 | | |
101 | | - | |
| 111 | + | |
102 | 112 | | |
103 | 113 | | |
| 114 | + | |
104 | 115 | | |
105 | 116 | | |
106 | 117 | | |
| |||
134 | 145 | | |
135 | 146 | | |
136 | 147 | | |
137 | | - | |
| 148 | + | |
138 | 149 | | |
139 | 150 | | |
140 | 151 | | |
| 152 | + | |
141 | 153 | | |
142 | 154 | | |
143 | 155 | | |
| |||
0 commit comments