Commit ca5a494
committed
feat(env): skip unchanged env var updates and preserve secrets
Query and read existing environment variable secret values from the
secret store and track which vars are marked secret. Compare current
values to the incoming Vercel values and skip any variables whose
stored secret value matches the incoming value. Log when no changes
are detected and when only changed vars are updated. Also adjust the
split between secret and non-secret groups to operate on the filtered
changed set.
Additionally, avoid redundant secret writes when creating/updating
secret references in the environment variables repository by checking
the secret store first and skipping unchanged values.
These changes reduce unnecessary secret writes and API calls, preserve
secret status when overriding, and add diagnostic logging for skipped
and changed variables.1 parent aae7957 commit ca5a494
File tree
4 files changed
+65
-9
lines changed- apps/webapp/app
- models
- routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables
- v3/environmentVariables
- packages/core/src/v3/schemas
4 files changed
+65
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1301 | 1301 | | |
1302 | 1302 | | |
1303 | 1303 | | |
1304 | | - | |
1305 | | - | |
| 1304 | + | |
| 1305 | + | |
1306 | 1306 | | |
| 1307 | + | |
| 1308 | + | |
1307 | 1309 | | |
1308 | 1310 | | |
1309 | 1311 | | |
| |||
1316 | 1318 | | |
1317 | 1319 | | |
1318 | 1320 | | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
1319 | 1326 | | |
1320 | 1327 | | |
1321 | 1328 | | |
| |||
1324 | 1331 | | |
1325 | 1332 | | |
1326 | 1333 | | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
1330 | 1355 | | |
1331 | 1356 | | |
1332 | 1357 | | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
1333 | 1384 | | |
1334 | | - | |
1335 | | - | |
| 1385 | + | |
| 1386 | + | |
1336 | 1387 | | |
1337 | 1388 | | |
1338 | 1389 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
412 | 411 | | |
413 | 412 | | |
414 | 413 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
193 | 200 | | |
194 | 201 | | |
195 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
580 | | - | |
581 | 580 | | |
582 | 581 | | |
583 | 582 | | |
| |||
0 commit comments